Archiving and Deletion in PI

By Deepak Shah, Capgemini

INTRODUCTION:

Applies To: SAP NetWeaver Process Integration 3.0/ 7.0/ 7.10 

Summary: This document provides both an introduction to the key concepts of SAP NetWeaver Process Integration XML message archive and delete and overview of the tasks, reports that comes into play in concept of Archiving and Deleting of XML messages.

Archiving & Deleting PI XML messages Process 

By and large Archiving applies to asynchronous (EO and EOIO) messages only on the ABAP and JAVA side. SXMSPMAST is the master table that holds the key information about each of the messages going through the Integration engine. The data is persisted in this table based on the retention period defined for asynchronous and synchronous messages. 

If a message enters the Integration Server the field ITFACTION of SXMSPMAST table is set to INIT. Then the interface is checked for the action to take, if it is listed as an interface for archiving, the field ITFACTION is changed to ARCH. Otherwise it changes to DEL 

*Note: ITFACTION filed value in SXMBPMAST table that describes what action applies to the messages but does not mean that that the action is already took place. So it's only action status info not that action already done.

Deleting: All messages with ITFACTION=DEL will be deleted by report RSXMB_DELETE_MESSAGES as soon as message processing is complete (message status is final) and adapter status allows deletion. The Delete job deletes only Payload. 

Message are deleted from PI persistency layer if they

                     I.      are no longer in retention period

                   II.      are flagged for deletion

                  III.      have appropriate messages state

                IV.      have appropriate adapter state

Archiving: All messages with ITFACTION=ARCH have to be archived by report RSXMB_ARCHIVE_MESSAGES first and will then be deleted by report RSXMB_DELETE_ARCHIVED_MESSAGES (similar name as RSXMB_DELETE_MESSAGES, but totally different messages are handled!) 

Message are Archived from PI persistency layer if they

                     I.      are no longer in retention period

                   II.      are flagged for Archiving

                  III.      have appropriate messages state

                IV.      have appropriate adapter state

Archiving XML messages process involves two steps before XML messages are deleted, during first step messages are read from PI persistence layer and stored to archive files and in the second step reads the previously written message from archiving files in order to verify the data integrity. Finally messages are deleted from PI persistence layer.

Looking at archiving and deletion in PI the following XI specific runtime items have to be considered:  

  • XML messages and history entries in the ABAP Integration Engine

  • XML messages in the Java Adapter Framework

  • Workitems in the Business Process Engine (BPE)

  • Performance data collected in the Integration Engine  

Below are few points to be noted with respect to Archiving & Deletion in PI:  

1. By default only asynchronous messages (EO and EOIO) will be persisted on the ABAP and Java side.  

2. Synchronous messages (Best Effort) will only be persisted if an error occurs during processing or if the parameter LOGGING_SYNC (ABAP only) is set. Setting LOGGING_SYNC is not recommended to reduce processing overhead.  

3. Also on applications systems connected to XI via ABAP proxies the messages will get persisted and archiving/deletion has to be configured.  

4. Performance data on the other hand are persisted for both, synchronous and asynchronous, messages (table SXMSPFRAWH).  

5. Per default no deletion & archiving is carried out in the Integration Engine and BPE. Therefore manual interaction is necessary by the administrator of the XI system to setup a suitable deletion or archiving strategy.  

6. In general only messages with a final status can be deleted. Messages in error can not be deleted and have to be cancelled first. While in the Integration Engine (ABAP) cancelled messages have to be archived they will be per default be deleted directly in the Adapter Framework.  

7. For the archiving, different actions need to be taken, depending on the type of object you would like to archive. Messages that have been processed correctly are deleted by default. You must archive all messages that are not to be deleted. To archive messages, you must first define their corresponding interfaces and then schedule the archiving.  

8. You require two archiving jobs to archive messages:

  • A job to write the messages to the archive

  • A job to delete the archived message

9. Only one job is required to delete messages.

Archiving of Messages:  

a) To archive interfaces in the Integration Server, the interfaces have to be defined for archiving via transaction SXMB_ADM ->

"Define Interfaces for Archiving and Retention Periods".    

As and when any new interfaces are developed, they will have to be added to Archiving list.

Select “Multiple Selection” buttons to add interface for archiving as shown below.  

Once you select all the interfaces and click F8, all the interfaces will be added to archiving list as shown below.

Now we Define Retention Period for these Interfaces as shown  

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image