Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep the core clean #13

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zif_trm.intf.abap
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions src/ztrm.fugr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,9 @@
<RSEXC>
<EXCEPTION>TRM_RFC_UNAUTHORIZED</EXCEPTION>
</RSEXC>
<RSEXC>
<EXCEPTION>UPDATE_FAILED</EXCEPTION>
</RSEXC>
</EXCEPTION>
<DOCUMENTATION>
<RSFDO>
Expand All @@ -1734,6 +1737,10 @@
<PARAMETER>TRM_RFC_UNAUTHORIZED</PARAMETER>
<KIND>X</KIND>
</RSFDO>
<RSFDO>
<PARAMETER>UPDATE_FAILED</PARAMETER>
<KIND>X</KIND>
</RSFDO>
</DOCUMENTATION>
</item>
<item>
Expand Down
68 changes: 66 additions & 2 deletions src/ztrm.fugr.ztrm_rename_transport_request.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.