Use FM ALSM_EXCEL_TO_INTERNAL_TABLE to read Excel file
Caution, this use OLE_Objects and can’t be run in background.
Read MoreUse FM ALSM_EXCEL_TO_INTERNAL_TABLE to read Excel file
Caution, this use OLE_Objects and can’t be run in background.
Read MorePosting date = date comptable.
Use the FM below :
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = gv_gjhar
i_periv = gc_24
i_poper = gv_poper
IMPORTING
e_date = s_fkdat-low
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = gv_gjhar
i_periv = gc_24
i_poper = gv_poper
IMPORTING
e_date = s_fkdat-high
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Search tag: date comptable, conversion
Export :
DATA : li_table_imported TYPE TABLE OF db_dable.
EXPORT my_table FROM li_table_imported TO MEMORY ID 'MEM_TAB'.
Import:
DATA : li_table_exported TYPE TABLE OF db_dable.
IMPORT my_table TO li_table_exported FROM MEMORY ID 'MEM_TAB'.
Clear:
FREE MEMORY ID 'MEM_TAB'.
In SM37, type JDBG (like Job Debug in Background).
Read MoreTable for :
Search tag: OTP
To get material document in error, check table AFFW.
Table JEST to see active and inactive status on objects.
Table TJ02 (and text table TJ02T) for internal status.
Table TJ30 (and text table TJ30T) for external status.
Example to change status with BAPI
Read More
Use class : CL_ABAP_CHAR_UTILITIES.
Example, write a carriage return (Carriage Return and Line Feed) :
WRITE : 'Line 1', CL_ABAP_CHAR_UTILITIES=>CR_LF, 'Line 2'.
FM to check if Gui is active :
DATA : lw_gui_actif TYPE c.
CALL FUNCTION 'GUI_IS_AVAILABLE'
IMPORTING
return = lw_gui_actif.
FM to check if code is executed in dialog mode :
DATA : lw_is_dialog TYPE xfeld.
CALL FUNCTION 'ZFM_CHECK_DIALOG_MODE'
IMPORTING
ew_is_dialog = lw_is_dialog. " = X si en mode Dialog, vide sinon