SAP Knowledge Base Article - Public

2726056 - Cannot Add Key Field to Custom CDS View

Symptom

Error occurs while adding key field to a custom CDS view in the Custom CDS Views app:

Adding the key field <ID of field> is incompatible

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Create a new custom CDS view in the Custom CDS Views app
  2. Save and publish this new view
  3. Add a key field or change a current field into a key field in the view
  4. Attempt to save the view and the error will occur

Cause

The key of the CDS view must remain unchanged after the CDS view has been created

Resolution

Change the type of the new field to "Field" instead of key, as it is not possible to add a new key to the view

Keywords

KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem

Product

SAP S/4HANA Cloud 1811