Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Aashish28
Contributor
This blog presents one of the approach for initiating SAP Build Process Automation from an S/4 Hana On-Premise system using ABAP code.

As you know, SAP Build Process Automation is the unified offering in SAP BTP that combines the capabilities of SAP Workflow Management and SAP Intelligent RPA and its staring point can be FORM or API.

You can read more on SAP Build Process Automation (here).

Prerequisite:

  1. Subscription of SAP Build process automation in BTP Trial Account

  2. S/4 Hana on-premise system with required access


To illustrate this, I have developed a sap build process which contain workflow rather than process automation, with its trigger point being an API.

Note: Numerous blogs and learning resources are readily available for SAP Build processes automation, which I won't reiterate here.

I will use the abbreviation SBPA for referring to SAP Build Process Automation.

Steps to be performed on SAP BTP:

Step 1.  Creating simple build process for Employee and deploy.

It has a form which display essential information such as Epmid, Name, Department and Status. This information we receive from build process instance payload. After receiving the information, you can either approve or reject it to finalize the process.


SAP Build Process


Step 2. Please make a copy of the triggering point URL as it will be required to initiate the instance.


 

Steps to be performed on S/4 Hana on-premises system :

 

Step 1: Establish an SM59 Destination (type G) in your S/4 system to obtain an OAuth token for SAP Build process automation. This token will use in sub sequent request to initiate the instance.



You can get host/token URL, user name(client id) and password(client secret) from service key instance of SBPA.


 

Step 2 : Create ABAP class with 2 methods

a. Get oAuth token using destination

b. Trigger SBPA instance



You can get full code from my Github repo (SCN-Sample-Code)

 

Step 3 : Create sample SE38 program to test.


 

Lets execute it.

Upon successful initiation of the instance, you will receive the instance ID along with its corresponding status.


 

To verify the successful initiation, you can open the SBPA Monitor tab and check the work item in the Inbox app.


 


You can approve/reject to complete the process.

 

Conclusion : 

We have successfully triggered the SAP Build process from your S/4 HANA on-premise system using ABAP code. This approach can also be applied to trigger instances from BAdi instead of a custom program. Additionally, you can utilize the same approach to trigger other instances based on SAP BTP services.

Are you interested in getting to use more Low-Code/No-Code capabilities with SAP BTP?

Are you interested to keep your S/4 Hana core clean ?

Lets learn and share!

 

Regards,
Ashish
12 Comments
Labels in this area