Symptom
When using the Custom CDS Views app to try to delete an element under "Elements" tab but the "Delete" button is greyed out.
OR
When using the Custom CDS Views app to try to edit a Calculation but the "Apply" button is greyed out.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to the Custom CDS View app
- Open the Custom CDS View YY1_XXX
- Click on the edit button
- In the Elements tab, select the element that needs to be deleted
- 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.
The 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/Editing the field will only be possible when the dependency object is removed.
If the element is being used by a calculation, it's necessary 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, 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, 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
SAP Help Portal - Editing Custom CDS Views
KBA 3131688 - Unpublished changes cannot be undone on Custom CDS with "External API" scenario
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