Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
acharyaw
Product and Topic Expert
Product and Topic Expert
SAP Build Process Automationcombines 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 

Why are Business Events needed in the context of Process Automation ? 


Applications of the past were static, trigger-based, batch updated and hard coded but applications of today are dynamic, event-driven, real-time and responsive. Almost real time solution is good, but not good enough. Hence, event-driven architecture is a non-intrusive way of extending the business functionality and reacting to events without IT support . 

In August, we released Business Event trigger feature in SAP Build Process Automation. The event triggers onboard and listen to business events emitted from external source system and react to such events by triggering processes in SAP Build Process Automation. 

Currently all public events for SAP S/4HANA CE OP and Cloud listed on Business Accelerator Hub are supported. Support for other areas of SAP will be added in upcoming releases. 

So how does it work ? 


Below is a block diagram explaining the flow in brief:


Event Trigger Block Diagram




  1. The Event Mesh (default) in BTP Subaccount is configured to listen to the third-party event 

  2. A business event is created in any third-party system 

  3. The Event Mesh instance listening to this event gets the event details and triggers the configured process in SAP Build Process Automation


Any references for use case in SAP S/4HANA Cloud ? 


As an example, we can consider the Customer Return(BKP) Use Case. Below diagram describes the problem, the skill description and benefits from SAP Build Process Automation. 


Customer Return (BKP)


This is how the process flow could look like in the SAP S/4HANA Cloud system: 


SAP S/4HANA Customer Return Process Flow



What are the pre-requisites for using Business Event Trigger ? 


Before we start creating the business event triggers, there are some pre-requisites that needs to be setup by the IT Admin. For step-by-step process , you can refer to the link Create Event Triggers or the blog Building Extensions for SAP S/4HANA Cloud using APIs and Events . 

Below are some important points to note: 

  1. BTP Subaccount should have the following service assignments under entitlements : Event Mesh (default)S/4HANA Cloud Extensibility (messaging plan)  and SAP Build Process Automation (standard)

  2. When the SAP S/4HANA Cloud System is registered in the SAP BTP Global Account under System Landscape it would look similar to the below screenshot. Note: Administrator rights are required at Global Account level to register the system.


Register System in BTP


        3.The events to be used should be available as outbound topics in the SAP S/4HANA Cloud system. This is a required step for the SAP S/4HANA Cloud system to be able to dispatch the events.  Note: User needs Administrator role in SAP S/4HANA System for this step. 

  1. Outbound Topics In SAP S/4HANA


 

For example, in this case it is the "Customer Return Created" event. Note: We can also use "*" to get all events from Customer Return. The complete list is available in Business Accelerator Hub. 

      4. The event topics should be subscribed in Event Mesh via proper queue. If the event mesh queue is not setup correctly ,the events from the third party system will not reach the Event Mesh. 

  1. Event Mesh Queue

  2. 5. The webhook should be defined and added. If the webhook is not setup correctly, the events will reach Event Mesh but the processes in SAP Build Process Automation will not be triggered. 



Event Mesh Webhook


Once the event reaches the Event Mesh instance, and we are able to consume the messages via Test the setup is complete. In upcoming releases, we will have a "Monitor Events" UI which will make this check much simpler by showing the events that reach the SAP Build Process Automation. 

Note: The setup is more easier for SAP S/4HANA OP. Please refer to the blog Configure SAP Enterprise Messaging for SAP S/4HANA On-Premise 2020 via Service Key  for step-by-step details. 

Now, a citizen developer is all set to create the business event trigger for processes in SAP Build Process Automation. 

How to create and consume triggers based on events ? 


For detailed step by step guide follow Create Event Triggers documentation. 

For the Customer Return use case, the event required is Customer Return Created event. 


Customer Return Created Event


Note: Once the event is added as trigger, the payload defined in the event is available as Process Inputs and can be used later in the process for actions, decisions, mail notifications, etc.  

Event Trigger Outputs / Process Inputs


This is very helpful as most of the times in SAP S/4HANA , the events contain minimum information of the business object. For practical implementations of business processes, further API calls via Actions are  necessary which need the business object ID and other parameters coming from the event payload. 

For example, we can add a step for getting the details of the Customer Return and the documents created after customer return for triggering an approval process for performing the next step i.e. execute picking.  

For all APIs for Customer Return , refer to the list on Business Accelerator Hub.  

