Business Event Triggers in SAP Build Process Automation for SAP S/4HANA: Manage Billing Block on Sales Orders

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 (BKP) Use Case  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.

Event%20Driver%20Architecture%20for%20Sales%20Order%20Packages

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.

Sales%20Order%20Billing%20Block%20Status%20Changed%20Event

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.

Sales%20Order%20Billing%20Block%20Status%20Changed%20Event%20Trigger%20Outputs%20/%20Process%20Inputs.

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:

  1. Sales Order Billing Block Status Changed event trigger is defined.
  2. 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.
  3. Decisions to determine Approver.
  4. 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.
  5. 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.
  6. Add email notifications to inform stakeholders regarding the approval / rejection status for removal of billing block on sales order.
  7. (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.
  8. Release and deploy the project for the event trigger to work during runtime.

Sample%20Billing%20Block%20Removal%20Process

Sample Billing Block Removal Process

 

Run the end-to-end process

  1. Create a Sales Order SAP S/4HANA.

Create%20Sales%20Order

Create Sales Order

  1. Create a Billing Block on the Sales Order in SAP S/4HANA for the same Sales Order

Update%20Sales%20Order%20and%20Add%20Billing%20Block

Update Sales Order and Add Billing Block

  1. The business event trigger executes the above configured process in SAP Build Process Automation and the approval form is available in My Inbox.

Sample%20Approval%20Form

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.

Billing%20Block%20is%20Removed

Billing Block is Removed

Note:

  1. This is a sample process, but the complete flow can be customized and implemented as required.
  2. 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.

Event%20Monitoring

Event Monitoring

Additional Information

Other Use Cases for event triggers:

  1. Customer Return (BKP)
  2. Manage Credit Block on Sales Order

 

Do let me know in case of queries or feedback.

Scroll to Top