Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
FDias
Explorer
Scenario:

You are looking to build a business process integration between SAP S/4HANA and SAP S/4HANA Cloud, extended edition or SAP Business Suite(also referred to as SAP ERP6 or SAP ECC6) or a non-SAP system and have been asked to look at the SAP API Business Hub to find a suitable whitelisted OData/REST or SOAP/WebService API. How do you find this API in SAP S/4HANA Cloud, extended edition via SAP Transaction Codes(TCodes)?

 

*Important Note: This blog helps you discover the whitelisted API's (originally provided for SAP S/4HANA Cloud, essentials) for SAP S/4HANA Cloud, extended edition; however, while an API can be found on SAP API Business Hub and in SAP S/4HANA Cloud, extended edition, you still need to check if the structure and functional coverage of the API will cover your use case/business requirements in SAP S/4HANA Cloud, extended edition.

 

Reference:

For the latest SAP S/4HANA Cloud, extended edition extensibility guide, please refer to SAP OSS Note: 2920697-Extensibility Guide for SAP S/4HANA Cloud, extended edition

Summary & Prerequisites:

  1. Know your business process integration requirements and the business object, for example, Sales Order, Product Group or Purchase Order, Journal Entry etc.

  2. Go to SAP API Business Hub (https://api.sap.com) and login with your S# ID

  3. Log into the SAP S/4HANA Cloud, extended edition system (Development system) via SAP GUI - NOTE: I am using a Sandbox SAP S/4HANA, extended edition system (recent release version 1909 FPS01) for my screenshots and documentation steps here

  4. Ensure you read the following OSS Note and SAP Help link for appropriate SAP authorizations:

    1. For SAP Gateway - https://help.sap.com/erp_hcm_ias2_2015_01/helpdata/en/24/f82651c294256ee10000000a445394/frameset.htm

    2. For SAP transaction code SOAMANAGER – OSS Note: 1725979 - Security standard SEC-250 and Web service roles




 

NOTE: All screen shots you see below are created while on a sandbox system of SAP S/4HANA Cloud, extended edition using release 1909 FPS01. These screen shots are meant as examples and so please create your scenario based on your respective system and naming conventions.

 

Steps to discover OData/REST API in SAP S/4HANA Cloud, extended edition:

  • On API Hub:







    • In the Search bar, type in your business object for example, Product Group and then click on the OData API you need for your integration scenario









    • Once in the required OData API, click on Details tab and locate the technical name of the API as highlighted in the screenshot under the Specification/Attributes section, for example API_PRODUCTGROUP_SRV (Hint: the technical name of the API will be at the end of the Endpoint URL for Sandbox URL and Production URL)









    • Note down the technical name (e.g. API_PRODUCTGROUP_SRV) of your API as we will now locate this in SAP S/4HANA and SAP S/4HANA Cloud, extended edition



  • In SAP S/4HANA Cloud, extended edition:

    • Log into your SAP S/4HANA Cloud, extended edition system (starting with Development or Sandbox instance)

    • Via SAPGUI, go to transaction code /IWFND/MAINT_SERVICE

    • Search for your API with the technical name we noted down from SAP API Business Hub steps above

    • If you do not find your API in the Service Catalog frame, create it with a Z or Y name by clicking on ‘Add Service’ button as shown here









    • Enter your API name ‘API_PRODCTGROUP_SRV’ from API Hub in Technical Service Name and enter ‘LOCAL’ for System Alias as seen below









    • Click on ‘Get Services’









    • Highlight the row of your required API service in the section Select Backend Services and click on ‘Add Selected Services’ button









    • Ensure your Technical Service Name starts with Z or Y e.g. ZAPI_PRODUCTGROUP_SRV and for Package Assignment, click on Local Object (for this example) e.g. $TMP > click on green check mark i.e. Enter button










    • Go back to the initial Service Catalog screen of TCode:/IWFND/MAINT_SERVICE & find your API service created in the step above









    • Highlight the row by selecting you required API Service









    • Highlight the ODATA row under ICF Nodes section/frame and then click on button “SAP Gateway Client” which will then launch in a separate window









    • In the SAP Gateway Client window, you can test your API service for the different methods like GET, POST, PATCH, READ etc. if it supports CRUD operations









    • We will test a simple GET method in this example by updating the end of the Request URI, ?format=xml to $metadata as such /sap/opu/odata/sap/API_PRODUCTGROUP_SRV/$metadata” > Click on ‘Execute’ button









    • Above you will see the metadata information about this API and at this point you can further update your GET method for the required results your business process integration might require




 

 






    • TCode SPRO > SAP NetWeaver > SAP Gateway > OData Channel > Configuration > Connection Settings > Activate or Deactivate SAP Gateway - activating SAP Gateway in case it is deactivated





 

Steps to discover SOAP/WebService API in SAP S/4HANA Cloud, extended edition:

  • On SAP API Business Hub:

    • Go to SAP API Business Hub and login with your S# ID

    • Click on the tile ‘SAP S/4HANA Cloud’

    • In the Search bar, type in your business object for e.g., Purchase Order(Inbound, Asynchronous) and then click on the SOAP API you are researching for your integration scenario









    • Once in the required SOAP API, click on API References tab and locate the object name of the API. You can search this object name by Port Type name for e.g. PurchaseOrderRequest_In or by the Port binding location for e.g. mmpur_purchaseorderrequest_in









    • Note down the object name (e.g. PurchaseOrderRequest_In or mmpur_purchaseorderrequest_in) of your API service as we will now locate this in SAP S/4HANA Cloud, extended edition




 

  • In SAP S/4HANA Cloud, extended edition:

    • Via SAPGUI, go to transaction code SOAMANAGER, which will launch a browser window

    • Under Service Administration > Click on Web Service Configuration









    • Enter the name of the object(for e.g. mmpur_purchaseorderrequest_in) in Object name location and click on Search









    • Under Internal Name column, click on the link for your SOAP API service, for e.g. ‘mmpur_purchaseorderrequest_in’, and you will be brought to the Define Service and Bindings screen > Click on Create Service button









    • Enter Service Name, description and binding name. In this example, I’ve used the Service Name for the Binding Name with the exception of using ‘_BND’ at the end of the name to distinguish between Service Name and New Binding Name > Click Next









    • For this example, I have selected basic UID/Password authentication but for your productive usage, you must secure this channel and message authentication > click Next

    • In this example, I am not using a load balancer to enter an alternate URL but if your productive system has such an LB in front of it, you can enter that alternate URL here > Click Next

    • Accept default values here and click Finish

    • Click on the icon “Open Service WSDL Generation” under the Actions column for the API Service “PURCHASEORDERREQUEST_IN”









    • In this window you will find your SOAP endpoint URL towards the bottom and you can also explore the WSDL service here. For the SOAP endpoint URL see the line in the ‘WSDL URL for Service’ box









    • Click on the icon ’Open WSDL Document for selected binding or service’ for launching the WSDL service file which will launch in a new browser window




 

That's it for now! I hope this helps you with your integration and extensibility in SAP S/4HANA Cloud, extended edition.

Appreciate your feedback.

 
8 Comments