1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
* IMPORTING it_log TYPE bapirettab METHOD display_log. CHECK it_log IS NOT INITIAL. DATA ls_log TYPE bal_s_log. DATA ls_log_handle TYPE balloghndl. CALL FUNCTION 'BAL_LOG_CREATE' EXPORTING i_s_log = ls_log IMPORTING e_log_handle = ls_log_handle EXCEPTIONS OTHERS = 1. DATA(lt_log_handle) = VALUE bal_t_logh( ). INSERT ls_log_handle INTO TABLE lt_log_handle. DATA(ls_display_profile) = VALUE bal_s_prof( ). CALL FUNCTION 'BAL_DSP_PROFILE_POPUP_GET' IMPORTING e_s_display_profile = ls_display_profile. "Размеры ls_display_profile-end_col = 10. ls_display_profile-end_row = 10. ls_display_profile-use_grid = 'X'. * fill message data LOOP AT it_log ASSIGNING FIELD-SYMBOL(<ls_bapiret2>). DATA(ls_msg) = VALUE bal_s_msg( ). IF <ls_bapiret2>-type IS INITIAL. ls_msg-msgty = 'S'. ELSE. ls_msg-msgty = <ls_bapiret2>-type. ENDIF. ls_msg-msgid = <ls_bapiret2>-id. ls_msg-msgno = <ls_bapiret2>-number. ls_msg-msgv1 = <ls_bapiret2>-message_v1. ls_msg-msgv2 = <ls_bapiret2>-message_v2. ls_msg-msgv3 = <ls_bapiret2>-message_v3. ls_msg-msgv4 = <ls_bapiret2>-message_v4. ls_msg-detlevel = '1'. IF ls_msg-msgid IS INITIAL AND ls_msg-msgno IS INITIAL AND NOT <ls_bapiret2>-message IS INITIAL . CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT' EXPORTING i_log_handle = ls_log_handle i_msgty = ls_msg-msgty i_text = <ls_bapiret2>-message EXCEPTIONS OTHERS = 4. ELSE. CALL FUNCTION 'BAL_LOG_MSG_ADD' EXPORTING i_log_handle = ls_log_handle i_s_msg = ls_msg EXCEPTIONS log_not_found = 0 OTHERS = 1. ENDIF. ENDLOOP. * display log DATA(ls_s_excm) = VALUE bal_s_excm( ). CALL FUNCTION 'BAL_DSP_LOG_DISPLAY' EXPORTING i_s_display_profile = ls_display_profile i_t_log_handle = lt_log_handle IMPORTING e_s_exit_command = ls_s_excm EXCEPTIONS OTHERS = 0. ENDMETHOD. |