SAP Knowledge Base Article - Public

2687180 - Error Creating KPI or Report From Custom CDS View

Symptom

  • No OData service can be selected when creating a new report or KPI in the Create Reports or Create KPI apps
  • If you are able to select the OData service then you may see an error, "Failed to Load Metadata" , when selecting an entity set

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Create a new CDS view using the Custom CDS Views app
  2. Ensure that OData API is selected for this CDS View
  3. Now go to the app Create Reports
  4. Create a new report, and select the new Custom CDS View
  5. Now attempt to select the OData service, and it may not be available to select (empty list in the value help)
  6. If the OData can be selected, also attempt to select an entity set; you may see the "Failed to Load Metadata" error

Cause

Create Reports and Create KPI should consume analytical queries.

Resolution

  1. Go back to the Custom CDS Views app, and edit your custom CDS view
  2. Uncheck the OData API checkbox, and select the Analytical checkbox
  3. Publish the CDS view again
  4. Now go to the app Custom Analytical Queries
  5. Create a new query using the custom CDS view as the datasource
  6. Select the fields, and filters that you want for the query
  7. Publish the new query
  8. At this point the service will be inactive as seen in the top right-hand corner of the screen, wait until it shows as active, refreshing the status as needed
  9. Once the query is published and the service for the query is active, go to the Create Reports app again to create a new report
  10. A CDS view will have been created for your custom query, so select this as the CDS view for your report
  11. An OData service was generated as well for the query, so select this as the OData service for the report
  12. Select an entity set, and finish creating the report which should now be successful

Keywords

Custom Analytical Queries Custom Analytical Query , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , CA-GTF-SB-S4H , Smart Business for S4HANA , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem

Product

SAP S/4HANA Cloud 1808