cancel
Showing results for 
Search instead for 
Did you mean: 

Archiving of Event Messages

arun_yesodharan
Active Participant
0 Kudos

Hi Experts,

  I am trying to test the archiving of event messages. As informed by Mr. Steffen earlier the activation of BADI - /SAPTRX/ARC_EVM_CHECK helps to archive the event messages for event handlers which are archived.

The BADI was found to be active as default & in my testing, i am getting so many records for which even the EH is active & not even deactivated.Why so? The screenshot follows:

Status of BADI :

I am executing in Test Mode.

  The results followed (3rd Entry is displayed as archival ready in test mode):

   But when viewed the event handler in /SAPTRX/EH_LIST, it found to be active:

Accepted Solutions (1)

Accepted Solutions (1)

arun_yesodharan
Active Participant
0 Kudos

Hi,

  My archiving sequence is Event Handler & then Event Message .Also i have not written any code in the badi. Also once set, this cannot be changed.

  As steffen had said , in my previous post of archiving that the standard activation is enough to check whether all relevant event handlers are archived & if so , it will archive the event messages.

former_member190756
Active Contributor
0 Kudos

Hi Arun,

then the Message should not be archived if it was processed against an not archived EH.

Could you post more screenshots of the EH? Especially the Tracking IDs and the Message tab

In your screenshot the EH has Tracking Code Set BOOKING. But your selection criteria for Message archiving is Tracking Code Set EQUIPMENT. Maybe try BOOKING as selection criteria for the archiving.

Best regards,

Steffen

Former Member
0 Kudos

Hi Arun,

The interface class /SAPTRX/IF_EX_ARC_EVM_CHECK~CHECK is default active in BADI /SAPTRX/ARC_EVM_IMPL.

When I go through the code inside it shows the standard interface method CHECK checks  /saptrx/arc_objseq VALUE 1. So, your condition configuration 1 = Event Handler & then Event Message is fulfilled here. 


Ideally the code should work as per your scenario.


Few questions on Screenshots:

1. First screen, you are selecting Tracking ID code set as "EQUIPMENT"

2. Second screen,  Tracking ID code set shows as "EQUIPMENT"

3. Third screen - EH_LIST shows as "BOOKING".


Can you put the breakpoint here /SAPTRX/ARCHIVE_EVM_WRITE -> CALL BADI lr_check_exit->check and move ahead with debugging?


Regards


GGOPII

Answers (3)

Answers (3)

arun_yesodharan
Active Participant
0 Kudos

Hi All,

   Steffen & Gopi have correctly identified the issue, i was checking the equipment from the archival screen & checking booking in the event handler.

Upon executing the same via BOOKING, the archival does not consider the booking.

Former Member
0 Kudos

That's Interesting .  Is your configuration completed?

Regards


GGOPII

arun_yesodharan
Active Participant
0 Kudos

  Yes Gopi , i am finished with my configuration ...thanks to all...

Former Member
0 Kudos

Hi Arun,

What is your archiving sequence? I am guessing you have archiving sequence as "Event message, event handler".

If you want event messages archived after EHs then change it to "Event handler, event message"

check and change the entry in the followoing path and test it again.

SPRO->EM->Archive & Delete SAP EM Objects-> Define Archiving sequence for SAP EM Objects

Thanks,

Vishnu

former_member190756
Active Contributor
0 Kudos

Hi Arun,

as Vishnu said the BADI has the following check:

IF iv_snap = abap_true.
     RETURN.
  ELSEIF iv_arcseq = lc_arcseq_eh_evm.
     READ TABLE it_evm_eh_guid WITH KEY
       msg_guid = is_evm_hdr-evt_guid
       TRANSPORTING NO FIELDS.
     IF sy-subrc = 0.
       cv_veto = abap_true.
       cv_detail_text = text-001.
       RETURN.
     ENDIF.
   ENDIF.


i.e. it is only working with archiving sequence EH, Event Messages.


The sequence could only be set once in the customizing. A change would be only possible by changing the table entry directly in SE11. This should be only done if you don't need the already archived data to be displayed in the UI. The correct sequence is needed to guarantee that the combined EH reteival from DB and Archive works properly.


Best regards,

Steffen

Former Member
0 Kudos

Hi Arun,

Could you tell us what you have written the code inside the BADI to check or you just activated /SAPTRX/IF_EX_ARC_EVM_CHECK~CHECK in the BADI.

This is what says implementation class

"* -> Check if all linked event handlers are already archived
*    This check will only be executed if event handler objects
*    will be archived before event message objects"


It should just check the event handler in test mode and not to execute, BADI may exclude this.


I could see one SAP OSS note  1939277 - Archiving: Minor performance improvements for archiving event messages which was released in 2013 but it would have already accommodated latest release.  However, please check that in your system.

Regards

GGOPII