Process Integration Channel

PI Messages

The message flow via SAP PI can be very complex, passing different components (such as adapter engines with the module processor and messaging system, integration engines with their pipeline processing including Java & ABAP proxies, business process engine etc.) and using different adapter types (such as File-, JMS-, IDoc-, RNIF-adapters etc.).

The message flow via SAP PI can be very complex, passing different components (such as adapter engines with the module processor and messaging system, integration engines with their pipeline processing including Java & ABAP proxies, business process engine etc.) and using different adapter types (such as File-, JMS-, IDoc-, RNIF-adapters etc.).

Messages sent to SAP PI can come from various sources in the sender system and can use several different interface techniques. Depending on the interface technique used either the message is sent to the Integration Server directly, or the Java-based Adapter Engine receives the message from the sending system and converts it into an XML format.The XML message is then forwarded to the ABAP-based Integration Server where messages are processed or forwarded to the Business Process Engine (e.g. for merging of messages). From the Integration Server the message is sent to the receiver system. Depending on the document type expected by the receiver system, the message may again pass the Adapter Engine.

This complexity makes it difficult to track and monitor the flow of a specific message across SAP PI. Automated monitoring of messages is essential to ensure the error-free operation of SAP Process Integration (SAP PI) and each integration scenario. Within SAP Solution Manager, SAP PI message monitoring can be either performed on the level of single interfaces using the Interface Channel Monitoring tool, or on a more aggregated level via the Technical Monitoring Work Center's functionality “PI Monitoring”. Especially if used in business process context, PI message monitoring in Interface Channel Monitoring clearly focuses on business-critical PI interfaces. It aims at monitoring the PI message processing for error and backlog situations, hence supporting an end-to-end like monitoring of the whole business process.

 

PI Channels

In order to define the communication details for a SAP PI message so-called communication channels are used in SAP PI. Both the inbound and outbound communication is maintained in the channel definition, including the adapter used for the particular interface. This way the right sender and receiver components are available during runtime of a message. Communication channels can have different statuses which influences the runtime of the PI message, too. If a J2SE adapter engine is used, J2SE adapters are used instead of communication channels to define the inbound and outbound processing.

The status of the communication channels can be retrieved from the PI system using the SAP NetWeaver Administrator tool “Communication Channel Monitor”.

If a communication channel or J2SE adapter is in an inactive or erroneous state the PI messages of the particular interface cannot be processed (as the sender or receiver components cannot be determined). Thus it is essential to monitor the involved communication channels or J2SE adapters of a SAP PI interface with high frequency, to be notified about failures or unavailability in time.

Technical Prerequisites

The technical prerequisites depend on which of the monitoring templates you want to use.

Template Technical Prerequisistes
Process Integration (PI)

The following technical prerequisites have to be met in order to use this monitoring template:

  • Managed system has PI Basis release 7.11 SP06 or higher
  • PI Monitoring has to be set up for the domain in scope (Message Monitor, Channel Monitor)
Process Integration (PI – ABAP only)

The following technical prerequisites have to be met in order to use this monitoring template:

  • Managed system has PI Basis release 7.00 or higher
  • ST-A/PI in version 01R or higher is implemented on PI system
Process Integration (PI Channel) - obsolete

This monitoring template is obsolete with SAP Solution Manager 7.2, as we now make use of PI channel data collected by Solution Manager's PI Monitoring. The new metrics are part of monitoring template ‘Process Integration (PI)'.

The old metrics are still available in this monitoring template ‘Process Integration (PI Channel)', to safeguard existing configurations, but are marked as obsolete.

Available Monitoring Content

Monitoring Template: Process Integration (PI)

This template can be used for the monitoring of messages processed both in the ABAP and JAVA stack of PI.

Metric Name Description MAI Category Since SP

Number of cancelled PI messages

Measures the number of cancelled PI messages in the requested time frame.

Exceptions

7.1 SP12

Number of erroneous PI messages

Measures the number of erroneous PI messages in the requested time frame.

Exceptions

7.1 SP05

Number of intermediate PI messages

Measures the number of PI messages in an intermediate state in the requested time frame.

Performance

7.1 SP12

Number of successful PI messages

Measures the number of successful PI messages in the requested time frame.

Performance

7.1 SP05
Number of PI channels in critical activation status(1) This metric checks for PI channels in a specific activation state. Exception 7.2 SP03
Number of PI channels in critical channel status(1) This metric checks for PI channels in a specific channel state. Exception 7.2 SP03

Monitoring Template: Process Integration (PI – ABAP only)

This template can be used for the monitoring of messages which are processed in the ABAP stack only. It can check for single PI messages similar to standard monitoring transaction SXI_MONITOR.

Metric Name Description MAI Category Since SP

Number of critical PI Messages (ABAP only) (Delta)

