Archiving Sequence Event Message and Event Handler 
This process represents an archiving sequence. You can use this process if you do not want to keep event message data for as long as possible in SAP Event Management.
If you archive event messages as soon as possible, the database volume is reduced.
You begin the archiving process by archiving the event messages. In the write program the system writes all event messages with a positive residence time check into the archive. In a second step, you archive all inactive event handlers with a positive residence time check.
For more information, see Data Archiving for High Data Volumes.
You deactivate an event handler by doing one of the following:
Using a rule activity and a rule condition
If no incoming event message fulfills the rule condition, SAP Event Management does not deactivate the related event handlers and they remain in the system indefinitely.
Scheduling the report /SAPTRX/ARCHIVE_EH_DEACTIVATE
To avoid data overflow, you can use this report to deactivate event handlers manually.
You set up the write and delete program for archiving event messages in the initial screen of the Archive Administration (transaction SARA).
The write program for the event message archive object (SAPTRX_EVM) checks if the residence time for the event message archiving object is positive. If it is positive, the write program writes all event messages into the archive. The system does not check if the corresponding event handler is already archived.
The delete program for the event message archiving object deletes the archived event messages from application tables and builds up the archive index table according to the archive information structures maintained for the archiving object.
You set up the preprocessing, write, and delete program for archiving event handlers in the initial screen of the Archive Administration (transaction SARA).
The preprocessing program for the event handler archiving object (SAPTRX_EH) checks for inactive event handlers with a positive residence time check. The program marks these event handlers as archived. You can no longer change existing data. For example, you cannot update application object data or process a related event message. This status ensures there is no data inconsistency between archived data and application data.
Logically the event handler has been archived, but technically it resides in application tables.
The write program for the event handler archiving object selects all logically archived event handlers and writes them into the archive.
The delete program for the event handler archiving object deletes the archived event handlers from application tables and builds up the archive index table according to the archive information structures maintained for the archiving object.
The system has archived all event messages with a positive residence time check. It also has archived all event handlers that are set to inactive and have a positive residence time check.