diff --git a/src/zif_trm.intf.abap b/src/zif_trm.intf.abap index 9f14414..4a6c141 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.3.0' ##NO_TEXT. + CONSTANTS version TYPE string VALUE '1.3.1' ##NO_TEXT. ENDINTERFACE. diff --git a/src/ztrm.fugr.xml b/src/ztrm.fugr.xml index fd67431..457006e 100644 --- a/src/ztrm.fugr.xml +++ b/src/ztrm.fugr.xml @@ -1519,6 +1519,9 @@ READ_QUEUE_FAILED + + TMS_ALERT + @@ -1537,6 +1540,10 @@ READ_QUEUE_FAILED X + + TMS_ALERT + X + diff --git a/src/ztrm.fugr.ztrm_read_tms_queue.abap b/src/ztrm.fugr.ztrm_read_tms_queue.abap index 3ef83ef..742f973 100644 --- a/src/ztrm.fugr.ztrm_read_tms_queue.abap +++ b/src/ztrm.fugr.ztrm_read_tms_queue.abap @@ -1,4 +1,4 @@ -FUNCTION ZTRM_READ_TMS_QUEUE. +FUNCTION ztrm_read_tms_queue. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING @@ -8,7 +8,11 @@ FUNCTION ZTRM_READ_TMS_QUEUE. *" EXCEPTIONS *" TRM_RFC_UNAUTHORIZED *" READ_QUEUE_FAILED +*" TMS_ALERT *"---------------------------------------------------------------------- + DATA: ls_bufcnt TYPE tmsbufcnt, + ls_alog TYPE tmsalog. + CALL FUNCTION 'ZTRM_CHECK_AUTH' EXCEPTIONS trm_rfc_unauthorized = 1. @@ -16,6 +20,9 @@ FUNCTION ZTRM_READ_TMS_QUEUE. RAISE trm_rfc_unauthorized. ENDIF. + " 03072024 avoid display alert + sy-batch = 'X'. + CALL FUNCTION 'TMS_UIQ_IQD_READ_QUEUE' EXPORTING iv_system = iv_target @@ -23,6 +30,7 @@ FUNCTION ZTRM_READ_TMS_QUEUE. iv_read_shadow = 'X' IMPORTING et_requests = et_requests + es_bufcnt = ls_bufcnt EXCEPTIONS read_queue_failed = 1. @@ -30,4 +38,24 @@ FUNCTION ZTRM_READ_TMS_QUEUE. RAISE read_queue_failed. ENDIF. + IF ls_bufcnt-alertid IS NOT INITIAL. + CALL FUNCTION 'TMS_ALT_ANALYSE_ALERT' + EXPORTING + iv_alert_id = ls_bufcnt-alertid + iv_no_display = 'X' + IMPORTING + es_alog = ls_alog + EXCEPTIONS + alert = 1 + error_message = 2 + OTHERS = 3. + IF ls_alog-msgty EQ 'E' OR ls_alog-msgty EQ 'A'. + MESSAGE ID ls_alog-msgid + TYPE ls_alog-msgty + NUMBER ls_alog-msgno + WITH ls_alog-msgv1 ls_alog-msgv2 ls_alog-msgv3 ls_alog-msgv4 + RAISING tms_alert. + ENDIF. + ENDIF. + ENDFUNCTION.