Measures the number of suitable messages since the last run of the collector.

It is intended to be used for measuring messages in a critical status.

Exceptions

7.1 SP12

Number of critical PI Messages (ABAP only) (Total)

Measures the number of messages in the system within a specific status or status group 

for a certain amount of days. It is intended to be used for measuring messages in a critical status

Exceptions

 7.1 SP12

Number of uncritical PI Messages (ABAP only) (Delta)

Measures the number of suitable messages since the last run of the collector.

It is intended to be used for measuring messages in an uncritical status.

Performance

 7.1 SP12

Number of uncritical PI Messages (ABAP only) (Total)

Measures the number of messages in the system within a specific status or status group 

for a certain amount of days. It is intended to be used for measuring messages in an uncritical status

Performance

 7.1 SP12

Configuration

The Interface and Connection Monitoring setup can be accessed via SAP Solution Manager Configuration (SOLMAN_SETUP). 

To access the Integration Monitoring setup please go to SAP Solution Manager Configuration (SOLMAN_SETUP) → Application Operations → Integration Monitoring → Interface and Connections.

Note: If you didn't perform the infrastructure configuration yet, please follow the Interface and Connection Monitoring Setup with SAP Solution Manager 7.2.

Monitoring Template: Process Integration (PI)

When you create an IF channel of type "Process Integration (PI)" you have to select the PI Domain in the second step of the IF channel creation. For this PI Domain, the PI Monitoring setup has to be successfully executed.

Navigate to the step 'Define Scope'. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'Process Integration'
    • Monitoring Template: Select 'Process Integration (PI)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Select the PI domain in which the message transfer takes place from the drop-down list
  6. Source type:
    • Select 'Technical System'
    • If the source system is not on-premise please select 'External Service' if it is a cloud service or 'Unspecified Managed Object'.
  7. Source: Select the source system from the drop-down list or enter the name for the unspecified managed object.
  8. Target Type:
    • Select 'Technical System'
    • If the target system is not on-premise please select 'External Service' if it is a cloud service or 'Unspecified Managed Object'.
  9. Target: Select the target system from the drop-down list or enter the name for the unspecified managed object.
  10. There will be no measuring point to be selected as the messages are collected from the PI domain.
  11. Click Next.
  12. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information
    • Interface Name: The name of the interface
    • Sender namespace: The namespace of the source of the message
    • Sender interface: The interface of the source of the message
    • Sender party: The communication party of the source of the message
    • Sender component: The component of the source of the message
    • Receiver namespace: The namespace of the target of the message
    • Receiver interface: The interface of the target of the message
    • Receiver party: The communication party of the target of the message
    • Receiver component: The component of the target of the message
    • Timeframe (Expert field): Determines which messages are considered in the monitoring. You can use the following values:
      • H: Current hour
      • H-1: Last hour
      • H,H-1: Current + last hour
      • Time buckets [D] (daily), [W] (weekly),  [M] (monthly) and [Y] (yearly) are also available.

The values for the sender/receiver determination can be pulled from the input help of the fields. Please consider the following information, when using wildcards:

For a certain parameter, you can either fully specify the value or you can use placeholder "*" as selection criteria. In the latter case all combinations matching the selection criteria will be collected. If you leave a parameter value empty, the parameter will be ignored for selection. In case you would like to collect explicitly values which are empty, you have to specify them with "#".

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor.

  2. Enter Metric Parameters:

    • Metric: Number of PI channels in critical activation status
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • PI Party: If a party is maintained for the channel you can use it as a filter here
      • PI Service: The communication component of the channel
      • Channel name: The name of the channel
      • Activation Status (mandatory): Channel activation status. Select one value from the drop down field
    • Metric: Number of PI channels in critical channel status
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • PI Party: If a party is maintained for the channel you can use it as a filter here
      • PI Service: The communication component of the channel
      • Channel name: The name of the channel
      • Channel Status (mandatory): The current channel status. Select one value from the drop down field

You can maintain attributes as described in the Interface and Connection Monitoring Setup with SAP Solution Manager 7.2 on the tab 'Attributes'..

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • Only change the collection interval if you know what you do or if advised to do this by SAP.
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

 

Note: Reporting on Process Integration (PI) Channels

The data collected from PI for this channel is already aggregated data from PI. Aggregating this data again would lead to incorrect values and this has to be avoided.

The reporting functionality for PI messages is restricted to the last 24h. For custom time ranges over 24h no data will be displayed.

Monitoring Template: Process Integration (PI - ABAP only)

Please note that the metrics for this monitoring template are collected by a data collector in ST-A/PI. Hence the messages can only be collected on ABAP systems. To find information like sender and receiver determination for the messages you want to monitor, a good starting point is opening the message you want to monitor in transaction SXMB_MONI in the managed system.

