Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
kevin_wilson2
Contributor

You have the option to archive and delete Event Handlers (EH) or Event Handler Sets (EHS) as well as simply to delete them.

General Notes

  • If you have the Web Communication layer (WCL) logging manager configured to collect a lot of detail on transactions then you will need to review archiving in this area as well
  • Tables that you need to watch in your solution as they can grow large depending on your rules, parameters (how many you have) and expected events.
EH Tables to monitor:
  1. /SAPTRX/EH_INFO (Info Parameters)
  2. /SAPTRX/EH_CNTRL (Control Parameters)
  3. /SAPTRX/EH_EXPE (Expected events)
  4. /SAPTRX/EH_STHST (Status history)
  5. /SAPTRX/EH_TASK (Tasks performed if logging is on)
For Event Message (EVM) Tables monitor:
  1. /SAPTRX/EVM_AFB (Attachment contents of binary file)
  2. /SAPTRX/EVM_AFC (Attachment contents)
  3. /SAPTRX/EH_EVMSG (Event Message Header)

Archiving

Archiving Notes

  • If an EH is part of an EHS and you wish to archive the EH then you have to deactivate and archive the EHS
  • You cannot archive an individual event message.
  • To automatically archive EH or EHS define an activity in a rule set that is triggered by a received event (e.g. ARCHIVE). This activity witll deactivate the EH and archive it. You then need to make sure that the ARCHIVE message is sent to SAP EM when the appropriate time has come to archive the EH. Another way is to have an expected event defined when the EH is created and when the date becomes overdue the Overdue monitor processes a similar activity to the one described above.
  • Archiving objects:
for EH /SAPTRX/A0
for EVM /SAPTRX/A1
  • ISSUE: The deletion program runs too slowly

The size of the archive file affects the total archiving runtime. A deletion program that processes a very large archive file requires significantly more time than several deletion programs that divide up the data and process them as separate smaller archive files. Be aware that too many deletion programs running in parallel will have an adverse effect as capacity overload sets in.

Solution: There are 3 fields that significantly influence the performance of the deletion program
- 2 fields for the specification of the size of an archive file
      • Maximum size in MB
      • Maximum Number of Data Objects
- COMMIT counter – When the number of data objects in the COMMIT counter is reached, a COMMIT is executed in the database.
(NB: Make sure that you don’t send too many deletion instructions to the database before executing a commit. There is a limit as to how many deletes it can have in it’s rollback segments)
The max Commit counter = Size of rollback segment / size of the largest data object.
  • ISSUE: The deletion program terminates with DBIF_RSQL_SQL_ERROR.
Cause: The COMMIT counter for the deletion program is set too high.
Solution: prior to 46: In SARA change the commit counter value to less for the deletion program (10 is recommended unless you have very large data objects in which case 1 is more appropriate).
After 4.6: In AOBJ and selecting your relevant archiving object proceed as described above.

Once off Configuration

  1. Specify the time intervals (residence times) for the archiving objects. In the IMG go to Event Management -> Archive or Delete Event Handlers and Event Messages -> Define Residence Times for Archiving or Deleting
  2. Set the residence times for EH archiving. You can specify a retention period based on the date that the EH was deactivated or when it was created. E.g. This allows you to archive all EHs that are inactive and are at least 3 months old

Archiving process

 

  1. Set Expected event ARCHIVE for 3 days after the end of the process is achieved
  2. The overdue monitor runs and checks if ARCHIVE is overdue. If it is continue as follows:
  a. Send Archive flag to BW
  b. Deactivate the EH or EHS
  c. Archive the EH

Deleting

You can delete an EH in 1 of the following ways:

  1. Deleting the Application Object (AO) in the Application System (AS) will delete the corresponding EH in SAP EM
  2. Specifying a rule in the rule set (described below)
  3. Executing a deletion report (mainly used to remove test data)
  a. /SAPTRX/DELETE_EH – Does not archive, just deletes the EH. This report can also delete inactive EHs belonging to an EHS
  b. /SAPTRX/DELETE_EVMSG – Does not archive, just deletes the messages

Once off Configuration

  1. Specify the time intervals (residence times) for the archiving objects. In the IMG go to Event Management -> Archive or Delete Event Handlers and Event Messages -> Define Residence Times for Archiving or Deleting
  2. Set the residence times for EH deletion.  

Deletion process

 

  1. Set Expected event ARCHIVE for 3 days after the end of the process is achieved
  2. The overdue monitor runs and checks if ARCHIVE is overdue. If it is continue as follows:

  a. Send Archive flag to BW
  b. Deactivate the EH or EHS
  c. Archive the EH
  d. Delete the EH