SAP Knowledge Base Article - Public

3554287 - CDS Views with privileged access are not showing data in preview mode

Symptom

Standard CDS Views that have "Privileged Access" as primary datasource to build a Custom CDS View and when trying to preview data it's empty and returning the message "No Data". 

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Open Custom CDS Views.
  2. Search for the documented views.
  3. Click 'Preview Data' button.
  4. No data will display.

Cause

  • Custom CDS View inherits its protection exclusively from its primary data source. 
  • Custom CDS view has the status privileged only, the data contained can't be accessed directly and cannot be exposed as an external API.
  • Such views are primarily intended to be used as associated Data Sources in other CDS views.

Resolution

  1. Open the application "Custom CDS Views".
  2. Choose a primary datasource for the Custom CDS View and use the view with privileged access as an association datasource.
  3. Perform a Join Condition.

See Also

Access Protection in Custom CDS Views | SAP Help Portal

Keywords

CDS Views, primary, association, datasource, no data, privilege, join condition , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem

Product

SAP S/4HANA Cloud Public Edition all versions