SAP PI/PO JAVA Stack Persistence

Int4 IFTT uses SAP PI/PO persistence to read messages before and after processing. Therefore, for every tested interface, depending on the test type, particular settings must be made to ensure that SAP PI/PO stores adequate payloads.
In this article, the SAP PO global and individual settings will be explained together with configuration in Int4 IFTT.  

Required persistence settings

Staging:

Receiver Determination (Step MS) ← default SAP PO setting

Logging:

Message preparation (Step BI) and Mapping (step AM)

Set global settings

Open SAP NetWeaver Adminstrator.

Select tab Configuration → Infrastructure → Java System Properties.

To specify message logging or staging, in tab Services search for XPI Adapter: XI.

On the Properties tab, search for the below parameters and set the following values in the customer calculated value field:

xiadapter.stage.conf : MS=3  

xiadapter.logger.conf : BI=3,AM=3 

Configuring global logging and staging in production environments should take into consideration the impact on the database size. This can also be done temporarily during test case provisioning.

Set settings locally for tested interfaces (if global configuration is not as above)

Alternatively, the settings may be applied for each tested ICO separately. For this purpose, set the Advanced Settings tab:

 

External resources

Message logging from help.sap.com

Message Staging and Logging Options in Advanced Adapter Engine of PI/PO 7.3x/7.4 by Vadim Klimov

Configuring Message Retention help.sap.com

Persist duration time at the Adapter Engine wiki.scn.sap.com

Tables that keep message related data in the database of PI/PO system by Tina You

Message persistence - Process Integration wiki.scn.sap.com

Additional clarification



In SAP PI/PO, there are two types of storing the persistence:

Type

Description

Type

Description

Staging

There are following staging levels:

After completion of each staging step, the message version in the message log is increased.
In addition, if an error will occur, the message will not be rejected by the sender. It will remain for reprocessing in SAP PI/PO.
In the example, the staging is set to BI, MS, and AM:

Also, depending on the staging, the message in the log is displayed with a different interface & namespace. It is always presented with the latest staging value. In the example, the sender interface was PurchaseOrder_Out; the receiver interface is ORDERS.ORDERS05 so with staging set to AM, the message is displayed in the log as ORDERS05:

Suppose Int4 IFTT should download message content from staging. In that case, the parameter value from the respective message version should be a Version number like 0,1,2 or -1. The -1 is a value that means the latest staging.

SAP does not recommend setting any other staging level than MS



Logging

Logging does not increase the version. It also does not affect the transactional processing of the message. Suppose an error will occur on the logging step. The message will be rejected to the sender or will remain on the previous staging step.

Below example presents staging = MS and logging = AM:

In PI monitor, the interface contains sender name (as receiver determination, not mapping was last staging level):

Suppose Int4 IFTT should download message content from logging. In that case, the parameter value from the respective message version should be a text from a Caption like AM. Please note that if the version is from staging or logging is visible in the Status field. Version from logging contains Log version status.

Int4 IFTT needs to have access to a message before processing and messages after processing to create a test case.

Settings for accessing input messages (message before processing)

This setting is required only for interfaces that use adapter modules. 

In most scenarios, where messages are delivered from the communication channel to the integration engine without modifications, the default Int4 IFTT settings will always capture the message before processing as it was delivered from the sender system. the default settings will always capture the first message of the message version 0.

In cases where the communication channel modifies the message using adapter modules, there is a need to store a custom logged version before such modification. The SAP standard adapter module MessageLoggerBean must be added as the first adapter module. Then the caption of the custom log must be added as PIMSGVERBI (Message version before processing) in additional parameters

Settings for accessing output messages (message after processing)

This setting is required only for interfaces that use adapter modules. 
When the receiver communication channel modifies the message using adapter modules, there is a need to store a custom logged version after such modification. The SAP standard adapter module MessageLoggerBean must be added as a last adapter module. Then the caption of the custom log must be added as PIMSGVERSN (Message version after processing) in additional parameters

Special procedure, for systems where staging is set to AM or VO.
This setting is not recommended.

Suppose staging after mapping is activated (staging AM or VO), and payload after mapping will be fetched from it. The global parameter PIMSGVERMA should be set to -1 in technical settings. The default setting AM takes payload from logging. 

The message is displayed in SAP PI/PO monitoring with the receiver interface signature in such a case. It must be reflected in Int4 IFTT configuration:

a) to configure PI Message Selector for PI Unit testing and PI inbound, the receiver interface must be provided in additional parameters dedicated for Message Selector:

Additional Parameter Name

Technical name

Value as in the above example

Additional Parameter Name

Technical name

Value as in the above example

Message Search - Interface Name

PISRCH_IFN

ORDERS.ORDERS05

Message Search – Namespace

PISRCH_NS

urn:sap-com:document:sap:idoc:messages

b) for outbound PI testing, the receiver interface should be set in the Configuration Object header

© 2017 - 2022 Int4 AG All rights reserved