SAP Knowledge Base Article - Public

3437897 - Fail to consume specific odata service through Import connection to S/4 HANA in SAP Analytics Cloud(SAC)

Symptom

  1. When trying to use Odata service Service_Name in SAP Analytics Cloud(SAC) from S/4 HANA system using import connection, the query panel show at first, but close automatically.
  2. At the same time, get below error: The user doesn't have permission to access the requested resource. 
  3. In har file, error message is:
     "result": "{\"error\":{\"code\":\"ERROR_ACCESS_DENIED\",\"rawError\":\"Access was denied.\",\"params\":[]}}"
  4. Accessing the ServiceCollection call. see the metadata url has a version parameter: /sap/opu/odata/sap/<Technical Name>;v=0002/$metadata , which seems to different from the hardcoded odata path from SAC.

Environment

SAP Analytics Cloud(SAC) 2023.21.8

Reproducing the Issue

  1. Access SAC tenant.
  2. Go to modeler and create new model.
  3. Select Query: Service_Name.
  4. Select any table under it.
  5. Click Next.
  6. The query builder will show and disappear rapidly.
  7. See error: The user doesn't have permission to access the requested resource

 

Cause

  1. Properties of this OData service in ServiceCollection of S/4HANA Gateway are as below:
    • <d:MetadataUrl>http://<S4 system>/sap/opu/odata/sap/<Technical Name>;v=0002/$metadata</d:MetadataUrl>
  2.  The OData request & response in SCC Payload trace is different from above metadata URL, which include "v=0002" to indicate the technical service version. In the response, we can see the error "No service found for namespace '', name ' OData service ID ', version '0001'.
  3. SAC doesn't use the metadata URL from ServiceCollection of S/4HANA Gateway directly. Instead, SAC should rebuild the OData URL based on: <Data Service URL in connection> + "/sap/opu/odata/sap/" + <OData service ID =  Title shown in Service Collection> without considering service version different from 1.

Resolution

  • This is a designed behavior. For S4 connection type, we initially hardcoded the OData clients to have the paths: https://<s4system>/sap/opu/odata/sap/<ODataService>, the v=2 parameter will not be added by default. 
  • Suggest customer to try the generic OData service connection for these queries so that they could add the version information.

See Also

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable,import,import connection, odata service, S4,S4HANA,S/4HANA , KBA , LOD-ANA-AQU-ODATA , Acquiring Data into SAC using an ODATA connection , Problem

Product

SAP Analytics Cloud all versions