Use transaction SRT_UTIL.
Check this post : https://community.sap.com/t5/technology-blogs-by-members/merging-multiple-adobe-forms-and-downloading-it-as-a-single-pdf/ba-p/13512984
Merge PDF from local storage : https://codezentrale.de/tag/cl_rspo_pdf_merge/
Check program : RSPO_TEST_MERGE_PDF_FILES.
Instead of declaring constants in reports to manage message types, save time and use attributes of interface IF_XO_CONST_MESSAGE :
IF_XO_CONST_MESSAGE=>ABORT " TYPE BAPI_MTYPE 'A'
IF_XO_CONST_MESSAGE=>ERROR " TYPE BAPI_MTYPE 'E'
IF_XO_CONST_MESSAGE=>EXIT " TYPE BAPI_MTYPE 'X'
IF_XO_CONST_MESSAGE=>INFO " TYPE BAPI_MTYPE 'I'
IF_XO_CONST_MESSAGE=>SUCCESS " TYPE BAPI_MTYPE 'S'
IF_XO_CONST_MESSAGE=>WARNING " TYPE BAPI_MTYPE 'W'
Instead of declaring constants in reports to manage ranges, save time and use attributes of interface IF_FSBP_CONST_RANGE :
IF_FSBP_CONST_RANGE=>OPTION_BETWEEN. " Type DDOPTION 'BT'
IF_FSBP_CONST_RANGE=>OPTION_CONTAINS_PATTERN. " Type DDOPTION 'CP'
IF_FSBP_CONST_RANGE=>OPTION_EQUAL. " Type DDOPTION 'EQ'
IF_FSBP_CONST_RANGE=>OPTION_GREATER. " Type DDOPTION 'GT'
IF_FSBP_CONST_RANGE=>OPTION_GREATER_EQUAL. " Type DDOPTION 'GE'
IF_FSBP_CONST_RANGE=>OPTION_LESS. " Type DDOPTION 'LT'
IF_FSBP_CONST_RANGE=>OPTION_LESS_EQUAL. " Type DDOPTION 'LE'
IF_FSBP_CONST_RANGE=>OPTION_NOT_BETWEEN. " Type DDOPTION 'NB'
IF_FSBP_CONST_RANGE=>OPTION_NOT_CONTAINS_PATTERN. " Type DDOPTION 'NP'
IF_FSBP_CONST_RANGE=>OPTION_NOT_EQUAL. " Type DDOPTION 'NE'
IF_FSBP_CONST_RANGE=>SIGN_EXCLUDE. " Type DDSIGN 'E'
IF_FSBP_CONST_RANGE=>SIGN_INCLUDE. " Type DDSIGN 'I'
Use ceil( ) or floor( ) to round decimal to integer, respectively to upper or lower integer value.
DATA(lv_upper_value) = ceil( '0.333' ). " ==> 1
DATA(lv_lower_value) = floor( '1.66' ). " ==> 1
Use the round( ) method to have more possibilities :
DATA : lv_percentage TYPE numc3.
" [...]
" In this case, the percentage calc is round to lower integer value :
lv_percentage = = CONV #( round( val = lv_num / lv_total * 100
dec = 0
mode = cl_abap_math=>round_down ) ).
You can specify in wich mode you want to round number with :
CL_ABAP_MATH=>ROUND_HALF_UP | Round away from zero if value is exactly half CL_ABAP_MATH=>ROUND_HALF_DOWN | Round to zero if value is exactly half CL_ABAP_MATH=>ROUND_HALF_EVEN | Round so last digit is an even no. if value is exactly half CL_ABAP_MATH=>ROUND_UP | Round away from zero CL_ABAP_MATH=>ROUND_DOWN | Round to Zero CL_ABAP_MATH=>ROUND_CEILING | Round to Positive Infinity CL_ABAP_MATH=>ROUND_FLOOR | Round to Negative Infinity
Search tag : arrondi, arrondir, entier, valeur supérieure, inférieure
With SORT
IF your_table IS NOT INITIAL.
SORT your_table BY your_field DESCENDING.
" Get row with max value :
ls_row_with_max_value = your_table[ 1 ].
" Get max value :
lv_max_value = your_table[ 1 ]-your_field.
ENDIF.
With REDUCE :
" Get row with max value :
DATA(ls_row_max) = REDUCE ts_row( INIT ls_max = VALUE #( )
FOR ls_row IN lt_table
NEXT ls_max = COND #(
WHEN ls_row-count > ls_max-count
THEN ls_row
ELSE ls_max )
).
This post provides methods or macro for logging SLG1 message.
It is shortcuts for calling standard methods :
– BAL_LOG_CREATE
– BAL_LOG_MSG_ADD
– BAL_DB_SAVE
Local ALV event class template (to be completed with missing events) :
Read MoreIf you work with adobe form translations, you will see that translations are not effective immediately. It is because of cache.
To clear the cache, launch program : FP_PDF_TEST_26 .
Search tag : refresh, buffer, pdf
To specify with javascript the color for a text field in adobe form, use the code below.
// data.MAIN.SUBFORM.FIELD_TO_CHANGE_COLOR::initialize - (JavaScript, client)
this.font.fill.color.value = "255,0,0"; // Color Red in RGB Color
The color has to be specified in 🔗 RGB format.
Read More