SAP Knowledge Base Article - Public

3618753 - How to replace a deprecated element inside a Custom CDS View in S/4HANA Cloud

Symptom

An element of a released CDS view may receive the status deprecated. Deprecated CDS views and deprecated elements continue to work as before, but it's recommended that you don't create any new content based on them and that you adapt your existing content to use successor views.
 
With each software upgrade, tasks are automatically created for prominent occurrences of deprecated CDS views or deprecated CDS view elements in the custom content that you created via key user tools. This prompts you to rework your content accordingly. You can use the Extensibility Inventory app to check the dependencies of related items under the task category Deprecation. For more information, see Extensibility Inventory.
 
You might also face the following rework task:
Element XXXX of CDS view XXXXX is deprecated. Use element XXXX instead. 
 
 
Check this KBA to find out how to replace the deprecated elements inside of your Custom CDS View.
 

Environment

SAP S/4HANA Cloud Public Edition.

Resolution

  1. Open the Custom CDS Views application 
  2. Search for the Custom CDS View that has deprecated elements 
  3. Click on the Custom CDS View to open it 
  4. Click on "Edit" button 
  5. Go to "Elements" tab
  6. The elements that are deprecated can be identified by the Warning Icon in "Task" column. If you click on the Warning Icon, you can easily see the successor for the element.
    Example:

    Other way to find the successor element is going through the documentation https://help.sap.com/s4hanacloud under What's New. As soon as a CDS view, or one of its elements, is deprecated, this is announced in the What's New documentation of the corresponding release.
  7. Click on "Add" button and add the successor elements 
  8. Select the deprecated elements and click on "Delete" 
    *In case the delete button is greyed out, check KBA 2997519 - Not possible to delete elements inside a Custom CDS View - SAP S/4HANA Cloud Public Edition
  9. Click on "Publish" 
  10. Now your Custom CDS View is updated with the successor content

See Also

SAP Help Portal | Deprecated and Decommissioned CDS Views

SAP Help Portal | Working in the Custom CDS Views app

Keywords

custom cds views, deprecated, decommissioned, replace, substitute, successor, delete, remove, change, update, field, element , KBA , BC-SRV-APS-GKE , Generic CDS Key User Editor , How To

Product

SAP S/4HANA Cloud Public Edition all versions

Attachments

Pasted image.png
Pasted image.png