Key Terms, Used in This Lesson:
- Event Mesh Application and Service: This is the platform within SAP BTP that facilitates real-time data flow between systems.
- Subaccount: An organizational unit within the SAP BTP where services like Event Mesh can be provisioned and managed.
- Entitlements: These are the permissions or allocations that allow a subaccount to use certain services or resources in SAP BTP.
- Event Mesh Service Instance: A specific instance of the Event Mesh service that is created and configured for real-time data exchange.
- Namespace: In the context of Event Mesh, it defines the scope or domain within which events are published or subscribed.
- Configuration JSON: A structured data format used to define the settings and rules for Event Mesh service instance, such as topic and queue rules.
- Channel Configuration in S/4: Setting up the communication pathways for specific business events to be published to the Event Mesh.
- Webhook: A method for augmenting or altering the behavior of web pages or web applications with custom callbacks.
- OAuth2ClientCredential: A security protocol that allows for secure designated access, used for authentication when setting up a webhook.
- Subscription Activation: The process of enabling the Event Mesh service to start handling the events published by SAP S/4HANA.
- Mapping Configuration: Aligning data fields between the source system (S/4HANA) and the destination (APM) to ensure accurate data exchange.
- Measurement Document Replication: The process of copying measurement data from S/4HANA to APM, which is a practical application of the Event Mesh configuration.
Business Scenario

This lesson will help Jessica Martin learn to set up and utilize SAP Event Mesh in SAP Asset Performance Management, a critical skill that will allow her to ensure a seamless flow of real-time data across CRT Manufacturing's systems.
Lesson Overview: Configuring Event Mesh
In this unit, you will get to know how to configure the Event mesh application and service in BTP as well as how to set up the configuration to establish the real-time data flow between S/4 and APM via Event Mesh.
Once the following prerequisites are met, navigate to your BTP global account and find the entitlements. Assign the entitlements to the desired sub-account:
- You’ve purchased the license for the solution that you want to consume.
- You’ve created a subaccount in your global account.
- You’re the administrator for the subaccount.
- Your back end system is SAP S/4HANA Private Cloud 2021 FPS01 and later or S/4HANA Public Cloud
Create Entitlements

Once the entitlement is added, Create Event mesh service instance from subscriber CF tenant.
Use following sample config json:
1234567891011121314151617181920212223242526272829303132{
"resources": {
"units": "10"
},
"options": {
"management": true,
"messagingrest": true,
"messaging": true
},
"rules": {
"topicRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
},
"queueRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
}
},
"version": "1.1.0",
"emname": "eventmeshclient",
"namespace": "sap/s4/beh"
}
Assign event mesh specific role to access event mesh application dashboard.
Configuration of a Channel in SAP S/4HANA for the Topic to Publish the Data
Video Summary
Learn how to create a service instance for SAP Asset Performance Management. Follow step-by-step instructions to configure the event mesh and receive events from S4HANA.

After subscribing to Event Mesh and creating a service instance, the next step is to configure the Event framework in SAP S/4HANA.
- In transaction /IWXBE/CONFIG, create a new Channel by using Service Key. Input a channel name, description, and leave the rest default. In the service key field, paste the service instance key for Event Mesh created previously.
- Next – activate that channel and test the connection. It should be successful.
- Then – choose Outbound Bindings. Here you will add the required Measurement Document event topics as shown in the screenshot.
For more information, see: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/810dfd34f2cc4f39aa8d946b5204fd9c/fbfdeeab605349b7b1f0330ee4af253b.html?version=2022.000.



Creation of a Queue in SAP Event Mesh

- From SAP BTP go to the SAP Event Mesh dashboard.
- Choose the event mesh client and then Queues followed by Create Queue.
- Name the something representative, such as /apm/queue and leave the rest as default. The Queue Name will have the ’sap/s4/beh/’/’ prefix added.
- Choose the Actions icon for this queue and add a subscription. You can either add a generic queue subscription, like sap/s4/beh/* which would subscribe to every topic your S/4HANA publishes, or, more specific like sap/s4/beh/ce/sap/s4/beh/measurementdocument/v1/MeasurementDocument/*
Create Webhook

The webhook creation requires the assistance of SAP. Please follow the below steps:
Create an incident for SAP Asset Performance Management operations team (Component: APM-OPS-SRV, Priority: Medium) to configure webhook on Event Mesh application. Provide the following details in the incident:
- Subaccount domain and its ID.
- Measuring documents sync:
The Topic name used for configuring measurement document channel in SAP S/4 HANA.
- The Source used for event mesh enablement for measurement document. Pattern of Source is => /default/sap.s4.beh/<LogicalSytemName>
- Rules characteristics and attribute trigger.
- The Topic names used for configuring equipment and functional location change channel in SAP S/4 HANA.
- The source used for event mesh enablement for equipment and functional location change. Pattern of source is => /default/sap.s4.beh/<LogicalSytemName>
An example incident might look like this:
Tenant 1
Subdomain: <from BTP subaccount overview page>
Subaccount ID: <from BTP subaccount overview page>
Topic:
sap/s4/beh/equipment/v1/Equipment/Changed/v1
sap/s4/beh/functionallocation/v1/FunctionalLocation/Changed/v1
sap/s4/beh/measurementdocument/v1/MeasurementDocument/*
Source: /default/sap.s4.beh/<SID>CLNT<###>"
For example, if your system is called S4H and you are using client 100, then the source would read /default/sap.s4.beh/S4HCLNT100.
Personal Reflection

Consider a situation where you had to set up a complex process that involved multiple steps and components, much like configuring Event Mesh for SAP Asset Performance Management. How does the structured approach of setting up Event Mesh compare to your experience?
Expert Response

Expert Response to Personal Reflection Question:
Setting up Event Mesh for SAP Asset Performance Management is similar to any complex setup where each step is crucial. From my experience, understanding each part's role and how they connect is key.
For instance, creating queues in Event Mesh is like making sure each task in a project is lined up right. It reminds us how important it is for information to flow correctly and on time, just like in Event Mesh where real-time data exchange is essential.
I’ve learned that careful planning and knowing the details, like getting the settings right and ensuring secure connections, are vital. This approach to Event Mesh configuration—taking it step by step, making sure everything is secure and lines up—will help with future tech setups, ensuring they run smoothly without hitches.
Conclusion
Configuring Event Mesh for Real-Time Data Flow in SAP
Key Points:
- 1. Prerequisites
- Ensure you have the necessary licenses, a subaccount in your global account, and administrator rights. In addition, your back end should be S/4HANA Public Cloud or S/4HANA Private Cloud 2021 and later.
- 2. Entitlements and Service Instance
- Assign entitlements within BTP and create an Event Mesh service instance.
- 3. Sample Configuration JSON
- Define a namespace for use in SAP S/4HANA business events and configure resource units, options, and rules within the JSON structure.
- 4. Event Mesh Roles and Channel Configuration
- Assign roles to access the Event Mesh dashboard.
- Configure the channel in SAP S/4HANA to publish data to specific topics.
- 5. Queue and Webhook Configuration
- Create a queue and queue subscription in Event Mesh.
- Set up a webhook by creating a ticket with SAP.
- Outcomes
- Participants will be capable of configuring Event Mesh for effective real-time data synchronization, ensuring immediate updates between SAP S/4HANA and SAP APM, which is critical for measurement documents and condition-based monitoring.