Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
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 its 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.

Activate Available OData in SAP Gateway


While all SAP systems come with a list of available APIs, the endpoint you need may not be activated even if that functionality is already in use. For our example, we want to display Purchase Contracts just as it’s done through transaction code ME33K.

Activate


Through the documentation on SAP API Business Hub, we know that our technical service name is API_PURCHASECONTRACT_PROCESS_SRV. With this information, we can confirm through transaction code /n/iwfnd/maint_service if our endpoint is already activated. If so, it will be listed here.

For this example, we see that it’s not activated - below are the steps to activate it.

  1. Go to transaction code /n/iwfnd/maint_service

  2. Click on Add Service from the top header

  3. At the next screen,

    1. System Alias: LOCAL

      1. Note: my system here leverages an embedded gateway. For a Hub deployment, you’ll want to execute these steps in the Gateway system and reference your backend system for the Alias.



    2. Technical Service Name: API_PURCHASECONTRACT_PROCESS_SRV

    3. Click on Get Services on the top left



  4. The Select Backend Services will display the OData service. Click on the leftmost cell in the row, and then click on Add Selected Services.

  5. At the Add Service screen, click on Local Object so $TMP appears and then click execute on the bottom right.

  6. If all goes well, you should receive this message


 

 

 

 

 

 

Test Activation


Now that the OData service has been activated, we want to test that it functions as expected.

  1. Go to transaction code /n/iwfnd/maint_service

  2. Find the activated OData through the Technical Service Name Click on it and select SAP Gateway Client.

  3. In the Gateway Client, click on EntitySets from the top header

  4. Double-click on A_PurchaseContract

  5. Click on Execute

  6. You should receive status_code 200 and the resulting data will appear under the HTTP Response section


With the steps noted above, you'll be able to continue with the development of your iRPA Bot even if the required OData service isn't activated. Knowing how to activate an OData service on the SAP Gateway is a valuable skill to have in your toolset and removes a potential impediment from your iRPA project.

2 Comments