SAP Knowledge Base Article - Public

3231059 - How to connect to a specific odata service of SAP S/4HANA Cloud system from BAS with basic authentication

Symptom

How to connect to a specific odata service of SAP S/4HANA Cloud system from BAS

Environment

BAS and SAP S/4HANA Cloud

Cause

WebIDEUsage odata_abap is used for catalog service to load all the service for selection in the BAS. And SAML is required in this case. (Connect SAP Business Application Studio and SAP S/4HANA Cloud Tenant)

If you want to use basic authentication, WebIDEUsage odata_gen should be used and should not maintain both odata_abap and odata_gen for WebIDEUsage.

Resolution

If you want to create a SAPUI5 application in BAS and consume the odata service from a SAP S/4HANA Cloud system just by using the basic authentication without configure the SAML, you can set up the destination of the system in the following way:

1. Set the URL to : https://myxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/

2. Set the WebIDEUsage to odata_gen

3. Set the HTML5.DynamicDestination to true
4. For the User anme and password, it should be the communication user name and password which is used by the communciation arrangement in the S/4HANA Cloud.
Here is an example:

5. When creating the SAPUI5 application from the BAS, for the service field, please directly input the service name, for example: YY1_TESTAPI_CDS as the prefix https://myxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/ is already configured in the destination.

Keywords

BAS, API, S/4HANA Cloud, WebIDEUsage , KBA , CA-UX-IDE , SAP Fiori tools , CA-UI5-FL-ADP-BAS , SAPUI5 Adaptation Project for SAP BAS , Problem

Product

SAP S/4HANA Cloud 2202