Skip to Content
Author's profile photo Deepak Shah

Archiving & Deletion of messages in PI – Part 1

      This blog series will provide both an introduction to the key concepts of SAP NetWeaver Process Integration XML message archiving and deletion and overview of the tasks, reports that comes into play in concept of Archiving and Deleting of XML messages. These concepts apply to SAP NetWeaver Process Integration 3.0/ 7.0/ 7.10.

 

INTRODUCTION:

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 and not that action is already done.

 

Deletion: 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

  • are no longer in retention period
  • are flagged for deletion
  • have appropriate messages state
  • 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

  • are no longer in retention period
  • are flagged for Archiving
  • have appropriate messages state
  • 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.

 

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. 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.

 

5. In general only messages with a final status can be deleted. Messages in error cannot 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.

 

6. 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.

 

7. You require two archiving jobs to archive messages:

  • A job to write the messages to the archive
  • A job to delete the archived message

8. Only one job is required to delete messages.

 

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

 

These points will be explained in remaining parts of this Blog series available at following links.

Archiving & Deletion of messages in PI – Part 2

Archiving & Deletion of messages in PI – Part 3

Archiving & Deletion of messages in PI – Part 4

Archiving & Deletion of messages in PI – Part 5

Archiving & Deletion of messages in PI – Part 6

Assigned Tags

      21 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michal Krawczyk
      Michal Krawczyk
      hi,

      the links are not working (for the rest of the blog series) - please correct them

      Regards,
      Michal Krawczyk

      Author's profile photo Deepak Shah
      Deepak Shah
      Blog Post Author
      Thanks Michal for spotting the error.

      I have made necessary correction to the links.

      Regards,
      Deepak.

      Author's profile photo Daniel Graversen
      Daniel Graversen
      Hi,

      How that is a lot of work you have put into explain this interesting aspect that many people don't have a clue about.

      Author's profile photo Deepak Shah
      Deepak Shah
      Blog Post Author
      Thanks Daniel,

      Yes indeed, lot of work went into understanding these concept and apply them in our PI system.

      Regards,
      Deepak.

      Author's profile photo Raja Sekhar Reddy
      Raja Sekhar Reddy
      really gr8 blogs....thanks Alot...
      Author's profile photo Deepak Shah
      Deepak Shah
      Blog Post Author
      Thanks Raja,

      - Deepak.

      Author's profile photo Former Member
      Former Member
      I'm not able to access the link for Part 6.  I was able for the others though.
      Author's profile photo Deepak Shah
      Deepak Shah
      Blog Post Author
      Hi Jennifer,

      Please check again. The link is working.

      Author's profile photo Former Member
      Former Member
      Yes, I'm able to access it now.  Thanks.
      Author's profile photo Former Member
      Former Member
      I appriciate your work but do not you think your blog content is similar to the wiki that was already in place...

      http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=147266890

      Regards
      Chandra

      Author's profile photo Former Member
      Former Member
      The screenshots are not visible.  Right click > show image returns URL not found.

      Dave Frisch

      Author's profile photo Deepak Shah
      Deepak Shah
      Blog Post Author
      Thanks Dave for noticing it.
      I have made necessary corrections.

      Regards,
      Deepak.

      Author's profile photo Former Member
      Former Member
      Thanks Deepak.  I can now see the screenshots.

      Dave

      Author's profile photo Annapureddy Kasi viswanath
      Annapureddy Kasi viswanath

      Informative

      Author's profile photo Annapureddy Kasi viswanath
      Annapureddy Kasi viswanath

      How can we reprocess the failed jobs let us say SAP_SRT_METERING_REORG.

      Please suggest

      Author's profile photo Rakesh Duggal
      Rakesh Duggal

      Hi Deepak,

      Appreciate your work, really got much needed information from your blogs. Keep the work going we are learning from you.

      Regards,

      Rakesh Duggal

      Author's profile photo Former Member
      Former Member

      Great blogs on archiving and deletion..Appreciate your hard work..Keep writing such informative blogs.

      Author's profile photo Former Member
      Former Member

      Really appreciable work. 🙂

      Author's profile photo Former Member
      Former Member

      Nice work!

      Author's profile photo Vineet Ruhela
      Vineet Ruhela

      very nice Blog

      Author's profile photo Former Member
      Former Member

      A nice informative blog. Good work !!!