Replicating Sales Orders using SAP Event Mesh

Objective

After completing this lesson, you will be able to replicate a sales order from SAP S/4HANA using SAP Event Mesh.

Sales Order Replication from SAP S/4HANA using Event Mesh

This integration flow enables you to replicate sales order data from SAP S/4HANA to SAP Entitlement Management using SAP Event Mesh.

Note

Currently, this integration flow only supports the following two event types:

  • sap.s4.beh.salesorder.v1.SalesOrder.Created.v1
  • sap.s4.beh.salesorder.v1.SalesOrder.Changed.v1

Note

This does not support sales order deletion or sales order item deletion.

For more information, see: Replicate Sales Order From S/4HANA via SAP BTP Enterprise Messaging V2 | SAP Help Portal

Configure Settings in SAP S/4HANA

  1. Enable enterprise events in SAP S/4HANA.
  2. Configure the backend system in SAP S/4HANA, setting up RFC connection, logical system, port for RFC connection, partner profiles, distribution model, and condition records for the output type BA00.

SAP Cloud Integration Settings

  1. Configure the Sender tab as follows:
    1. Specify the event mesh Host, Port, Path, and Queue Name.
    2. Set the Authentication Method to OAuth Client Credential and provide the Credential Name.
  2. Configure the Receiver tab for SAP Entitlement Management as follows:
    1. Provide the Entitlement Generation V2 API URL.
    2. Set the Authentication Method to OAuth Client Credential and provide the Credential Name.
    3. Specify the Timeout.
  3. Configure the Receiver tab for SAP S/4HANA as follows:

    Specify the SAP S/4HANA Address, along with its Host, Port, Credential and Client.

  4. Configure the Receiver tab for ExitReceiver as follows:

    For the Extension Integration Flow PD Address, specify /EMS/ReplicateSalesOrderViaEvent_PostExit.

  5. On the More tab, extend the standard integration flow as follows:

    Set the Extension Implemented field to true.

    Note

    Within the standard integration flow, there is no field from SAP S/4HANA that properly maps to ItemValidFrom, ItemValidTo, or BusinessEvent. We did not set default values for ItemValidFrom or ItemValidTo. However, the default value for BusinessEvent is PUR.

    If you want to rewrite the logic of these fields, you can define your logic in the Post-Exit integration flow.

Replicate Sales Order from SAP S/4HANA via Event Mesh

Enable SAP Event Mesh in SAP S/4HANA

Configure SAP Event Mesh

Configure SAP Cloud Integration

Create Sales Order In SAP S/4HANAf

Check Sales Order In SAP Entitlement Management

Summary

Uses enterprise events (Sales Order Created, Sales Order Changed) to stream sales-order data from SAP S/4HANA to SAP Entitlement Management in near real time.