Mains infos, to be completed…
Tables, cf. LE – Logistic and execution
Mains infos, to be completed…
Tables, cf. LE – Logistic and execution
Even with an external break-point, it is not always possible to trigger the debugger for update task.
The tip is to use infinite loop in your code executed in update task, to prevent the code to be debugged from execution, and then, trigger the debugger from SM50.
" ==========================================================
" Infinite LOOP to retrieve debug in SM50 (background tasks)
" ----------------------------------------------------------
DATA lw_x TYPE char1.
IF sy-uname = 'USERNAME'. " <== Not not lock everybody
WHILE lw_x IS INITIAL.
ENDWHILE.
ENDIF.
" ==========================================================
Refer to the links below :
Building Your First BADI
How to Implement a BADI
How to use filter in a BADI
To display content of internal table into ALV grid, use this method :
DATA : lo_table TYPE REF TO cl_salv_table.
* Create ALV
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = lo_table
CHANGING
t_table = gi_data_to_display ).
CATCH cx_salv_msg.
ENDTRY.
* Display ALV grid
lo_table->display( ).
Example of use in SAP demo program : SALV_DEMO_TABLE_REAL_SIMPLE.
DATA : lw_char10 TYPE char10,
lw_vbeln TYPE vbeln.
lw_char10 = '300841'.
UNPACK lw_char10 TO lw_vbeln. " ==> LW_VBELN = 0000300841
To add a select screen variant in a transport order, use program (SE38) : RSTRANSP.
You can also do it directly on your report :
Read More
SHIFT lw_char LEFT DELETING LEADING '0'.
Several synthax below to do the same thing :
(Notice that you have to work with a field type CHAR to remove the ZERO, will not work with a NUMC variable)
DATA : li_tab TYPE TABLE OF trdir-name,
infotab TYPE t_varinfo OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'PRINT_SELECTIONS'
EXPORTING
mode = li_tab
rname = sy-repid "program name
rvariante = '' "variant name
TABLES
infotab = infotab.
LOOP AT infotab.
WRITE / infotab-line.
ENDLOOP.
Use program : RSTXSCRP.
Macros that I’m using for formatting reports quicker.
Theses are declared in the TOP of report.