Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: reprocess event message

$
0
0

Hi Anu,

 

I like the Daniel's approach of quitting rather than resetting your EE.

If you are implementing Daniel's approach, which I think will help your case, do the following:

 

1) Try to add some indicators like sender codes ( SDNCOD ) or data codes on the original message. This can be done on external system or through per-processing. No worries if you can't as well.

2) Add quit activity as Daniel suggested. Your condition should include the codes from step 1.

Now you message is quit by ruleset and not processed.

Use the following program to reprocess your message. You need to do 2 things in the program which I didn't add:

 

a) Add a select on /SAPTRX/EH_EVMSG ( uncomment it from my code) and parameters to make sure you are picking up the event for processing which you want.

b) Add or modify your sender codes in the program like ls_evm_data-header-SNDCOD = "<your value>". The reason for this is to by pass step 2 so that you are not quitting again.

 

Hope this helps.

 

 

****************************************************************************************************************

****************** Add Processing Date and any other selection criteria ***************
PARAMETERS: p_evguid TYPE /saptrx/ev_guid,
             p_int_ev TYPE /saptrx/event_code,
             p_evtdat TYPE /saptrx/ev_evtdat,
             p_test   TYPE char1.

START-OF-SELECTION.

* Get you event for processing
   SELECT SINGLE evt_guid FROM /saptrx/evm_hdr INTO  ls_evm_guids
          WHERE evt_guid EQ p_evguid
           AND  int_ev_cod EQ p_int_ev
           AND  evtdat EQ p_evtdat.


************** Here uncomment the following logic to   *****
************** cross check this event against EH_EVMSG*****
************** If event is in EH_EVMSG, it means posted then do not continue****

*  CLEAR lv_msgguid.
*  SELECT SINGLE msg_guid FROM /saptrx/eh_evmsg INTO lv_msgguid
*    WHERE msg_guid = ls_evm_guids-msg_guid.
*  IF lv_msgguid IS INITIAL. " this will tell that your message is not posted.

     APPEND ls_evm_guids TO lt_evm_guids.
*--------------------------------------------------------------------
* -> read event message data
*--------------------------------------------------------------------
     CALL METHOD /saptrx/cl_evm_display_view=>get_evm_data_and_text
       EXPORTING
         it_evm_guids     = lt_evm_guids
         is_request_flags = ls_req_flags
       IMPORTING
         es_evm_data      = ls_evm_data
         "et_eh_evmsg      = lt_eh_evmsg
         "et_eh_evmad      = lt_eh_evmad
       EXCEPTIONS
         OTHERS           = 0.

     CHECK ls_evm_data IS NOT INITIAL.
**** Modify ls_evm_data to add additional data which will help bypass the quit processing.
     CALL FUNCTION '/SAPTRX/PROCESS_MESSAGES_02'
       EXPORTING
         is_evm_tables = ls_evm_data
         i_simulate    = p_test
*       IV_EH_GENERATION_MODE           =
*       IV_EH_GENERATION_FUNCTION       =
* CHANGING
*       ET_RETURN     =
       .
*  ENDIF. " Check EH_EVMSG table


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>