Skip to Content
Technical Articles
Author's profile photo Chaitanya Priya Puvvada

Integrate SAP Build Apps and SAP Build Process Automation using SAP BTP Destinations

Hello All,

In this blog post, I will show you how to trigger the Business Process of  SAP Build Process Automation in SAP Build Apps.

Below is the sequence of the steps to be followed.

 

1. Create a destination in SAP BTP Cockpit

2. Create an API Trigger for Business Process in SAP Build Process Automation

3. Configure the  BTP Destination in SAP Build Apps.

4. Test the Destination Configuration in SAP Build Apps.

 

Create a destination in the SAP BTP Cockpit

1. Create a Destination to connect SAP Build Process Automation with SAP Build Apps.

Enter the value under the URL. This is the API call to trigger your Business Process.

https://spa-api-gateway-bpi-eu-prod.cfapps.eu10.hana.ondemand.com/public/workflow/rest/v1/workflow-instances.

Change the authentication to OAuth2ClientCredentials, Client ID, Client Secret, and Token Service URL can be retrieved from the SAP Build Process Automation Instance from your tenant.

Add these Additional Properties for this destination to work in SAP Build Apps.

AppgyverEnabled
HTML5.DynamicDestination
WebIDEEnabled

Create an API Trigger for Business Process in SAP Build Process Automation

Prepare your Business Process by creating an API trigger and configuring the input parameters to integrate with SAP Build Apps.

Refer to the blog post on How to create an API Trigger.

 

Configure the  BTP Destination in SAP Build Apps.

Follow the documentation to Enable BTP Authentication in your app,

 

.We have successfully created a destination in BTP and created an API trigger for Business Process in SAP Build Process Automation. Let’s configure the destination in SAP Build Apps.

1. Click on CREATE DATA ENTITY and select SAP BTP destination REST API integration.

 

3. As the BTP destination name, select AppGyver_SPA.(Destination which was created BTP Cockpit)

 

4. Under the Data resource name, a name can be given to this data connection, like “SendtoSPA”.

5. Under Resource schema, click on + ADD NEW to create a schema. Name the new schema “filename” and select the Field type as Text. Choose ADD.

Schema is the structure of the data. A schema is created which is similar to the Database. In this scenario,  and schema should be created matching the schema of your API trigger in SAP Build  Process Automation.

6. Similarly, add three other schemas with the following names:

“foldername”
“employeename”
“employeemail”
Select the Field type for all of them as Text.

7. Select the create tab, and enable it.

8. Open the binding menu for Request headers by clicking on the X icon.

9. In the binding menu, select List of values.

10. Click on Add value, and enter the following values:

Header name: Content-Type
Header value: application/json

Click on SAVE.

11. open the binding menu for Request body mapper.

12. Open the formula editor. Enter the following formula:

Your Definition ID was copied from SAP Build Process Automation. Refer to the blog post to  get the definitionId of your Business Process.

13. Click on SAVE.

Test the Destination Configuration in SAP Build Apps

You can test if this Data connection is working.
Switch to the TEST tab and enter the below values in the following fields to test the connection:

Click on RUN TEST.

 

Scroll down and check the Status of the Response.

If you are getting any errors please recheck the above steps. If you get the response as Status: OK, then the connection is successful.

Select SAVE DATA RESOURCE.

 

You can successfully link this data source to any UI element like Button in Build Apps!

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jan Schober
      Jan Schober

      Thanks Chaitanya Priya Puvvada for this excellent blog. Awesome and comprehensive summary!

      Author's profile photo Richard Bourne
      Richard Bourne

      Hi Chaitanya,

      Im really excited to get this going but I'm failing to connect when creating a Destination in BTP. I get a 401 unauthorised message when i click the check connection button. The only thing different I see is that the AppgyverEnabled property is missing from the list. Could this be the issue or am I missing something from the Set Up? I used the booster to set everything up.

      Many thanks

      Richard

      Author's profile photo Chaitanya Priya Puvvada
      Chaitanya Priya Puvvada
      Blog Post Author

      Richard Bourne,

      Can you please share the details of the destination that you have created mainly the token URL and API URL   that you used while creating the destination?

      Hope you have added /oauth/token to your authentication URL to form Token URL