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 |
FORM change_log USING log_handle TYPE balloghndl subobject TYPE balhdr-subobject. DATA t_log_h TYPE bal_t_logh. APPEND log_handle TO t_log_h. CALL FUNCTION 'BAL_DB_LOAD' EXPORTING i_t_log_handle = t_log_h EXCEPTIONS no_logs_specified = 1 log_not_found = 2 log_already_loaded = 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. DATA lt_msg TYPE TABLE OF balmi WITH HEADER LINE. lt_msg-msgty = 'E'. lt_msg-msgid = 'ZCLASS'. lt_msg-msgno = '002'. lt_msg-msgv1 = subobject. APPEND lt_msg. CALL FUNCTION 'APPL_LOG_WRITE_MESSAGES' EXPORTING log_handle = log_handle update_or_insert = 'U' TABLES messages = lt_msg[] EXCEPTIONS object_not_found = 1 subobject_not_found = 2 OTHERS = 3. 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 'BAL_DB_SAVE' EXPORTING i_client = sy-mandt * I_IN_UPDATE_TASK = ' ' i_save_all = 'X' EXCEPTIONS log_not_found = 1 save_not_allowed = 2 numbering_error = 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. ENDFORM. |