cancel
Showing results for 
Search instead for 
Did you mean: 

Archiving in SAP EM

arun_yesodharan
Active Participant
0 Kudos

Hi All,

  I am in the process of configuring the archiving activity for Event Management.I understand that we need to identify the events which determine the completion of the event handler & then define the residence time as when we need to archive & on what basis.The following configuration has been done.Need you expertise to validate the same.Also share any other important parameter that need to be taken care of.

Defining Rule Set

Condition Specifies the Internal Event Code = "ZCOMPLETE" etc to identify the completion of event handler activities

Activity ZQ2C_DEACTIV_EH is as follows:

I am not sure of Activity EH_AUTO_ARCH. defined as follows:

The activity parameter defined here is -1 on the assumption that it will archive the event handlers which have a difference of 1 day from deactivation.

Residence time maintenance as follows:

Kindly validate the same.I need to deactivate every completed event handler with a frequency of 4 Hours.Will this setting work?

Accepted Solutions (1)

Accepted Solutions (1)

arun_yesodharan
Active Participant
0 Kudos

Finally there seems to have 5 steps mentioned in :Data Archiving for High Data Volumes - Data Archiving - SAP Library


Activities Done:

    • You have made the Customizing settings for the archiving objects SAPTRX_EH for the event handler object or SAPTRX_EVM for the event message object in the transaction for maintaining archiving objects (transaction AOBJ) - kept the values as it is in standard
    • You have defined the archiving sequence -- as blank
    • You have defined the residence time for the archiving object - as event header then event message


Activities Pending:

    • You have defined an archiving profile and a user profile.
    • You have assigned the archiving profile to the user profile that is linked to the Web interface transaction.
    • You have created and activated the field catalog and archive information structure for the archiving object using the Archive Retrieval Configurator (transaction SARJ).

Can you guys help in understanding how to carry out the pending activities.I navigated to the transactions but stuck in the following places:

I literally dont know what to enter & what will this lead to.

Can i use the standard catalog or i need to create a fresh one for SAPTRX_EH & EVM

former_member190756
Active Contributor
0 Kudos

Hi Arun,

Archiving profile is only needed in case you want to display archived data in the Webdynpro UI.

Then you would need to create Field Catalog and Infostructure.

Best regards,

Steffen

Former Member
0 Kudos

Hi Arun,


Please follow these steps:

1. Complete ruleset to deactivate Event handler.

2. Define Archiving Sequence for SAP Event Management Objects to set Event Message, Event Handler (default set by SAP) or Event Handler, Event Message.

3. Complete residence time to Define Archiving Sequence for SAP Event Management Objects a) Residence Times for Event Handler Archiving b) Residence Times for Event Message Archiving 1 c) Residence Times for Event Message Archiving 2 (set EvtMsg Res.Time equal to 0)

4. a) Execute tcode SARA -> Enter SAPTRX_EH -> Select Preproc -> Select Maintain to create new variant -> execute -> Enter archiving event handlers and other details, Further selection criteria, and processing Options as "Test" in dev and QA system then SAVE.  Report Program /SAPTRX/ARCHIVE_EH_PREPROCESS


b) Go to back first screen on SAPTRX_EH -> follow same steps what you have done.  Program /SAPTRX/ARCHIVE_EH_WRITE.


You need to follow same steps for SAPTRX_EVM.

If you want to check which table are archived, then click Database Table on Application Bar in once you entered Archiving object in Tcode SARA.

Please do this first in Dev or QA system with few event handlers.

Regards


GGOPII

Former Member
0 Kudos

Arun is an expert now in EM space and he might not need this level of spoon feeding

Have been watching his various threads he seems to know his stuff except for few pointers here or there from experts.

@Arun, Sorry to hijack the thread with non-sense/unrelated stuff. Why don't you start contributing in EM space. You seem to have worked or working for various EM projects covering broad areas especially in TM-EM ( one of the very few ). I believe the real TM-EM consultants with strong EM expertise based on number of projects experience stopped contributing completely for some reason even though they follow this group.

Former Member
0 Kudos

Hi Arun,

Check this consulting SAP OSS note 1350818 - Consulting note for archiving configuration for Display archived data on the Web interface, if you are also looking.

Regards

GGOPII

arun_yesodharan
Active Participant
0 Kudos

Hi Gopi,

   Thanks for the explanation, i will check the note as well.I guess i would be able to carry out the configuration without any issues.

Regards,

Arun

arun_yesodharan
Active Participant
0 Kudos

Hi Vishnu,

   I would take your advice and try to contribute towards EM. I am new to both TM/EM thats the reason why i require guidance & help from experts to solve various queries.

Thanks,

Arun

former_member190756
Active Contributor
0 Kudos

Hi Arun,

if you have access to the Ramp Up Material for EM in service.sap.com you could find a detailed description in the Section for EM 7.0 EhP 1 where the new archiving was introduced.

Best regards,

Steffen

arun_yesodharan
Active Participant
former_member190756
Active Contributor
0 Kudos

Hi Arun,

no. It's under service.sap.com/rkt-scm.

