This article describes how SAP Integration Suite can enable synchronization between S/4HANA credit / debit memos and Pricefx rebate payout records using event-driven approach.
Listen to Pricefx Rabbit MQ Events
The integration flow listens to quote approval events ('ITEM_APPROVED_RR') from Pricefx via Pricefx MQ Integration Adapter or RabbitMQ Adapter for SAP Integration Suite. Please raise a support ticket to obtain the RabbitMQ connection properties and enable the required Pricefx events. Duplicate “Listen to Pricefx Rabbit MQ Events” from “Sample Artifacts for SAP S/4HANA Integration with Pricefx” package to your package and modify it. The payout branch and its local process show a sample of how a rebate record approved event can be listened to and processed.
Aggregate Rebate Record Events from Pricefx
The integration flow aggregates Rebate Records approved events from Pricefx. Any events which cannot be processed successfully will be written to the log by email.
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which processes the aggregated events.
-
Error receiver – The error handling integration flow.
-
Transaction handling
-
Aggregator properties – Defines how the rebate record events should be aggregated.
Build a List of Rebate Record IDs from Aggregated Pricefx Rebate Events
This integration flow builds a list of rebate record IDs from the aggregated Pricefx rebate events so that the rebate records can be processed in batches.
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which processes the aggregated events.
-
Transaction handling
-
Error data store
Get Payout Records from Pricefx and Create Credit and Debit Memos
This integration flow multicasts the rebate records IDs to create both credit and debit memos.
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Credit memo receiver – The integration flow which creates credit memo headers.
-
Credit memo items receiver – The integration flow which creates credit memo items.
-
Debit memo receiver – The integration flow which creates debit memos headers.
-
Debit memo items receiver – The integration flow which creates debit memo items.
Get Payout Records from Pricefx and Create Credit Memo in SAP S/4HANA
This integration flow creates credit memo headers in S/4HANA from Pricefx payout records and writes the credit memo IDs back to the payout records.
Below parameters have to be configured:
-
Pricefx connection properties
-
S/4HANA OData connection properties
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which writes response to Pricefx.
-
Log receiver – The logging integration flow.
-
Error Log receiver - The error handling flow
-
AIR receiver – The integration flow which retrieves AIR from Pricefx.
-
Transaction handling
-
Page size
-
Split and Gather properties
-
Message Mapping to build a batch request to create credit memo headers
-
Message Mapping to extract payout record ID from Pricefx payout records response
-
Request message to fetch payout records from Pricefx
Get Payout Records from Pricefx and Create Credit Memo Items in SAP S/4HANA
This integration flow creates credit memo items in S/4HANA from Pricefx payout records and writes the credit memo item IDs back to the payout records.
Below parameters have to be configured:
-
Pricefx connection properties
-
S/4HANA HTTP connection properties
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which writes response to Pricefx.
-
Log receiver – The logging integration flow.
-
Error Log receiver - The error handling flow
-
AIR receiver – The integration flow which retrieves AIR from Pricefx.
-
Transaction handling
-
Page size
-
Split and Gather properties
-
Message Mapping to build a batch request to create credit memo items
-
Message Mapping to extract payout record ID from Pricefx payout records response
-
Request message to fetch payout records from Pricefx
Get Payout Records from Pricefx and Create Debit Memo in SAP S/4HANA
This integration flow creates debit memo headers in S/4HANA from Pricefx payout records and writes the debit memo IDs back to the payout records.
Below parameters have to be configured:
-
Pricefx connection properties
-
S/4HANA OData connection properties
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which writes response to Pricefx.
-
Log receiver – The logging integration flow.
-
Error Log receiver - The error handling flow
-
AIR receiver – The integration flow which retrieves AIR from Pricefx.
-
Transaction handling
-
Page size
-
Split and Gather properties
-
Message Mapping to build a batch request to create debit memo headers
-
Message Mapping to extract payout record ID from Pricefx payout records response
-
Request message to fetch payout records from Pricefx
Get Payout Records from Pricefx and Create Debit Memo Items in SAP S/4HANA
This integration flow creates debit memo items in S/4HANA from Pricefx payout records and writes the debit memo item IDs back to the payout records.
Below parameters have to be configured:
-
Pricefx connection properties
-
S/4HANA HTTP connection properties
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Main receiver – The integration flow which writes response to Pricefx.
-
Log receiver – The logging integration flow.
-
Error Log receiver - The error handling flow
-
AIR receiver – The integration flow which retrieves AIR from Pricefx.
-
Transaction handling
-
Page size
-
Split and Gather properties
-
Message Mapping to build a batch request to create debit memo items
-
Message Mapping to extract payout record ID from Pricefx payout records response
-
Request message to fetch payout records from Pricefx
Update Payout Records in Pricefx
The integration flow transforms the response from SAP S/4HANA and updates the payout records to Pricefx. It is modified from “Write records to Pricefx” from the “Sample artifacts for SAP S/4HANA Integration with Pricefx” package.
Below parameters have to be configured:
-
Pricefx connection properties
Below parameters can be configured but default values are provided:
-
Sender – The process direct incoming path of this integration flow.
-
Error receiver – The error handling integration flow.
-
Transaction handling
-
Error data store
-
Message Mapping to build update request from the message
-
Element name that the update payout calculation logic requires