SAP’s Intelligent Robotic Processing Automation (iRPA) transforms manual and repetitive steps to streamline the production of rapid and successful outcomes. In the process of building these automations, I’ve honed my skills as an iRPA Developer and started to incorporate API web calls to SAP systems. Through this process it became apparent that there was an opportunity to learn a new skillset that would help make me a well-rounded technologist. Being able to support all phases of the end-to-end development process for an automation scenario will lend to quicker development cycles. The result: you won’t require additional support to stage, configure, or troubleshoot systems, when and where it is appropriate (that is, having proper authorizations, following your organization’s change management process, to give a few examples)
Hence, the goal with this series of blog posts is to curate my notes from the help I’ve received while developing iRPA bots to execute API calls to SAP systems. My hope is that this collection will assist anyone who may need to make and troubleshoot API backend calls for iRPA, or for any other type of development.
- Get Full URL & Sample Payload for SAP Gateway
- Activate Available OData in SAP Gateway
- SAP Gateway Tracing and Error Checking
Get Full URL & Sample Payload from SAP Gateway
As often is the case, you may just be given the OData endpoint and SAP sid and client to use. This isn’t enough information for an iRPA bot to communicate with an SAP backend. Nevertheless, you can use transaction code /n/iwfnd/maint_service to get the full URL. For our example, our OData endpoint is ZAPI_SALES_ORDER_SRV.
Get Full URL
- Run transaction code /n/iwfnd/maint_service
- Click on the row with ZAPI_SALES_ORDER_SRV
- Click on the SAP Gateway Client button at the bottom of the screen
- Click on HTTPS and the full URL will appear in the Requested URI field. If you need the HTTP address, click back on the HTTP radio button.
Get Sample Payload
There are several ways you can get a sample payload and the available entities. The SAP API Business Hub will have this information. For our example, the entity and sample payload can be found here.
The other way to obtain is through transaction code /n/iwfnd/maint_service.
Each method has advantages over the other and the best approach is to use both. The payloads through the SAP API Business Hub will give the stripped-down versions of working payloads while through /n/iwfnd/maint_service, you can see actual data that works in the system you’ll be using.
To get the sample payload through /n/iwfnd/maint_service:
- Get to the Gateway Client for ZAPI_SALES_ORDER_SRV
- Click on EntitySets
- This is the list of EntitySets for our OData endpoint. Double-click on A_SalesOrder
- Append ?$top=1&$format=json to the end of the OData URI to return one payload in json format. Hit Execute at the top left.
- The requested payload will appear in the HTTP Response section.
In all, you will be able to obtain the full URL and sample payload by following the steps detailed in this blog post. Knowing how to navigate and leveraging the SAP Gateway will assist with developing your iRPA Bot to make API calls to SAP systems.