Contact Us 1-800-596-4880

SAP S4HANA Setup Guide

Overview

The following describes how to configure and test an S/4HANA Cloud SOAP outbound service (Product replication: productmdmbulkreplicaterequest) and the S/4HANA Cloud SOAP Connector as a Mule application deployed on Cloudhub.

Configurations in S/4HANA

To make the necessary configurations in S/4HANA:

  1. Create a Communication System in the corresponding Fiori app. This communication system represents the external system that will consume the S/4HANA Cloud SOAP service. In this example, it’s named COM_0009_SOAP_OUT:

    SAP S/4HANA Create Communication System
  2. For the 'Business System' name, use the same name of the System ID.

  3. In the 'Host Name' field, enter the hostname of the Mule application deployed on Cloudhub (if you don’t have it yet, you can enter a mock URL and then modify it later):

    SAP S/4HANA Communication System with Host Name field
  4. Create a user that will be used to connect to the Cloud Hub app for sending product information in the outbound scenario (this is necessary even though the Mule application does not validate the user; we used any user for outbound):

    SAP S/4HANA user creation
  5. Use the Communication Arrangement Fiori app to create a new Communication Arrangement:

    SAP S/4HANA Create Communication Arrangement
  6. Create a new Communication Arrangement, select the communication scenario "SAP_COM_0009", and then define a specific name for the arrangement, "SAP_COM_0009_SOAP".

  7. In the Communication System field, select the Communication System created in the previous step:

    SAP S/4HANA Communication Arrangement with Communication System selected
  8. For outbound communication, select the previously-created user and configure the Product Master - Replicate from SAP S/4HANA Cloud to Client and include the following settings. Make sure to note the Path (/sap/bc/srt/scs/sap/productmdmbulkreplicaterequest) because we will use this path to configure the Mule application SOAP endpoint:

    • Set the Service status to Active

    • Replication Model (any name)

    • Replication model = I (Initial)

    • The Output Mode = D (Direct)+

      SAP S/4HANA outbound service with Service Status set to Active
      SAP S/4HANA outbound service Replication Model settings
      SAP S/4HANA outbound service Output Mode settings
  9. Save it. All configurations at S/4HANA Cloud side are finished and you will be able to download the WSDL that contains the metadata to import into the S/4HANA Cloud SOAP Connector into the Mule application.

Configurations in the Mule Application

The following example describes how to create a Mule application using the Outbound Message Listener operation of MuleSoft’s SAP S/4HANA SOAP Connector:

  1. Create a Mule project and add the appropriate connector from Exchange to the Mule Palette:

    Anypoint Studio Mule Palette with SAP S/4HANA SOAP Connector
  2. Add and configure the Outbound Message Listener to the canvas:

    Anypoint Studio Outbound Message Listener configuration
  3. Add the corresponding WSDL path to the WSDL you downloaded from S/4HANA Cloud and create the HTTP listener configuration:

    Anypoint Studio SAP S/4HANA SOAP Connector WSDL configuration
    Anypoint Studio HTTP Listener configuration

    Note: we are using no authentication on the Mule Application, so we used the Insecure option for the Trust Store Configuration. In the Keystore configuration, we used a test Keystore, which is mandatory for HTTPS communication:

    Anypoint Studio TLS configuration with insecure trust store
  4. Select the Message type that the connector expects to receive from SAP (the connector reads the metadata from the WSDL we configured):

    + image::retail-sap-s4hana-setup-guide-14.png["Anypoint Studio SAP S/4HANA SOAP message type selection",width=799]

  5. On the Responses tab, use the status Code "202" and the Reason-Phrase "Accepted" because we want to send the same status that S/4HANA Cloud will send if the service invocation results OK. No payload will be returned as a response - just the Status code and Reason-phrase:

    Anypoint Studio response configuration with HTTP status 202 Accepted
  6. Use a Logger component to log the inbound XML payload:

    Anypoint Studio Logger component configuration

    The Mule flow should look like the following:

    Anypoint Studio flow for receiving SAP S/4HANA product replication messages
  7. Deploy the application to Cloudhub. You’re now ready to test the scenario.

Testing the Scenario

To test the scenario:

  1. Create the following. You only need to create a material in the corresponding Fiori app of S/4HANA Cloud:

    SAP S/4HANA material creation
    SAP S/4HANA material data entry
    SAP S/4HANA material configuration
    SAP S/4HANA material save

    After you save the new material, you should see the following confirmation in S/4HANA Cloud:

    SAP S/4HANA confirmation that the material was saved

    The following shows the XML message received at the Mule application at the Runtime Manager on Cloudhub:

    Anypoint Runtime Manager log with the received product replication message
  2. See the sent message in the Message Dashboard Fiori Application:

    SAP S/4HANA Message Dashboard with sent product replication message
  3. Select the date:

    SAP S/4HANA Message Dashboard date selection
  4. Search under CMD:Product Integration - /CMDPR → Product Replication to Client via Service - PRDREQ_OUT/00001 namespace:

    SAP S/4HANA Message Dashboard search for product replication messages
    SAP S/4HANA product replication message details

S/4HANA customization guide

The following provides guidance on the custom fields that you must create for both the customer and order sync use cases to function in an end-to-end manner.

Custom fields

Create the following new fields in the corresponding objects for the use case:

Salesforce Object Field Name Data Type Length Unique ExternalId

BusinessPartner

YY1_SME_MPARTYROLEID_bus

Text

36

Y

Y

SalesOrder

YY1_SME_MORDERID_SDH

Text

36

Y

Y

Product

YY1_SME_UnvProductId_PRD

Text

36

Y

Y