SAP Build Process Automation combines workflow management, RPA functionality, decision management, process visibility, and embedded AI capabilities into one intuitive low-code experience. It enables business users and technologists to become citizen developers. With powerful yet intuitive low-code and no-code capabilities, the solution supports you in driving automation by tapping into the expertise of citizen developers. Check here for What's New and Learn more from the roadmap.
In SAP Build Process Automation, the event triggers onboard and listen to back-end events emitted from an external source system, and reacts to such events by triggering artifacts such as processes and automations. The current blog describes how to setup the Event Mesh on SAP BTP with SAP S/4HANA Public Cloud for receiving the business events in SAP Build Process Automation.
Pre-requisites:
2. You have Event Mesh Entitlement in your BTP subaccount
Privileges Required:
To build extension applications for your SAP S/4HANA Cloud system, you need to connect your SAP S/4HANA Cloud system to your SAP Business Technology Platform global account.
To be able to do this, in respect to authorizations you must be:
6. The SAP Business Technology Platform generates an integration token so the SAP S/4HANA Cloud system administrator can configure integration with the SAP Cloud Platform from your SAP S/4HANA Cloud system. Select the communication scenario groups from the drop down. Click on get Token.
7. Copy the integration token and close the dialog box.
3. On the Maintain Extensions on SAP BTP screen in the Integration section, choose New.
4. In the Integration Token field, paste in the integration token generated and copied from the SAP Business Technology Platform.
5. Enter a description for your system integration token.
Recommendation: use the same name you entered in SAP Business Technology Platform when you generated the token.
Example: <S/4HANA Cloud system name>Choose Save.
6. If you get a pop-up to approve the creation communication scenarios, click Yes.
Note: A new entry is displayed for your system in the table with the status Enabling.
Wait for a few seconds.
After you have connected the SAP S/4HANA Cloud system (with status Enabled in your SAP S/4HANA Cloud tenant) to the SAP Business Technology Platform, you need to configure entitlements to make this system accessible in the SAP Business Technology Platform subaccount in
In the next steps you will configure the entitlements and assign the corresponding quota and service plans to the subaccount in which the extension application will reside.
Hint: Please note that as a prerequisite both a subaccount with Cloud Foundry enabled and a space need to have been created. In case you have not created a subaccount or a space yet, follow the instructions given in the documentation.
Please note: it should be the same subaccount where the SAP Build Process Automation is already setup. For the SAP Build Process Automation setup, please refer to this help documentation.
In case you have no SAP Business Technology Platform subaccount in place yet, you would have to follow these steps:
Detailed Instructions can be found here:
Also, make sure to set up SAP Build Process Automation. For the SAP Build Process Automation setup, please refer to this help documentation.
1. In your SAP Business Technology Platform Cockpit, open your global account and choose Entitlements --> Entity Assignments.
2. Select your subaccount and click Edit
3. Click Add Service Plans.
4. In the Subaccount Entitlements dialog box, select the service SAP S/4HANA Cloud Extensibility and then select the system that you have configured in the previous step.
5. In the Service Details: SAP S/4HANA Cloud Extensibility screen area, select your newly registered system name from the dropdown help to list the available service plans. These available service plans are:
6. Select both service plans and press the Add 2 Service Plans button to add these entitlements for the SAP S/4HANA Cloud Extensibility service for your SAP S/4HANA Cloud system registered to your subaccount.
7. Press Save.
3. In the Service Details: Event Mesh screen area, select the default service plan
4. Press the Add 1 Service Plan button to add this entitlement for the Event Mesh service for your subaccount.
5. Press Save.
3. In the Service Details: Cloud Foundry Runtime screen area, select the following service plan: MEMORY
4. Press the Add 1 Service Plan button to add this entitlement for the Cloud Foundry Runtime service for your subaccount.
5. Press Save.
To allow SAP Business Technology Platform applications to consume events and APIs from SAP S/4HANA Cloud, you need to create the relevant service instances of SAP S/4HANA Cloud Extensibility for the service plans api-access and messaging.
SAP BTP Cockpit: Create a new service instance of SAP S/4HANA Cloud Extensibility with service plan “messaging” for enterprise eventing integration
3. Click on Create.
4. In the Create wizard in the Plan dropdown list, select the service SAP S/4HANA Cloud Extensibility with plan messaging. Choose a CLI friendly name for your instance (e.g.s4-messaging ).
5. Click Next
6. In the Specify Parameters dialog box, use the following template, which should have been prefilled for you.
{
"emClientId": "<Add your emClientId here>",
"systemName": "<S/4HANA Cloud system name>"
}
Please enter the systemName you have entered in the first step for example, S4H5
7. Click Create. The newly created instance appears in the list of instances in the Instance panel.
Note: The above steps will create a channel named SAP_CP_XP_S4EM in SAP S/4HANA Cloud. This will be used in the later steps.
It will create an event mesh message client s4EM which will receive events from SAP S/4HANA Cloud.
You need to enable the events that are to be sent from your SAP S/4HANA Public Cloud system to SAP Business Technology Platform. For this enablement step, go to your SAP S/4HANA Public Could System.
Find additional information here:
3. Click Go
4. Look for your emClientId that you had provided in an earlier step by clicking on Channel Name Value help.
For example, if you have provided the emClientId as S4EM, the channel name will "contain" the term S4EM.
After filtering, the channel name is displayed as below:
5. Select your event channel from the list
6. Click Create for your Outbound Topic
7. Click on the Topic selector
Select the Topic Selector
8. Enter asterisk SalesOrder asterisk into the Topic Filter and click Ok.
9. Click Go to search with SalesOrder
10. Select sap/s4/beh/salesorder/v1/SalesOrder/Created/v1
11. You can also add other topics similarly. For example, if you want to receive events for Billing Block Status on Sales Order, then the Topic sap/s4/beh/salesorder/v1/SalesOrder/OvrlBlgBlkStsChgd/v1 needs to be selected.
Copy the topic namespaces ( for example - sap/s4/beh/salesorder/v1/SalesOrder/OvrlBlgBlkStsChgd/v1) that are being added now. They will be used later for subscriptions in Event Mesh.
12. Click Create.
When you create a new service instance for SAP Event Mesh, you create a new messaging client, which then receives events sent from your registered SAP S/4HANA Cloud system. The parameters you enter in the JSON file are the service descriptors that are later visible on the Messaging Client UI and dictate the rules to be used for creating queues and their subscriptions.
5. Click on Create.
6. Select Event Mesh from the Service Drop Down
7. Select default from the Service Plan Drop Down
8. Enter the Instance Name: you can use s4-event-mesh for the instance name
9. Click Next
10. Copy the template into the parameter field and adjust relevant data:
Note down the emname used in this step. We will use the event mesh instance to configure webhooks and queues later.
Example:
{
"emname": "sbpa",
"namespace": "sap/sbpa/events",
"options": {
"management": true,
"messaging": true,
"messagingrest": true
},
"resources": {
"units": "10"
},
"rules": {
"queueRules": {
"publishFilter": [
"*"
],
"subscribeFilter": [
"*"
]
},
"topicRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"*"
]
}
},
"version": "1.1.0",
"xs-security": {
"oauth2-configuration": {
"credential-types": [
"x509",
"binding-secret"
]
}
}
}
11. Click on Create.
12. Once the instance has been created you can check on it in the SAP Business Technology Platform Cockpit under Instances.
In order to access the Event Mesh Cockpit, you need to subscribe to SAP Event Mesh and assign a number of roles to your user.
Hint: You can either click on the tile and select Create or select Create from the menu of the tile
Note: If you don't see the Event Mesh tile or the Subscription option, get in contact with the administrator of the Global Account or check whether the plan standard has been assigned to the entitlement of event mesh standard plan has been assigned or not.
2. Go through the subscription process and select standard Subscription from the list
Once the subscription is completed you'll find additional Role Collections for Event Mesh available in your subaccount.
3. Assign newly created role collections to your users
4. Click on Edit
5. Go to users tab and enter the email of the user and click on + sign.
Repeat this for every user that needs to have access, then click Save button.
6. Click on your subaccount
7. Select the Instances and Subscriptions tab
8.Click on the three dots under subscriptions and behind your application
9. Select Go to Application
10. Go to the Event Mesh Cockpit and confirm it works
Note: The s4EM message client is created automatically as a part of the S/4HANA Extensibility service instance creation to receive events from S/4HANA Cloud system. The namespace is generates automatically.
Choose the event mesh message client created manually in the earlier step to create webhooks and queues. For example, in this blog, the name is sbpa.
For more information, see Manage Queues.
Perform Steps in SAP S/4HANA Public Cloud system that dispatches the event. For example, the below example creates a Sales Order in the SAP S/4HANA Public Cloud.
Note the Sales Order number.
The same business event is then captured in SAP BTP under SAP Build Process Automation -> Lobby -> Monitoring -> Business Events.
Check the Sales Order number is the same as the one that is shown in the previous step.
This confirms that the setup is complete.
You can try out the following scenarios for business event triggers:
Do write to me in case of blockers, queries and feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
14 | |
12 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |