SAP CDS VIEW EXTEND



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS - Extending CDS Views
There are currently two different statements that can be used to extend a CDS view in CDS DDL:
EXTEND VIEW ENTITY
This variant is used to define a CDS view entity extension for a CDS view entity or a CDS projection view .
Available since release ABAP_778 .
EXTEND VIEW
This variant is used to define a CDS view extension that is also linked with a DDIC append view in ABAP Dictionary.
Available since release ABAP_740_SP08 .
Recommended for extending CDS DDIC-based views (obsolete), defined using the statement DEFINE VIEW.

Differences Between View Extensions and View Entity Extensions
A view entity extension does not have a DDIC append view.
For a view entity extension, no name is specified after WITH. A view entity extension has only one name, which is the name of the repository object. This name is assigned in the wizard for creating a new repository object.
In view entity extensions, no header annotations are allowed. That means that no annotations are allowed in front of the statement EXTEND VIEW ENTITY.
View entity extensions were developed for CDS view entities and they have the same advantages, for example, a better performance during activation. The advantages of CDS view entities over DDIC-based views is explained in topic ABAP CDS - DDIC-Based Entities.



Latest notes:

For compatibility and migration reasons, EXTEND VIEW can also be used to extend CDS view entities and CDS projection views. Activation is possible without errors. However, the syntax elements specific to CDS view entities and CDS projection views are not supported in this variant of view extensions. It is recommended that the statement EXTEND VIEW ENTITY is used for CDS view entities and CDS projection views.
ABAP_CDS_V1_VIEWS are obsolete. If new CDS views are required, ABAP_CDS_V2_VIEWS should be used.
NON_V5_HINTS
ABAP_HINT_END