Then SAP Business Suite - SAP SCM -  SCM 7.0 EhP 1.

I will check if we could also publish the material in SCN.

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi Steffen,

  The link under SAP Business Suite - SAP SCM -  SCM 7.0 EhP 1. is inactive.Can only access SAP Business Suite - SAP SCM -  SCM 7.0 EhP 2 & 3.

Regards,

Arun

Former Member
0 Kudos

Hi Arun,

1. You can check here SAP EM 9.2 OKP

https://websmp110.sap-ag.de/~form/handler?_APP=00200682500000002672&_EVENT=DISPLAY&_SCENARIO=0110003...

2. SAP SCM Event Management 7.0 - https://websmp110.sap-ag.de/~iron/fm/011000358700001505862008E/002007974700005399512012WRK2?TMP=1454...

I couldn't find new archiving function in RKT.

Regards


GGOPII

former_member190756
Active Contributor
0 Kudos

It is available as written under SCM 7.0 EhP 1:

https://websmp110.sap-ag.de/~iron/fm/011000358700000481232010E/002007974700005369612011WRK2?TMP=1454...

Best regards,

Steffen

Answers (4)

Answers (4)

arun_yesodharan
Active Participant
0 Kudos

Hi ,

@ GOPI : Changing the residence time doesnt help.Selection is exactly same for preprocessing & write.

@ Steffen: No the PreProcessing was run using the test mode itself & write was also run using the test mode.

Also there are no entries with EH_ARCHIVED in table /SAPTRX/EH_HDR

former_member190756
Active Contributor
0 Kudos

Hi Arun,

in test mode nothing is changed. You only see what would be changed.

If you use Production mode the EH will be changed to EH_ARCHIVED and be selected by the Write program.

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi Steffen,

  Thanks Steffen , it worked. Can you pls share your view on Selection parameter for EVM WRITE.

What selection shall i keep so that it archives as soon as EHs are archived.

former_member190756
Active Contributor
0 Kudos

Hi Arun,

there is a Badi available.

Example implementation:

/SAPTRX/ARC_EVM_CHECK

It checks if EH for the Message is already archived.

You could create an implementation for your needs.

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi ,

  As per client request we need to archive the EHs that have a residence time of 120 days- 4 Months.

I had Set the Residence time for EH as 120 Days, Residence time for EVM 1 as 120 Days & Residence time for EVM 2 as 120 Days.

And execute the EH preprocess & eh write . And if i schedule the EVM WRITE with a event date range & event message date range of last 2 months .Will it be beneficial?

It may not specifically archive all the EVM for that EH as the event date of 2 months would not cover all the events.

  I am actually looking for a selection parameter which can efficiently archive max EVMs without any BADI implementation.

Any expert advises?

former_member190756
Active Contributor
0 Kudos

Hi Arun,

if you just assign the standard implementation of the BADI your approach should work.

It would the archive only messages that have EHs already archived.

If some messages stay longer in the system this does not influence anything as the EH is already archived. The messages will then be covered by the next EVM archiving.

By not assigning the BADI implementation you could archive messages for still existing EHs. In this case you would need Archive Display configuration otherwise a user would not see the archived events.

Best regards,

Steffen

Former Member
0 Kudos

HI Arun,

Yes, you are right we couldn't justify that all expected events will come in 120 days.  If you look at my previous suggestion that you have to trigger the event handler deactivate activity when the last event message arrives for an event handler.

Even if you make your residence time 120 days and unless you deactivate the event handler it will not archive the event handlers and event messages those are more than 120 days and event handler stay in database and receives event message until you deactivate and archive.

Data range is beneficial where you want to restrict and select data for particular date ranges based on event date and time.

After you have done all configurations, just run these reports as one time first because it run longer for first time and then schedule every four hours.

Regards


GGOPII

arun_yesodharan
Active Participant
0 Kudos

Hi Steffen,

  I didnt understand your sentence  "By not assigning the BADI implementation you could archive messages for still existing EHs. "

If my archiving sequence is Event Handler & then Event Message.Ideally the system should not archive the EVM for EHs that has not been deactivated.

So i understand that it will only archive the EVMs for which the EHs are already archived.This is a pre-requisite for archiving right?

Why does this require a BADI activation?

former_member190756
Active Contributor
0 Kudos

Hi Arun,

this is a missunderstanding. There is no automatic check for the sequence.

This can only be done by using the BADI implementation.

The delivered implementation just does this check and prevents you from archiving messages for still non-archived EHs. If you need additional check you would have to create your own implementation.

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi All,

  I was confused about the archival write & archival delete process.As i understand the archival write will create a archival file with all relevant information in a compressed form.

Afterwards ,the event handler is still visible in the /SAPTRX/EH_LIST.Is this a standard behavior?

Also what exactly is the purpose of archive delete step? why should we require to archive & then delete.??

former_member190756
Active Contributor
0 Kudos

Hi Arun,

this is the normal procedure in SAP archiving.

First the data is written in an archive file. Afterwards the data is deleted based on the data from this file.

