SAP Knowledge Base Article - Public

2659496 - Incorrect Data in Preview of Custom CDS View or Custom Analytical Query

Symptom

When previewing the data of a custom CDS view, or custom analytical query, the data may not appear to be correct

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a new custom CDS view using the Custom CDS Views app, based on a standard data source 
  2. Select the fields that you want for the view, changing at least one of the key fields to be a field from an associated data source
  3. Optionally, create a custom analytical query using the Custom Analytical Queries app
  4. Now when previewing the data for the CDS view or the query, there may be incorrect data for some rows

Cause

This can happen if you change the key fields to be a field from an associated data source

Resolution

  1. Change the key fields of the CDS view to use the default defined key fields
  2. Check to see if the preview is now showing the correct data
  3. If this resolves the issue then always ensure that any changes to the key fields of a CDS view are done with caution, especially when adding associated data source fields as key fields

Keywords

Associated key field preview view browser , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem

Product

SAP S/4HANA Cloud 1805