*&---------------------------------------------------------------------* *& Report ZDISPLAY_ORDER_LOG * & -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - * * & *&---------------------------------------------------------------------* REPORT zdisplay_order_log. DATA: lt_msg_handle TYPE bal_t_msgh, ls_msg TYPE bal_s_msg, ls_log TYPE crmt_odata_task_logs, lt_log LIKE TABLE OF ls_log, lv_object_guid TYPE crmt_object_guid. DATA: ls_log_filter TYPE bal_s_lfil, lt_log_header TYPE balhdr_t, lt_log_header1 TYPE balhdr_t, lt_extnumber TYPE bal_s_lfil-extnumber, ls_extnumber LIKE LINE OF lt_extnumber, ls_object LIKE ls_extnumber, lt_object LIKE lt_extnumber, ls_subobject LIKE ls_extnumber, lt_subobject LIKE lt_extnumber. FIELD-SYMBOLS: <msg_handle> TYPE balmsghndl. lv_object_guid = '3440B5B172DE1ED4B1C6A856D9456788'. "new design ls_extnumber-sign = 'I'. ls_extnumber-option = 'EQ'. ls_extnumber-low = lv_object_guid. APPEND ls_extnumber TO lt_extnumber. ls_log_filter-extnumber = lt_extnumber. ls_object-sign = 'I'. ls_object-option = 'EQ'. ls_object-low = 'CRM_DOCUMENT'. APPEND ls_object TO lt_object. ls_log_filter-object = lt_object. ls_subobject-sign = 'I'. ls_subobject-option = 'EQ'. ls_subobject-low = 'SINGLE'. APPEND ls_subobject TO lt_subobject. ls_log_filter-subobject = lt_subobject. CALL FUNCTION 'BAL_DB_SEARCH' EXPORTING i_s_log_filter = ls_log_filter IMPORTING e_t_log_header = lt_log_header EXCEPTIONS log_not_found = 1 no_filter_criteria = 2. DATA: lt_msgs TYPE BAL_T_MSGH. call FUNCTION 'BAL_DB_LOAD' EXPORTING I_T_LOG_HEADER = lt_log_header IMPORTING E_T_MSG_HANDLE = lt_msgs EXCEPTIONS NO_LOGS_SPECIFIED = 1 LOG_NOT_FOUND = 2 LOG_ALREADY_LOADED = 3. WRITE: / sy-subrc. BREAK-POINT. data: ls_msg_handle TYPE BALMSGHNDL, ls_context type crmt_msg_context, lv_item_no type crmt_item_no. READ TABLE lt_log_header ASSIGNING FIELD-SYMBOL(<fs>) INDEX 1. CHECK sy-subrc = 0. ls_msg_handle-log_handle = <fs>-log_handle. CLEAR: ls_msg. * Read the message call function 'BAL_LOG_MSG_READ' exporting i_s_msg_handle = ls_msg_handle importing e_s_msg = ls_msg exceptions others = 1. BREAK-POINT.Copy the code