Additional Blogs by SAP
Showing results for 
Search instead for 
Did you mean: 
0 Kudos


Archiving and deletion is the key housekeeping task for PI operation. To keep database in a controlable size, the processed messages in PI have to be removed from the message tables in database periodically. These tables are called PI fast-growing tables, such as SXMSPMAST, SXMSCLUR, SXMSCLUP. Due to some company policy, not all the messages can be deleted directly. Instead, the messages have to be archived for future reference. In another case the cancelled messages have to be archived as well.

When defining this archiving procedure, some customers find that the archiving job never complete. As a result the messages keep in database and the system runs into disk shortage after a certain time. This could due to various reasons. In this article, we assume there is a quite new PI customer who has limited knowledge about PI archiving and deletion. And this customer realized in the job log that no archiving location defined. In this case, the customer has to define the Archive Info Structure first.

Scenario Description:

You want to archive the PI messages persisted in database ABAP schema. You want to store the archives in a file system. You want to define a customized the file location and file name. Afterwards you can define the retention period and schedule the archiving jobs.

General Steps:

You need to define the archive objects. Then define the logical file path and combined with physical file path. After that the logical file name has to be defined and assign to the logical file path and archive object. In the same time define the physical file name referred to the logical file name. Finally you can active the Archive Info Structure.

Detail Steps:

You can use tx SPRO to create your own project. But here I go to SARA directly.

Select Archiving Object BC_XMB. It is the default object for PI XML message.

Select "Technical Settings" under "Archiving Object-Specific Customizing".

Define the logical file name for archiving object. We use the default file name "ARCHIVE_DATA_FILE". The archive file size can also be defined. This is to avoid the single file become too large.

Goto "Cross-Client File Names/Paths" under "Basis Customizing".

We use the default logical file path "ARCHIVE_INTERFACE" here.

Specify the physical file path. This is very important. Make sure there is enough permission and space for the file path. Use <FILENAME> as a place holder.

Assign the logical file name to the logical file path. The physical file name can be customized as a self-explanation format. The default physical file name is comprised with several parameters:

<PARAM1> : Two-character application abbreviation for classifying the archive files in the system. Default is "BC" in our case.
<PARAM2> :  Single-character alphanumeric code (0-9, A-Z).
<PARAM3> :  This parameter is filled with the name of the archiving object at runtime. Default is "BC_XMB" in our case.
<DATE> : Date in SY-DATUM.
<TIME>  : Time in SY-UZEIT.

Check the settings in "Technical Settings" under "Cross-Archiving Object Customizing". The Max. Duration Hours and Max. MB per Session can be used for interrupution in case a write session running too long time.

The next step is to active the Archive Info Structure. Goto the "Information System" and select "Customizing".

Select "SAP_BC_XMB1" as the XMB Archiving Info Structure. Be aware that the default XMB Archiving Info Structure "SAP_BC_XMB" may cause some problem during deletion run of the archiving job. We need to use "SAP_BC_XMB1" instead. Details refer to SAP Note 943027 - XI Archiving Error: Records not inserted in info structure.

Till now we already finished the set up of the Archive Info Structure. The next steps is to define the retention period for messages and schedule archiving job. For these steps you can refer to SAP Note 872388 - Troubleshooting Archiving and Deletion in PI.