diff --git a/src/zif_trm.intf.abap b/src/zif_trm.intf.abap index ce5ec20..9f14414 100644 --- a/src/zif_trm.intf.abap +++ b/src/zif_trm.intf.abap @@ -1,6 +1,6 @@ INTERFACE zif_trm PUBLIC . - CONSTANTS version TYPE string VALUE '1.2.0' ##NO_TEXT. + CONSTANTS version TYPE string VALUE '1.3.0' ##NO_TEXT. ENDINTERFACE. diff --git a/src/ztrm.fugr.xml b/src/ztrm.fugr.xml index ecc89be..fd67431 100644 --- a/src/ztrm.fugr.xml +++ b/src/ztrm.fugr.xml @@ -1720,6 +1720,9 @@ TRM_RFC_UNAUTHORIZED + + UPDATE_FAILED + @@ -1734,6 +1737,10 @@ TRM_RFC_UNAUTHORIZED X + + UPDATE_FAILED + X + diff --git a/src/ztrm.fugr.ztrm_rename_transport_request.abap b/src/ztrm.fugr.ztrm_rename_transport_request.abap index 1f843aa..eb32e06 100644 --- a/src/ztrm.fugr.ztrm_rename_transport_request.abap +++ b/src/ztrm.fugr.ztrm_rename_transport_request.abap @@ -6,6 +6,7 @@ FUNCTION ZTRM_RENAME_TRANSPORT_REQUEST. *" VALUE(IV_AS4TEXT) TYPE AS4TEXT *" EXCEPTIONS *" TRM_RFC_UNAUTHORIZED +*" UPDATE_FAILED *"---------------------------------------------------------------------- CALL FUNCTION 'ZTRM_CHECK_AUTH' EXCEPTIONS @@ -14,10 +15,73 @@ FUNCTION ZTRM_RENAME_TRANSPORT_REQUEST. RAISE trm_rfc_unauthorized. ENDIF. - UPDATE e07t SET as4text = iv_as4text WHERE trkorr EQ iv_trkorr. - COMMIT WORK AND WAIT. + CALL FUNCTION 'ENQUEUE_E_TRKORR' + EXPORTING + trkorr = iv_trkorr. + IF sy-subrc <> 0. + RAISE update_failed. + ENDIF. + + "LSTR6F02 - e070_update + DATA: ls_e070 LIKE e070, + ls_e070c LIKE e070c, + ls_e07t LIKE e07t. + DATA: lv_msgtext1 LIKE sy-msgv3, + lv_msgtext2 LIKE sy-msgv3, + lv_msgtext3 LIKE sy-msgv3. + + SELECT SINGLE * INTO ls_e070 + FROM e070 + WHERE trkorr = iv_trkorr. + SELECT SINGLE * INTO ls_e070c "read additional fields - note 2231381 + FROM e070c + WHERE trkorr = iv_trkorr. + + ls_e07t-trkorr = iv_trkorr. + ls_e07t-langu = sy-langu. + ls_e07t-as4text = iv_as4text. + + + CALL FUNCTION 'TRINT_UPDATE_COMM_HEADER' + EXPORTING + wi_e070 = ls_e070 + wi_e07t = ls_e07t + wi_save_user = ' ' + wi_sel_e070 = 'X' + wi_sel_e07t = 'X' + wi_user = sy-uname + wi_e070c = ls_e070c + wi_sel_e070c = 'X' + IMPORTING + we_e070 = ls_e070 + we_e070c = ls_e070c + EXCEPTIONS + e070_update_error = 01 + e07t_update_error = 02 + e070c_update_error = 03. + + IF sy-subrc <> 0. + CALL FUNCTION 'DEQUEUE_E_TRKORR' + EXPORTING + trkorr = iv_trkorr. + RAISE update_failed. + ENDIF. + + lv_msgtext1 = ls_e070-trkorr. + lv_msgtext2 = sy-uname. + lv_msgtext3 = ' '. + CALL FUNCTION 'TRINT_APPEND_COMM_SYSLOG_ENTRY' + EXPORTING + wi_msgid = 'TR' + wi_msgno = '018' + wi_msgv2 = lv_msgtext1 + wi_msgv3 = lv_msgtext2 + wi_msgv4 = lv_msgtext3 + wi_new_order = ' ' + wi_trfunction = ls_e070-trfunction + wi_trkorr = ls_e070-trkorr. ENDFUNCTION.