Skip to Content
Technical Articles
Author's profile photo Tazeem Umra Rajgolkar

SAP Build Process Automation – Deploy and Test an API Trigger using Postman

SAP build process automation refers to the implementation of tools and workflows that streamline the development, deployment, and testing of SAP applications. SAP Build Process Automation with Postman involves streamlining the deployment and testing of an API trigger. With Postman, you can create a collection of API requests, including the trigger, and define test scenarios with assertions. By running the collection, Postman automatically deploys the API and performs tests, validating responses for efficiency and accuracy. This automation saves time and ensures a reliable SAP API build process. 

Step 1 – Release Business Process Project 

Before you run the process, ensure that the process is saved and that there are no errors showing in the Design Console. Release and deploy the Business Process project initially in order to commence the process. An updated version of the project is created when it is released. 

  • Select Release from the Process Builder menu. 

Image 1 

  • Add a Version Comment if needed and choose Release. 

 Image 2 

  • If it is an additional version, choose the type of version, add a Version Comment if needed and choose Release. 
  • The project has successfully been released and is being prepared for deployment. 

Image 3

Step 2 – Deploy the Released Process 

Each project’s released version can be deployed as a business process project in the Process Builder or via the Lobby. The project is made available for usage by others after deployment. Bare in mind that you can only deploy the project’s released version. 

  • Select Deploy from the Business Process project’s released menu in the Process Builder. 

Image 4

  • In this case there are no Variables to set, choose Confirm 

Image 5

  • Choose Deploy. 

 Image 6

  • The project deployed successfully and is now ready for running and monitoring. 

Image%207

Image 7

  • In the project status list next to the project name, you can also view every version of every deployed and/or launched project.Image8

Image 8

 

Step 3 – Create a Trigger 

An API trigger opens a specific endpoint that enables an external application to initiate the execution of an automation or scenario in a selected deployed package via an HTTP POST request. An API trigger is always attached to one automation or scenario in one deployed package. 

  • Select Add Automation Trigger. 

Image%209 

Image 9

  • Select your Application and click Next. 

Image%2010

Image 10

  • Select API and click Next. 

Image%2011

Image 11

  • Set Trigger Name and click Next. 

Image%2012 

Image 12

Step 4 – Create API Key 

An API key is a unique token that may be used as authorization to read access to environments and to run API triggers. For many public endpoints, API keys are used in addition to client credentials. 

  • Head over to SAP Build’s lobby landing page.   

Image%2013 

Image 13
 

  • Go to Settings > API Keys 

Image%2014

Image 14

  • To create your API Key. Click Add API Key 

Image%2015 Image 15

  • Set Name to myAPIKey and click Next. Click Next after selecting both trigger_read and trigger_execute.  
  • and click Next. 

Image%2016

Image 16

  • Click Add

Image%2017

Image 17

  • Click Copy and note down what was just copied to your clipboard. 

Image%2018

Image 18

Step 5 – Create Instance and Service Binding 

Service binding makes the information or credentials needed by the application to access the service instance. 

  • Navigate to SAP BTP Cockpit sub-account > Services > Instances and subscriptions. 
  • Choose Create. 

Image%2019

Image 19

  • For the new instance: 
  • Select SAP Build Process Automation as Service. 
  • From the list of plans, choose the Standard Instance plan. 
  • Select Other as Runtime Environment. 
  • Name your instance “SPA-instance”. 
  • Choose Create. 

Image%2020

Image 20

  • Create a new Service Binding by selecting your SPA-instance instance > Select to expand > Create Service Binding. 

Image%2021

Image 21

  • Put the name as myServiceBinding and click Create. 

Image%2022

Image 22

  • Click and then click View to view the Service Binding created. 

Image%2023

Image 23 

  • Click Form and copy the clientid, clientsecret and URL. It is required in the next phases. 

Image%2024

Image 24

Step 6 – Create API Trigger URL 

An API trigger is always attached to one automation or scenario in one deployed package. 

  • Navigate to Home > Monitor > Triggers/ Automations 
  • Find your trigger. 
  • Choose Edit by clicking Actions. 

Image%2025

Image 25

  • Copy URL and Payload. 

Image%2026

Image 26

Step 7 – Work with Postman 

Postman is an API Platform for developers to design, build, test and iterate their APIs. 

  • Open Postman Workspace.

Image%2027

Image 27

  • Paste the copied URL and set the method to POST 

Image%2028 Image 28

  • Go to Authorisation tab and select OAuth 2.0. 

Image%2029

Image 29

  • Select Configure New token > Grant type > and Paste your Client Credentials. 

Image%2030

Image 30

  • Select Headers and in the value section, paste the api key and give it a random name.. 

Image%2031

Image 31

  • Select Body > raw > json and paste the copied payload with values inside it. 

Image%2032 Image 32

  • Choose the Authorisation tab, enter all the credentials, then click Get New Access Token and Run Body. 

Image%2033 Image 33

  • Finally it displays, Success 200 Ok created. 

 

Summary:

Here you can find some learning content:

https://learning.sap.com/learning-journey/develop-apps-with-sap-build-apps-using-drag-and-drop-simplicity

This short blog can help you to understand basic knowledge about SAP Build Process Automation.

Since i am also new to writing blogs, Expert suggestions & feedbacks are much appreciated.

If you like this blog post you can follow me for more blogs i will try to make in coming future specifically related to SAP BTP Technologies.

 

Thank You,

Tazeem Umra Rajgolkar.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski

      This is a great blog, and helpful to understand the API calls necessary to trigger.

      Just note that you can trigger a process that has an API trigger from the Monitor tab, where you can test the context much more easily (which is usually the biggest problem in the triggering process).

      Also note that your Postman process can be used even further to trigger all kinds of SAP Build Process Automation APIs, as described here: https://api.sap.com/package/SAPProcessAutomation/all

      Author's profile photo Patrick Richarts
      Patrick Richarts

      Hello I am trying to follow your great post But I am stuck at  Step 5 – Create Instance and Service Binding 

      When I select create and choose SAP Build Process Automation and standard plan it tells me that my subaccount is already subscribed to this plan and I am stuck.

      SAP Build Process Automation is subscribed and working but not listed under services.

      Any idea how to resolve this ? thanks, Patrick