SAP PROCESS AUTOMATON ( IRPA/SPA ) Consume API Directly for Create/Read/Update/Delete Operations
In this blog , will be demonstrating how to use SAP Standard API in SPA. This approach helps us in avoiding fetching X-CSFR token manually in the automation steps where first GET call is required to get token and later the token is used in POST Call.
It will also avoid maintaining User/Password in SPA process as these details will be directly fetched from the BTP destination.
Even Test functionality is available.
This is my first blog 🙂
**All the images are captured from SAP Trail Account for BTP Cockpit and SAP Process Automation**
Will be using API – API_MAINTENANCEORDER
- Download the API Specification from SAP API HUB.
- Expose the API end-point in BTP destination (Add sap.applicationdevelopment.actions.enabled and sap.processautomation.enabled in Additional Propertes with value true)
- Add the Same Destination in SAP Process Automation.
- Create Action in Lobby.
- Upload the API Specification download earlier.
- All the CURD operations related to this API will be available to use directly. In this case we will be using POST for Maintenance Order Entity Set (This will be creating Maintenance in S/4 ). Use different CURD operations according to your use case.
- Click on Enable X-CSRF ( not required for GET call ) and select the required fields required to create order.
- Use Test option before Release and then Publish to Library.
- Create New Task Automation. Go to Settings -> Dependencies -> Add Dependency -> Add an action project.
- Select the Action created.
- Go to Action Groups and select the action added. Fields required to create orders will be available to use. Add the data according to your use case and run the automation.
Please provide feedback in the commnets.
As this will encourage and will add more to SAP Community.