Due to limited in-app extensibility options with SAP S/4HANA Cloud, side-by-side extensions are important to bridge the gaps, when business requirements exist that cannot be fulfilled otherwise.
SAP Business Technology Platform, ABAP environment plays an important role in building side-by-side extensions for SAP S/4HANA Cloud. In this post, we’ll focus on building an SAP API Business Hub extension for the public cloud version of SAP S/4HANA Cloud. SAP API Business Hub is a central location for exploring, discovering, and consuming APIs, prepackaged integrations, business services, and even sample apps created by SAP and selected partners.
To access the SAP API Business Hub, navigate to https://api.sap.com/. You’ll see the screen shown in this figure.
On the landing page, on the left, you’ll see the different products, content types, and themes. From this menu, you can easily navigate to specific products/content types. The main part of the screen is the work area, which enables you to browse through different products and content.
The first product displayed in top-left corner of the work area, is the SAP S/4HANA Cloud tile. On the tile, you’ll see the current number of released APIs that are available. This number increases with each new quarterly release, and at the time of this writing, almost 400 APIs are available.
Click on the SAP S/4HANA Cloud tile to enter the section containing the available APIs, as shown below.
Note right away that two types of APIs are available: OData and SOAP. On the left, you can filter the display based on one of the two supported technologies. Also, you can filter APIs by keyword, sort APIs, and change the display (grid/list).
For example, let’s say you want to know what APIs are available for sales orders. Simply type “sales order” into the filter field and submit. The result, shown in the figure below, is a list of all APIs that contain both keywords (“sales” or “order”) in its title or its description.
As shown above, the list contains APIs for sales orders, but also other APIs that partially match the search criteria. The most relevant APIs will be listed at the top of the result list.
Let’s explore the Sales Order (A2X) API. When you click on this tile, you’ll see two sections: API References and Details. In the API References section, you’ll see details about the API itself, as shown in the next figure. Since this API is an OData API, you’ll see the available nodes, operations, examples, etc. You can even execute test calls on a sandbox SAP S/4HANA Cloud system (if you have one) or on your own system (previous configuration is required).
For a SOAP API, you’ll see much less information, without the capability to perform test calls. To configure an API on your source system, look at the Details section, shown in the final figure.
Scroll down to get to the important information, such as the service URL, communication scenario, scope items in which this API is used, documentation, etc. With this information, you can start configuring the SAP S/4HANA Cloud side to make the API ready for the consumption from SAP BTP, ABAP environment.3
Editor’s note: This post has been adapted from a section of the book ABAP in the Cloud: Development and Operations with SAP BTP, ABAP Environment by Gairik Acharya, Aleksander Debelic, Shubhangi (Deshmukh) Joshi, and Aayush Dhawan.