Code: Alles auswählen.
FORM auftrag_verbuchen
....
DATA: lv_log_handle_tab TYPE bal_t_logh
, lv_log_nr_tab TYPE bal_t_lgnm
.
APPEND av_log_handle TO lv_log_handle_tab.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_client = sy-mandt
i_save_all = ' '
i_t_log_handle = lv_log_handle_tab
IMPORTING
e_new_lognumbers = lv_log_nr_tab
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE save_error .
ENDIF .
ENDFORM.
FORM LESE_LOG .
DATA: lt_msg_hdr type bal_t_msgh,
ls_msg_hdr TYPE BALMSGHNDL,
l_s_msg TYPE bal_s_msg,
l_help_info TYPE help_info,
lv_count_mass TYPE n.
CLEAR lt_msg_hdr.
DATA: gr_object TYPE bal_s_obj,
gr_extnumber TYPE bal_s_extn,
gs_log_filter TYPE bal_s_lfil,
gt_log_header TYPE balhdr_t.
CLEAR: gs_log_filter, gr_extnumber.
*- Search only log file of this application
gr_object-sign = 'I'.
gr_object-option = 'EQ'.
gr_object-low = 'ZISW_Test'.
APPEND gr_object TO gs_log_filter-object.
*- Search only log file of this change number
gr_extnumber-sign = 'I'.
gr_extnumber-option = 'EQ'.
gr_extnumber-low = '123456789'.
APPEND gr_extnumber TO gs_log_filter-extnumber.
*-- Search for log files on the database
CALL FUNCTION 'BAL_DB_SEARCH'
EXPORTING
i_s_log_filter = gs_log_filter
IMPORTING
e_t_log_header = gt_log_header
EXCEPTIONS
LOG_NOT_FOUND = 1
NO_FILTER_CRITERIA = 2.
IF sy-subrc <> 0.
RAISE read_error .
ENDIF.
*-- Load log files from database into memory
CALL FUNCTION 'BAL_DB_LOAD'
EXPORTING
i_t_log_header = gt_log_header " Header wird befüllt
IMPORTING
e_t_msg_handle = lt_msg_hdr " lt_msg_hdr wird erst beim zweiten Starten des Reports befüllt
EXCEPTIONS
no_logs_specified = 1
log_not_found = 2
log_already_loaded = 3
OTHERS = 4.
IF sy-subrc <> 0.
RAISE read_error .
ENDIF.
ENDFORM. " LESE_LOG