Skip to main content
Skip table of contents

KB 208 - Capturing SAP CPI payloads using PowerConnect Cloud

KB 208 (Cloud): Capturing SAP CPI payloads using PowerConnect Cloud

Category: Information

Priority: Normal

Platform: Cloud

Version: 1 from 01.04.2024

Description

In SAP CPI there is no concept of a payload as part of the CPI message object. This is different to SAP PO where the payload is a key part of the message structure.

This document describes an example of capturing SAP CPI payloads using the SAP CPI message store. As per the SAP docs the following data can be stored:

  • Message payloads and headers as data store entries

  • Data store entries can be accessed by Data Store Select or Data Store Get steps.

  • Any data as variable

Note - the message store is a separate API and as such for each message an additional API call needs to be made. In high volume environments (+100k messages per day) this can significantly slow down the data collection. For high volume environments an alternative approach is to store parts of the payload a custom header properties instead of using message stores.

Configuration Steps

There are two parts to the configuration:

  • Updating the iFlow to store the required payload in the message store

  • Enabling message store collection in PowerConnect Cloud

SAP CPI IFlow Configuration

  • Login to your SAP CPI portal

    image-20240712-071307.png
  • Click Design the open the CPI IFlow where payload should be captured (in this example we will use the iFlow named Test Flow)

    image-20240712-071920.png
  • In this example we would like to capture the inbound request payload (json) sent via HTTP to our iFlow. We add the persist step and connect it to the Start

    image-20240712-072435.png

  • We would like to capture the JSON payload before it is tranformed to XML so we place the Persist step between the Start and JSON to XML Converter

    image-20240712-072543.png

  • We give the Persist step a friendly name so we can easily identify what it’s doing

    image-20240712-072939.png
  • We also give it a Step ID which will appear as part of the CPI message data

    image-20240712-073051.png

  • Click Save and Deploy the change

image-20240712-073301.png

PowerConnect Cloud Configuration

  • Login to the PowerConnect Cloud UI

    image-20240712-073600.png
  • In the menu bar choose Inputs

    image-20240712-073812.png

  • Find the SAP CPI input you have configured. If you have not configured one yet follow these steps

  • Click on the edit button to edit the Input

image-20240712-073902.png
  • In the configuration form check the Message Stores checkbox

    image-20240712-074013.png
  • Click Save

  • In this example we trigger the iFlow by sending some JSON payload to it using curl

    image-20240712-074155.png

  • We can now see in our target platform the CPI messages for this iFlow have a new message store field containing the JSON payload we sent with the PersistPayload identifier we used above

    image-20240712-074332.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.