Navigate to the step 'Define Scope'. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'Process Integration'
    • Monitoring Template: Select 'Process Integration (PI - ABAP only)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Source type:
    • Select 'Technical System'
    • If the source system is not on-premise please select 'External Service' if it is a cloud service or 'Unspecified Managed Object'.
  6. Source: Select the source system from the drop-down list or enter the name for the unspecified managed object.
  7. Target Type:
    • Select 'Technical System'
    • If the target system is not on-premise please select 'External Service' if it is a cloud service or 'Unspecified Managed Object'.
  8. Target: Select the target system from the drop-down list or enter the name for the unspecified managed object.
  9. The measuring point is selected automatically. Please note that for this template either the target or the source system must be an ABAP system! If both source and target are ABAP systems you can select the measuring point as necessary.
  10. If more than one client are connected for the on premise system please select the correct client for the monitoring
  11. Click Next.
  12. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information
    • Interface Name: The name of the interface
    • Sen. Comm. Party: The sender party agency
    • Sen. Service: The sender component
    • Sen. IF namespace: The sender interface namespace
    • Sen. IF name: The sender interface name
    • Rec. Comm. Party: The receiver party agency
    • Rec. Service: The receiver component
    • Rec. IF namespace: The receiver interface namespace
    • Rec. IF name: The receiver interface name
    • Number of messages: The number of messages restricts the number of messages being read from the database for each metric. The default value is 2000 (when no data is entered for this parameter). It is not recommended to exceed this value.
    • Minimum age (mins): prevents PI messages from being alerted unless they remain in the specified status longer than the time in minutes specified here. The parameter measures PI messages in an intermediate status which become critical only if they remain in this intermediate status too long. The time difference is measured against the creation time of the message, not the time when the previous status change took place.

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor.

  2. Enter Metric Parameters:

    • Metric: Number of critical / processed PI Messages (ABAP only) (Delta)
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • Status Group: The status group of the message. Please use the input help to select a status group
      • Status: Use this field if you want to monitor a specific status instead of a status group
      • Number of days (ini): Time window for which message will be read from the database for the first data collector run. If no value is entered, the default value of 30 days will be used. Only messages still persisted in the PI database can be selected.
    • Metric: Number of critical / processed PI Messages (ABAP only) (Total)
      • Parameter set name: You can enter a name for the parameter set to distinguish it if you have more than one
      • Status Group: The status group of the message. Please use the input help to select a status group
      • Status: Use this field if you want to monitor a specific status instead of a status group
      • Number of days (ini): Time window for which message will be read from the database with each data collector run. If no value is entered, the default value of 30 days will be used. Only messages still persisted in the PI database can be selected.

 

Performance Warning

For performance reasons it is not recommended to use the “Total Number” metrics for monitoring successfully processed messages. Furthermore, the “Total Number” metrics should only be scheduled very restrictively. A typical use case would be to monitor the number of not treated erroneous messages once a day to make people aware that some actions have to be taken. It should not be scheduled in minute intervals because of the high load it might cause on the managed system (depending on the message volume).

Note: Metrics for Critical vs. Uncritical Statuses

Note that technically both metrics produce the same result if configured identically. However, metric “Number of critical PI Messages (ABAP only) (Delta)” is supposed to be used for measuring PI messages in an error state only, whereas metric “Number of uncritical PI Messages (ABAP only) (Delta)” can be used for throughput measurements, too. Consequently in the Interface Channel Monitoring application the metrics are categorized as “Exceptions” and “Performance”, respectively.

You can maintain attributes as described in the Interface and Connection Monitoring Setup on the tab 'Attributes'.

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds. The recommended rating strategies for this metric are “Info Only” and “Numeric Threshold (Green/Yellow/Red)”.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • Only change the collection interval if you know what you do or if advised to do this by SAP.
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

Further Information

Process Integration (PI – ABAP only): Message Status Codes

The set of messages that is selected during data collection is restricted by either the current status of the PI message or the status group its current status belongs to. The following statuses and status groups are available and can be provided on metric level during configuration of the managed objects:

Status Group Description

1

Processed Successfully

3

Scheduled

4

Errors

5

Application Error

6

System Error

Status Description

001

Recorded

016

Manual restart

009

Automatic Restart

012

Recorded for Outbound Processing

029

Transfer to Process Engine

003

Processed successfully

010

Message Branched

020

Canceled - Since Already Processed

022

Acknowledgment message stopped

014

System Error - Manual Restart Possible

023

System Error - Restart Not Possible

018

System Error - After Automatic Restart

017

Application Error - Manual Restart Possible

024

Application Error - Restart Not Possible

025

Application Error - After Automatic Restart

011

Ended By Pipeline Without Errors

021

Canceled Manually

019

Changed Manually