Replicating a Sales Order

Objective

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

Sales Order Replication from SAP S/4HANA Cloud 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

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

Step 1: Configure Settings in SAP S/4HANA Cloud Sales Order Management

  1. Log in to SAP S/4HANA Cloud.
  2. Create a Communication User.
  3. Configure Communication Systems and Communication Arrangements.

Step 2: Configure SAP S/4HANA Cloud Settings

  1. In SAP Cloud Integration, configure the Sender tab as follows:

    Specify the event mesh Host, Port, Path, Queue Name, and its OAuth2 Client Credential.

  2. Configure the Receiver tab for SAP Entitlement Management as follows:

    1. Provide the Entitlement Generation API URL.
    2. For Authentication, select OAuth2 Client Credentials and specify the Credential Name.
    3. Specify the Timeout.
  3. Configure the Receiver tab for S4HANA_Cloud as follows:

    1. Provide the SAP S/4HANA Cloud Sales Order OData API.
    2. Provide its credentials.
  4. Configure the Receiver tab for ExitReceiver as follows:

    For Extension Integration Flow PD Address, use the default value /EMS/ReplicateSalesOrderViaCloudEvent_PostExit.

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

    For the Extension Implemented field, select true.

    Note

    Within the standard integration flow, there are no fields from SAP S/4HANA that properly map to SourceSystem, ItemValidFrom, ItemValidTo, or BusinessEvent.

    We did not set a default value for ItemValidFrom or ItemValidTo.

    However, the default value for BusinessEvent is PUR and the default value for SourceSystem is Dummy.

    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 Cloud via Event Mesh

Configure SAP S/4HANA Cloud Settings

Configure SAP Event Mesh

Configure SAP Cloud Integration

Create Sales Order From S/4HANA Cloud

Check Entitlement In SAP Entitlement Management System

Extention Points

Extension Point Enhancement

Summary

Uses Event Mesh events from SAP S/4HANA Cloud Sales Order Management to create or update entitlements in SAP Entitlement Management in real time.