Integration Blog Posts
cancel
Showing results for 
Search instead for 
Did you mean: 
varunvenkat
Product and Topic Expert
Product and Topic Expert
4,472

In this blog post, I would like to cover the concept of event-based integration in S/4HANA Cloud. Fundamentally, there are three different services offered by SAP to achieve event-based integrations:

SAP Event Mesh is a standalone service offered by SAP, which can be used by customers with existing CPEA contract models. For newer customers with BTPEA contract models, the standalone service is no longer supported and customers can choose between AEM and EMIS. EMIS is embedded within the Integration Suite and can be activated without further license costs, whereas AEM is licensed separately and is geared to handle much higher data loads and comes with some more advanced capabilities.

In this blog post, I’ll be demonstrating a simple scenario of how to get started with event-based integrations using EMIS as a starting point. For a detailed background on EMIS, please refer to Karsten Strothman’s great blog post on the topic.

Prerequisites:

BTP Subaccount:

  • Add the entitlement for the EMIS service
  • In the subaccount instances and subscriptions page, create an instance as follows:
  • varunvenkat_8-1732969888046.png

     

  • Within the instance, create a new service binding:
  • varunvenkat_9-1732969888052.png

     

  • After creation, click on ‘View Credentials’, where you can note down the values of the clientid, uri and token endpoint fields, which will later be used in the communication system setup on S/4HANA Cloud side
    • For the uri field, only the string between wss:// and /protocols/amqp10ws needs to be copied
    • In this step, also copy the entire JSON shown below, which will later be used as a service key
  • varunvenkat_10-1732969888056.png

     

 

S/4HANA Cloud:

  • Activate scope item 1NN.
  • Create the communication system, outbound communication user and the Communication Arrangement SAP_COM_0092 (refer here)
  • While creating a new communication system, in the host name, enter the uri string value copied from above.
    • Under OAuth 2.0 Settings, populate the values for authorization endpoint and token endpoint. For token endpoint, use the value copied from above. For authorization endpoint, use the same value as the token endpoint, simply replacing /token with /authorize
    • Under ‘Users for Inbound Communication’, create a new communication user or select an existing one (User/Password) for the inbound communication.
    • Under ‘Users for Outbound Communication’, choose OAuth 2.0 and enter the Client ID and secret copied from earlier
  • Now, create a new communication arrangement for the scenario SAP_COM_0092:
    • Now, paste the value from the “Copy JSON” step earlier. After pasting, add one property manually which specifies the namespace of the comm. arrangement
    • varunvenkat_11-1732969888059.png

       

  • After this, the outbound service to delivery events from S/4HANA Cloud is setup. Now it’s time to choose a particular event object to test the event delivery.
  • For this, first create a channel binding in the app “Enterprise Event Enablement - Configure Channel Binding”. Here, you will find the channel name from your communication arrangement.
    • Under Outbound Topic Bindings, select create, and add the event object that you would like to send events for. For my example, I will choose cost center. Be aware that per object, you need to select the add the required event type (create/update/delete)
    • varunvenkat_12-1732969888062.png

       

The last setup step is on the Cloud Integration (a.k.a CPI) side. Here under the Configure Event Mesh section, create a new queue for the test:

varunvenkat_13-1732969888065.png

 

Inside the queue, add a subscription, where you will need to paste the following value: <Topic Space>/ce/<Outbound Topic Binding>. The <Topic Space> value is found in the communication arrangement. In my example, the final value will look something like this:

varunvenkat_14-1732969888068.png

 

 

 

 

Integration Test:

Now that the necessary setup steps are complete, it’s time to test if the event is correctly being sent. Since my example topic binding is for the cost center change event, I will use the “Manage Cost Centers” app to change the value of an example cost center.

After doing this, we can see that the event has been sent out successfully and is now queued within the EMIS message queue in CPI:

varunvenkat_15-1732969888070.png

 

 

With this, we have concluded the setup steps necessary to configure the technical communication between S/4HANA Cloud and Event Mesh for Integration Suite, in order to work with event-based integrations. Hope this gave you a comprehensive overview as to what configuration steps are required in the various systems in order to have the technical communication between the systems up and running. After this initial setup, integration flows will usually be developed within CPI in order to consume these events, put together the necessary payloads, and send the required data to external systems for consumption.

3 Comments