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.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

S/4HANA Cloud APIs for Product Master.

SAP Extensibility Explorer for SAP S/4HANA Cloud

S/4HANA Cloud APIs for Product Master are implemented within the Product Integration scenario SAP_COM_0009.

Let me share how to implement both ODATA v2 and ODATA v4 APIs from SAP_COM_0009 with API Management, part of SAP Integration Suite bundle.

Quite recently, when trying to implement some of the APIs from the Product Integration (SAP_COM_0009), I came across an unexpected hurdle while trying to copy a stock s/4hana cloud ODATA v4 API in the API Management Portal.

The Unsupported service code error depicted below is raised because the "ODATAV4” serviceCode is currently not supported by the API Management Portal.

S/4HANA Cloud: Product Integration (SAP_COM_0009)

As a reminder you must have set up a communication arrangement in your S/4HANA Cloud system with the Product Integration scenario SAP_COM_0009.

APIM: Going around the unsupported ODATAV4 serviceCode

The best is to fully implement with APIM some other ODATA v2 API, if possible from the same communication arrangement, and then copy it using APIM copy function.

That's what I eventually did. I had fully implemented with APIM the Product Master (A2X) API. (Including the saml bearer assertion security policy.)

Alternatively one can create a brand new API as well.

  • Please note, the following fields will need to be adjusted before validating the copy:

URL https://my30XXXX-api.s4hana.ondemand.com/sap/opu/odata4/sap/api_productgroup_2/srvd_a2x/sap/productg...
Title Product Group Data – Read

After the copy we need to replace the resources of the new API (if any) with the resources from the Product Group Data API as follows:

  1. Goto Product Group Data - https://api.sap.com/api/PRODUCTGROUP_0001/overview - API Specification. Download the YAML API specification.

  2. Open the YAML file in an external editor and adjust/amend the values of x-targetEndpoint and servers

  3. In APIM, goto Edit in API and replace the description of resources on the right-hand side with the slightly tweaked definition from our target API.

openapi: 3.0.0
title: Product Group Data - Read
version: '1 '
description: |2

This synchronous inbound V4 OData service enables external systems and other consumers to read product group data and their descriptions. This service only supports the GET operation.
<p><a href="https://api.sap.com/api/PRODUCTGROUP_0001/overview"

x-targetEndpoint: >-
description: Business Documentation
url: https://help.sap.com:00443/http.svc/ahp2/SAP_S4HANA_CLOUD/latest/EN/27/9eb92259584b1891753250bc3ae32...
x-sap-api-type: ODATAV4
x-sap-shortText: Read product group data and their descriptions using this synchronous inbound service
x-sap-api-deprecated: 'No'
- name: Communication Scenario
- text: Product Integration (SAP_COM_0009)
format: plain
- name: Scope Items
- text: '[Master Data Integration (1RO)](https://rapid.sap.com/bp/#/scopeitems/1RO " Link To BP ")'
format: markdown
- text: '[Opportunity-to-Order with SAP Cloud for Customer (1VP)](https://rapid.sap.com/bp/#/scopeitems/1VP " Link To BP ")'
format: markdown
- name: Authentication Methods
- text: Basic, x509, OAuth2
format: plain
- name: Service Group Name
format: plain
- name: Business Object
- text: ProductGroup
format: plain
- basicAuthentication: []
- url: >-
https://<APIM Proxy>/PRODUCTGROUP_0001
........... remove all fields after servers and before tags....................
............... the rest of the file is unchanged..............................

The end result is shown below:


Next steps

Once you are done with the prototyping of the APIs with SAP APIM you may want to go to the next level and implement them with the destination service on SAP BTP.

I have scrambled a sibling blog, namely S/4HANA Cloud Product Master APIs with OAuth2SAMLBearerAssertion that will tell you this story



Additional resources