Skip to Content
Technical Articles

Get Full URL & Sample Payload from SAP Gateway

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 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

  1. Run transaction code /n/iwfnd/maint_service
  2. Click on the row with ZAPI_SALES_ORDER_SRV
  3. Click on the SAP Gateway Client button at the bottom of the screen
  4. 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:

  1. Get to the Gateway Client for ZAPI_SALES_ORDER_SRV
  2. Click on EntitySets
  3. This is the list of EntitySets for our OData endpoint. Double-click on A_SalesOrder
  4. 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.
  5. 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.

1 Comment
You must be Logged on to comment or reply to a post.
  • Thanks for sharing but there are many SCN blogs already that describe how to use Gateway Client (by the way, you could just use transaction /IWFND/GW_CLIENT to get there directly). This is just one of them. You’d find them in SAP Gateway tag, no idea why we have another tag for “NW ABAP Gateway” on SCN.