SAP Build Process Automation combines capabilities from SAP Workflow Management and SAP Intelligent RPA with a powerful, yet intuitive no-code development experience. SAP Build Process Automation 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 my Blog post
Business Event Triggers in SAP Build Process Automation for SAP S/4HANA Cloud : The Customer Return ... I have covered the concepts of business events and how to configure business events for the use case for Customer Return for SAP S/4HANA Cloud. There is also blog post for the use case
Manage Credit Block on Sales Orders . In continuation to the same, in this blog post we will learn how to create an event-trigger for "Manage Billing Block on Sales Order".
Introduction to the use case
Billing block is applied in Sales Order by internal sales representatives to prevent invoice being created in case of sales returns. These billing blocks need to be updated or deleted in random or on-demand fashion and is time critical activity in Order-to-Cash process. In many organizations this process is still manual where internal sales representatives get billing block change requests in form of Excel or Email attachment. Sales representatives download these attachments and then sales orders are manually updated in the S/4HANA system based on data in the excel files or attachments.
In this blog, we will create a process to manage billing blocks created for an existing Sales Order. Of course, the process can also be modified slightly to handle new Sales Orders created with billing block.
![](/legacyfs/online/storage/blog_attachments/2023/11/BillingBlockblog4.png)
Event Driven Architecture for Sales Order Packages
Designing the Use Case
Pre-requisites: Event Mesh configuration is done as per the pre-requisites mentioned in
blog.
For detailed step by step guide on how to add event triggers to a process, follow
Create Event Triggers documentation.
For the "Manage Billing Block on Sales Order" use case, the event required is Billing block status changed (ce/sap/s4/beh/salesorder/v1/SalesOrder/OvrlBlgBlkStsChgd/v1) . Details of the event is available on
Business Accelerator Hub.
![](/legacyfs/online/storage/blog_attachments/2023/11/BillingBlockblog1.png)
Sales Order Billing Block Status Changed 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.
![](/legacyfs/online/storage/blog_attachments/2023/11/BillingBlockblog2.png)
Sales Order Billing Block Status Changed 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 due to security reasons. 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, to get the item level details of a Sales Order, there is a need to make further API call which takes the Sales Order from the event trigger as an input.
Please refer to
Business Accelerator Hub for details on the APIs for
Sales Order.
There could be many variations for the Sales Order process for billing block removal.
A sample process could be like the following:
- Sales Order Billing Block Status Changed event trigger is defined.
- The Sales Order ID from the event payload is used for an API call for Action to get item level details for Sales Order. Note that the API also returns some Sales Order header information as well.
- Decisions to determine Approver.
- An approval form for removing the billing block on Sales Order. The details in the form could be populated from the API call made in the previous step.
- In case of approval, use GET API to get the eTAG for Sales Oder and use this value in a subsequent PATCH call to update the sales order without billing block in the SAP S/4HANA system.
- Add email notifications to inform stakeholders regarding the approval / rejection status for removal of billing block on sales order.
- (Optional) Auto approval can be configured for quicker processing time. For example, if the net value is less than 500 EUR, then automatic approval for removal of billing block can be done.
- Release and deploy the project for the event trigger to work during runtime.
![](/legacyfs/online/storage/blog_attachments/2023/11/BillingBlockblog3.png)
Sample Billing Block Removal Process
Run the end-to-end process
- Create a Sales Order SAP S/4HANA.
![](/legacyfs/online/storage/blog_attachments/2023/11/SaveSalesOrder.png)
Create Sales Order
- Create a Billing Block on the Sales Order in SAP S/4HANA for the same Sales Order
![](/legacyfs/online/storage/blog_attachments/2023/11/UpdateBillingBlock.png)
Update Sales Order and Add Billing Block
- The business event trigger executes the above configured process in SAP Build Process Automation and the approval form is available in My Inbox.
![](/legacyfs/online/storage/blog_attachments/2023/11/RunProcess13.jpg)
Sample Approval Form
4. Approve the form and check for email notification.
5. To confirm, optionally you can check that the billing block is removed for the sales order in SAP S/4HANA.
![](/legacyfs/online/storage/blog_attachments/2023/11/view_3.png)
Billing Block is Removed
Note:
- This is a sample process, but the complete flow can be customized and implemented as required.
- Event Mesh instance is per subaccount. Hence, if there are multiple projects that have event triggers for the same event, when the configured business event is fired from any system, multiple processes will be triggered.
What's New
Now the business events configured via Event Mesh can be monitored via Monitoring - Event Acquisition - Business Events.
The business events for last 7 days are available along with the payload information for debugging purposes. This information can also be downloaded for reference.
![](/legacyfs/online/storage/blog_attachments/2023/11/BillingBlockblog5.png)
Event Monitoring
Additional Information
Other Use Cases for event triggers:
- Customer Return (BKP)
- Manage Credit Block on Sales Order
Do let me know in case of queries or feedback.