SAP Knowledge Base Article - Public

2825187 - Unable to access oData Services or API of S/4HANA Public Cloud in Browser

Symptom

Facing error while trying to access any oData services of S4HANA Cloud system from the browsers like Chrome, Firefox or Internet Explorer. Sample OData Service: https://myXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/YY1_MATERIAL_STOCK_CDS

Possible Errors:

  • SAML2 service not accessible.
  • Asking for credentials when you open URL in browser.

Environment

S/4HANA Public Cloud (all versions)

Cause

This is caused to due to conflict with SCI or other SAML authentication systems configured in your SAP Cloud systems. Cache saved in your browser for SAML or other authentication causes these errors.

Resolution

To avoid this issue, you need to follow below mentioned steps:

  1. It’s best to open a new Browser Window in incognito/private mode, so we don’t use any existing session or conflict with any other authentication methods.
  2. This API or oDATA service call needed to login via the Communication User you have created while setup of your communication arrangement.
  3. Enter the URL from the last step and it’s typically helpful to add the “?saml2=disabled” parameter to the URL, to avoid any issues with SCI or other SAML authentication systems as mentioned earlier. It’s also important that you click Cancel in any type of Certification Selection Dialog.
  4. This should bring up an Authentication Dialog where you can enter the credentials from the Communication User you have created.
  5. If everything works you should get an overview about the objects in our oDATA service.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental

2019-08-09_10-36-25.png

Here you just have one Object. Need to find the href parameter for that Object and add it to the URL. With the extended URL trigger the browser again and might have to wait for a bit as the CDS view returns thousands of records. Usually the browser will show it nicely XML formatted (or also in JSON if you add parameter $format=json), if there are too many records.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental

2019-08-09_14-48-50.png

See Also

For detailed instruction regarding creation of custom API's go through below mentioned URL. This would provide you information about creation of custom API's in S/4HANA Public Cloud and how to consume them.

https://blogs.sap.com/2018/01/06/s4hana-cloud-integration-an-instructive-example/

Keywords

S/4HANA Public Cloud, SAML2 Service, not accessible, unable to login, API, ODATA call, custom API, SCI , KBA , XX-S4C-OPR-INC , S/4HANA Cloud Availability, Performance and Administration , Problem

Product

SAP S/4HANA Cloud Public Edition all versions