SAP Knowledge Base Article - Public

2960901 - [Best Practice] How to capture the OData query when using import data connection to acquire data from S/4HANA On-Premise system in SAP Analytics Cloud (SAC)

Symptom

  • Unexpected problems occur when using import data connection to acquire data from S/4HANA On-Premise system in SAP Analytics Cloud (SAC) 
  • What trace can be used to capture the OData query (call)?
  • How to verify or test the same OData call inside S/4HANA On-Premise system?

Environment

  • SAP Analytics Cloud (Enterprise) 
  • SAP Cloud Connector
  • SAP S/4HANA On-Premise

Resolution

Method 1: Leverage the SAP Gateway Tracing Tool (Recommended)

  1. Log into your S/4HANA system.
  2. Run transaction code: /n/iwfnd/traces.
  3. Add the connection user used in S/4HANA connection for the data import.
  4. Change the Error Log Level from Secure to Full.
  5. Enable (check) the Payload Trace option.
  6. Go to SAC, and import the data from the specific OData service in the SAP S/4HANA system.
  7. After the import is executed, check the collected trace in Payload Trace table.
    SAP Gateway Tracing Tool.png
  8. Double click the OData call having the issue where you can see both Request & Response.

  • Using this way, you do not need to run the OData call using transaction: /IWFND/GW_CLIENT as the response shown here could help decide on next actions.
  • See Configuring Tracing Tools and Payload Trace for further information.

Method 2: Leverage the Traffic Trace of SAP Cloud Connector

Note: this trace can be used for the whole workflow of importing data from SAP S/4HANA, from creating connection to loading data from specific OData service.

  1. In the SAP Cloud Connector (SCC), in the "Log And Trace Files" section, tick option "Payload Trace" per KBA 2452568 - Log and Trace files for SAP Cloud Connector.

  2. Go to SAC to try creating a new model or refreshing import job in existing model based on the import data connection to SAP S/4HANA.
  3. Go back to SAP Cloud Connector, in the "Log And Trace Files" section, find the "traffic_trace_<account id>_on_<landscapehost>.trc" with the most recent Timestamp displayed. Click the download button under "Actions" on the right side. 
  4. In the downloaded trace, find the latest Request like "GET https://<Host:port>/sap/opu/odata/sap/...$format=json HTTP/1.1..Authorization: Basic".
    => It may be shown in multiple lines at the right side so you may need to copy each line till the space before  "HTTP/1.1" (like bolded text above).
    => If you have trouble to copy the full OData call out from the trace file, you can provide the downloaded trace file to SAP Support.

Method 3: Leverage the RSTT trace in the S/4HANA system

  1. Collect the RSTT trace according to SAP KBA 2834064.
    => Not all OData call sent to CDS View in S/4HANA On-premise system can generate RSTT trace, which depends on type of CDS View.
    => If RSTT is not generated, please leverage Traffic Trace of SAP Cloud Connector to capture OData call, which should always work.
  2. In transaction RSTT, go to Trace collection to find the latest generated trace records by the Trace User.
  3. Double click the last record (sometimes, there will be multiple records generated for one workflow performed in SAC).
  4. Display Parameters.
    OData Parameters.png
  5. Search with keywords 'uri' and then you can find the OData call sent from SAC (starting with /sap/opu/odata/sap).

    OData URI.png

Verify / Test the same OData call in the S/4HANA On-premise system (for Method 2 and Method 3 only)

  1. Log into your S/4HANA On-premise system.
  2. Start transaction: /IWFND/GW_CLIENT.
  3. Put the copied OData call into Request URI and click the Execute button.
  • If you capture the OData call from traffic trace of SAP Cloud Connector, you need to remove "https://<Host:port>" and just use "/sap/opu/odata/sap/...$format=json".
  • If the issue is reproducible and is independent of SAP Analytics Cloud, the source system issue will require assistance from the source system component support team.
  • For example, component BW-BEX-OT-BICS-EQ for custom CDS View or the relevant component delivering the standard CDS View, from which the OData service is exposed.

See Also

Your feedback is important to help us improve our knowledge base.

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, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, OData, Call, S/4HANA, S4, import, acquire, test, validate, GW_CLIENT, collect, capture, RSTT,

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, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, https://hcs.cloud.saphttps://hanacloudservices.cloud.saphttps://cloudanalytics.accounts.ondemand.comhttps://hanacloudservices-us.accounts.ondemand.comhttps://www.sap.comhttps://help.sap.com, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software epm, business intelligence,
, KBA , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , OPU-GW-COR , Framework , LOD-ANA-ML-DI , Data Integration, Data Export API, Data Import API , How To

Product

SAP Analytics Cloud 1.0