ABAP Core Data Services (CDS) were created with application development on SAP HANA in mind. For SAP customers, a CDS view can be easily extended to cater custom requirements. What follows is a detailed, step-by-step guide on how to extend CDS views with ABAP.

How to Extend a CDS View with ABAP

  • Logon to ABAP ADT perspective in Eclipse

ABAP CDS Views

  • Locate your existing CDS view. In my example, I already have a simple CDS view YKD_EKPO.

ABAP CDS Views

Create an Extension view

  • Create a new Data Definition.

ABAP CDS Views

  • Tech name of CDS view is YKD_EXPO_EXT.

  • Click Next and Select Extend View and hit finish.

  • Give a meaningful – YKDEKPOEXT name for SQL view and give the base view – YKD_EKPO which needs to be extended.

  • Remove the syntax- base_data_source_name.element_name.
    • And hit Control+Space.
    • In my case, I am selecting field BUKRS- Company Code and ELIKZ- “Delivery Completed” Indicator.

ABAP CDS Views

  • Ensure to add the below annotation to this extension CDS view. This would show the text for the Append in next step:
    • @AbapCatalog.compiler.compareFilter: true
    • Activate the view and you are all set.

CDS Views ABAO

  • Validate the Base SQL view in SE11 T- code.

  • You would notice a spiral icon on the base CDS view which represents that this view has been extended.

CDS Views ABAP

  • Finally, Validate the new fields in SE16 for the base CDS view.

CDS Views ABAP