SAP Knowledge Base Article - Public

2997519 - Not possible to delete elements inside a Custom CDS View

Symptom

You are using the Custom CDS Views app and you are trying to delete an element under "Elements" tab but the "Delete" button is greyed out.

Environment

SAP S/4HANA Cloud, Public Edition

Reproducing the Issue

  1. Go to the Custom CDS View app 
  2. Open the Custom CDS View YY1_XXX
  3. Click on the edit button 
  4. In the Elements tab, select the element that you want to delete 
  5. Delete button is greyed out

Cause

When a Custom CDS View is used by other objects (dependencies exist), then it has to be kept stable by not allowing INCOMPATIBLE changes that can invalidate the dependent objects.

If the custom CDS view has dependencies on other objects, there are the following limitations to ensure stability at all times:

  • Associations cannot be removed or changed.
  • Fields with dependencies cannot be removed or deleted.
  • Properties of existing fields can only be changed in a compatible way.

Only compatible changes are possible: adding new fields and associations.

Your Custom CDS View has a dependency with other items, such as Custom Analytical Query, another Custom CDS View or a Custom Communication Scenario.

It might happen that the element is also being used by a Calculation in the same Custom CDS View.

For some elements the button "Delete" might not be greyed out. This will happen for elements that are not being used by any dependency item.

Note: The dependencies of CDS views are displayed in the top left corner. Click on the number of dependencies, to display details about the dependent objects.

Resolution

Deleting the field will only be possible when the dependency object is removed.

If the element is being used by a calculation, you need to either remove the calculation or remove the element from the calculation before deleting the element.

If the Custom CDS View has a dependency with a Custom Analytical Query, you need to remove the usage of the element in the Custom Analytical Query before deleting the element.

If the Custom CDS View has a dependency with a Custom Communication Scenario, you need to remove the inbound scenario (YY1_XXXX_CDS) in the Custom Communication Scenario, remove the element from the Custom CDS View and add again the inbound scenario.

See Also

Editing Custom CDS Views

Keywords

Delete association, change association, custom cds view,  dependencies, /BOBF/FRW_COMMON/108, delete button, not possible , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , Problem

Product

SAP S/4HANA Cloud 2011