Set up Integration Flows - Event-driven

This article describes how SAP Integration Suite can enable data synchronization from S/4HANA to Pricefx by using events. These steps apply to all entities, such as Products or Customers.

In this section:

SAP S/4HANA Event Listener

You should build your own integration flow to listen for SAP S/4HANA events and perform appropriate actions. You can refer to “Listen SAP S/4HANA Product events from SAP Event Mesh” from the “Pricefx Price Management with SAP S/4HANA” package as the example. You might need to have one integration flow for each SAP entity. This integration flow makes use of the AMQP adapter, which is available in SAP Integration Suite.

Step 1: Aggregate Messages from SAP S/4HANA and Write to Pricefx

This integration flow aggregates the events from SAP S/4HANA and makes them available to next integration flow in batch. This flow is copied from “Aggregate Messages from SAP S/4HANA and Write to Pricefx” from the “Sample artifacts for SAP S/4HANA Integration with Pricefx” package.

For explanation and configuration of this integration flow, see Aggregate Messages from SAP S/4HANA and Write to Pricefx.

Step 2: Get Updated Entities from SAP S/4HANA from Entity IDs List

You should build your own integration flow to get updated entities from the list of entity IDs if event aggregation flow and batching is used. You can refer to “Get updated products from SAP S/4HANA from a list of product IDs” from the “Pricefx Price Management with SAP S/4HANA” package as the example. You might need to have one integration flow for each SAP entity. You should also add any logic after the OData call if you want to filter away unwanted records or enrich any records.

Before calling OData service of SAP S/4HANA, the flow has to retrieve Application Interface Register (AIR) from Pricefx. See Get AIR key from Pricefx.

Any valid messages which cannot be processed successfully will be written to the retry datastore. See Error Handling.

Below parameters have to be configured:

  1. OData connection properties

 

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Main receiver – The integration flow which writes response to Pricefx.

  3. Multicast receiver – The integration flow which writes response to other Pricefx tables.

  4. Log receiver – The logging integration flow.

  5. AIR receiver – The integration flow which retrieves AIR from Pricefx.

  6. Transaction handling

  7. Error data store

  8. Split and Gather properties

  9. XPath for extracting ID

  10. Message Mapping to build a batch request to get a list of entities

Step 3: Multicast Response to All Entities in Pricefx

You should build your own integration flow to multicast the SAP S/4HANA response message to every integration flow which writes records to Pricefx tables. You should build this integration flow to either point it to the “end” if there is no other table to be updated, or multicast to multiple tables with one branch per Pricefx table.

A sample “Multicast Customer response from SAP S/4HANA to processing flows” is provided in the “SAP S/4HANA Customer Master Integration with Pricefx” package. The customer updates would be written to two Customer Extension tables.

multicast sample.jpg

Step 4: Write Records to Pricefx

One flow is needed for each Pricefx entity. For example:

  • Write Records to Customer Master in Pricefx

  • Write Records to Sales Org Data Customer Extension in Pricefx

The integration flow transforms the response from SAP S/4HANA and writes the records to Pricefx. It is copied from “Write records to Pricefx” from the “Sample artifacts for SAP S/4HANA Integration with Pricefx” package.

For explanation and configuration of this integration flow, see Write Records to Pricefx.

Logging

All the logs are forwarded to Send Log to email by default. You can configure your own log handling process by configuring the parameters of Log receivers and Error receivers in the integration flows.