Main reason is that you then have the guarantee that only correctly archived data is deleted from the database. If there were any problem during archiving your data is not destroyed.

Best regards,

Steffen

former_member190756
Active Contributor
0 Kudos

We have now published a guide who describes the EM Archiving:

arun_yesodharan
Active Participant
0 Kudos

Hi All,

  When i execute the ./SAPTRX/ARCHIVE_EH_PREPROCESS report i get the following entries:

while at the same time when i execute /SAPTRX/ARCHIVE_EH_WRITE i get error as such :


The selection variant for both the program have same selection parameter.Pls help!!

Also what should be the ideal selection parameter for the /SAPTRX/ARCHIVE_EVM_WRITE. As there is no deactivation date for selection.How to set the selection as only event messages gets archived for relevant EH's

Former Member
0 Kudos

Hi Arun,

1. The second screen shot not error it is throws information that "No Archiving -relevant data found for selection criteria".  It tells that it is not suffice the selection criteria on the report /SAPTRX/ARCHIVE_EH_WRITE.

2. Go to the above report and check selection screen of the report.

3. Go to residence time and change to 1 day instead of 0 and check (this may not be issue but please check this also)

The below link gives you how you can check the status of event handler on each stage archiving.

Overview of Possible Statuses of an Event Handler - Data Archiving - SAP Library

Regards


GGOPII

former_member190756
Active Contributor
0 Kudos

Hi Arun,

did you use Production Variant in Preprocessing?

Are the EHs having the flag EH_ARCHIVED in table /SAPTRX/EH_HDR as true?

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi All,

  I have configured the archiving process based on objects SAPTRX_EH & SAPTRX_EVM.Thanks to all.

Kindly confirm the sequence i am using:

1.Deactivate the EH as per rule set.

2. Scheduling the following report in sequence in every 4 hrs:

                                                          a./SAPTRX/ARCHIVE_EH_PREPROCESS

                                                          b./SAPTRX/ARCHIVE_EH_WRITE

                                                          c./SAPTRX/ARCHIVE_EVM_WRITE

former_member190756
Active Contributor
0 Kudos

Hi Arun,

afterwards you also need to schedule the according deletion jobs.

If possible you should use transaction SARA to do it.

Best regards,

Steffen

former_member190756
Active Contributor
0 Kudos

Hi Arun,

the parameter is defined here:

/n/saptrx/restm

-> Auto Archive Parameter for EH

Name and the days after the EH can be archived.

What is your exact scenario?

The auto archive activity should only be used if you have a low volume as you cannot parallelize the archiving job.

Best regards,

Steffen

arun_yesodharan
Active Participant
0 Kudos

Hi Steffen,

   In my case i need to archive the event handlers in every 4 hours from the time of their deactivation.

Also the volume of data will be huge.

Do you suggest that i just deactivate the event handler via the rule set & separately run the archive report to archive the deactivated Event Handlers?

Former Member
0 Kudos

Hi Arun,

Yes, I would personally prefer to deactivate individual event handler through ruleset when the last event message is reported in the system.  Then, you can use archiving objects /SAPTRX/A0 and /SAPTRX/A1 to schedule every 4 hours.

Regards

GGOPII

arun_yesodharan
Active Participant
0 Kudos

Hi Gopi,

Can you pls elaborate how can i schedule the achiving objects /SAPTRX/A0 and /SAPTRX/A1 to schedule every 4 hours.

Do i have to execute the report -/SAPTRX/ARCHIVE_A0_WRITE?


Also if i archive the event handler data will it automatically archive its event messages and other dependent data?

Do you suggest to use /SAPTRX/SAPTRX_EH archive object or /SAPTRX/A0 ?

former_member190756
Active Contributor
0 Kudos

Hi Arun,

yes this would be the standard way.

Best regards,

Steffen

former_member190756
Active Contributor
0 Kudos

Hi Arun,

you should use SAPTRX_EH. It supports residence times of 0 days. That would fit to your need to archive EH 4 hrs after deactivation.

Best regards,

Steffen

Former Member
0 Kudos

Hi Arun,

Yes, you can schedule a report /SAPTRX/ARCHIVE_A0_WRITE.

SAP EM delivered three reports for Archiving and Deletion.  You can find in following link Archiving in SAP Event Management - SAP Library

There are three functions which are Write, Delete and Reload in /SAPTRX/A0 - Event Handler and /SAPTRX/A1 Event Message or you can use SAPTRX_EH - Archiving Event Handlers and SAPTRX_EVM -Archiving Event Messages.

Check this following link for archiving sequence Archiving Sequence Event Handler and Event Message - Archiving in SAP Event Management - SAP Library

Regards


GGOPII

arun_yesodharan
Active Participant
0 Kudos

Hi Steffen,

  In that case if i maintain residence period as blank , it will fetch as 0 residence time for archive object SAPTRX_EH or will it take as 100 days;as mentioned in standard documentation?

former_member190756
Active Contributor
0 Kudos

Yes. If you enter 0 it will get blank and later it should be interpreted as 0 days.

Best regards,

Steffen