SAP CDS FIELD V2



Get Example source ABAP code based on a different SAP table
  


• fields ABAP_CDS_SELECT

ABAP_CDS_DDL - CDS View Entity, field

ABAP_SYNTAX
... $[entity.$]field$|$[alias.$]field ...

What does it do?
Field of a data source entity of the current CDS view entity. field expects the actual name of the element. Any alternative element names defined using AS cannot be used, with the exception of the ON condition of a CDS association.
If the view entity makes use of multiple data sources by using join expressions, then all fields must be prefixed with the name of their data source separated by a period (.). The prefix is required in all cases, even if the field names are unique.
For fields that are included via associations, special rules apply. See topic CDS DDL - CDS View Entity, path_expr.

ABAP_EXAMPLE_VX5
The CDS view entity DEMO_CDS_SCARR_SPFLI_2 defines a join and therefore, all fields from the SELECT list must be prefixed by the name of their data source.
The second CDS view entity shown below, DEMO_CDS_FIELDS_ASSOC_VE , defines an association and all fields of the association target that are used in the SELECT list must by prefixed by the name of the data source.
DDLS DEMO_CDS_SCARR_SPFLI_2
DDLS DEMO_CDS_FIELDS_ASSOC_VE
ABAP_EXAMPLE_END