There could be many variations for the Customer Return process. One such sample process could look like the following: 

  1. Customer Return Event trigger is defined 

  2. The Customer Return ID from the event payload is used for an API call for Action to get header details and retrieve subsequent documents 

  3. An approval form for executing picking is created for the Customer Return. The details in the form could be populated from the API calls made in the previous step.  

  4. In case of an approval, the execute picking API call can be done via Actions based on the document number received in step (ii) and an email notification is sent. 

  5. In case of a rejection, an appropriate email notification is sent. 



Sample Process


The project needs to be deployed and released for the event trigger to work.  

Now, when the customer return is created in the SAP S/4HANA System, the business event trigger executes the process. The required API calls for reading the header of return order and for reading the advanced returns process steps are called and the sample approval form is available in My Inbox.  


Sample Approval Form


After approval or rejection an appropriate email notification is sent. 

Note: Event Mesh instance is per subaccount. Hence, if there are multiple projects have event triggers for the same event, when the event is fired from third-party system, multiple processes will be triggered.  

This is a sample flow but the complete flow can be customized and implemented as required. 

What is coming up ? 



  1. Monitor Events : The events and the payload coming from the event mesh will be available on the UI for testing/validating in a Monitor Events tab. 

  2. Run Now : The event trigger can be tested with the required payload like a runtime simulation.  

  3. Event Discovery via Lobby and consumption in SAP Build : The business events will be available for discovery via Lobby and can be consumed similar to Actions. 

  4. Events Discovery based on third party systems : Business Events can be discovered based on connected systems. 


Any other use cases ?


Business Event Triggers in SAP Build Process Automation for SAP S/4HANA: Manage Credit Block on Sale...

Do write to me in case of blockers, queries and feedback.

 

 
9 Comments
Sudhir_Paka
Explorer
Excellent description.! Very easy to understand and follow..! Thanks for making life bit easier.:-)
Sudhir_Paka
Explorer
0 Kudos
 

Hi Win, as I am going through this event feature, few points cross my mind, would like to pick your brain on this.

As I see this, triggering event in 3rd party system's itself is not a new thing, as in enterprise suite(ECC) if you recall, there are events which gets created, whenever PR, PO or SO gets created in the system, and subsequently if needed, we used to link that event to a workflow to trigger the subsequent process of approval etc.

So, if i holistically try to see this, here we are basically trying to understand how these event's are handled in the context of BTP using Event Mesh, rest of the process remain same, of course when we talk about build process automation, i could see there are many new features added like IRPA and embedded AI capabilities which definitely makes workflow more powerful and opens up wide range of possibilities for innovation.

Secondly, as i was going through SAP Build apps, we can also trigger events from build apps, which would then be linked to process automation if needed..?

Also, events could be generated from sensors attached to machines and other devices in the inventory and logistics' area which would then be sent to Azure IoT event handlers or AWS IoT handlers  which will then send those events to BTP to be handled in process automation for further processing... is my understanding correct.?
acharyaw
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Sudhir,

 

First of all, I would like to thank you for sharing your thoughts.

You are right, business events are being triggered already from different SAP and non-SAP systems now.

Here, the feature is about consuming these "business events" coming from different systems like SAP S/4HANA Cloud or On-Premise and triggering a business process in SAP Build Process Automation. This is the feature that was released.

As of now , the scope of the "business events" consumption is only SAP S/4HANA. We will enhance this to other areas of SAP as well and later maybe even non-SAP systems.

Technical events support is under evaluation.

Thanks & Regards,

Win
Sudhir_Paka
Explorer
0 Kudos
Perfect.!! Thanks for the details Win, really appreciate that.

Are there any webcast or demo lined up to go over this event mesh feature in the coming days.? it would be really helpful if you could share details regarding this.

 

Kind Regards,

Sudhir
acharyaw
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Sudhir,

 

Yes, will plan for a demo for the Event Mesh setup in the pre-requisite part for the business events and keep you posted. Thanks for the feedback !

 

Kind Regards,

Win
acharyaw
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thanks for the feedback !

Kind Regards,

Win
Sudhir_Paka
Explorer
0 Kudos
Sure.! Thanks Win.!!
Orsolya
Explorer
0 Kudos

Hi Win,

You are referring SAP S/4HANA CE OP, that means cloud edition and on-premise?
Can the trigger work with S/4HANA on premise 2022 and Advanced Event Mesh if I choose an event which is available on Business Accelerator Hub?

Thank you,

Kind regards,

Orsolya

AlanRoddie
Explorer
0 Kudos
Thanks for this, provided some details on how to setup.  In point 3, you talk about Outbound Topics in S4H.  How do you do that?