SAP CDS DATA SOURCE V1



Get Example source ABAP code based on a different SAP table
  


• AS ABAP_CDS_SELECT_DS_V1

ABAP_CDS_DDL - DDIC-Based View, SELECT, data_source

ABAP_SYNTAX
... entity$[parameters$]$| path_expr $[$[AS$] alias$] $[ join$] ...

What does it do?
Defines a data source of a ABAP_CDS_V1_VIEW . A data source can be a DDIC database table defined in ABAP Dictionary
BEGIN_SECTION VERSION 5 OUT , a DDIC database view, an DDIC external view,
END_SECTION VERSION 5 OUT a CDS view entity, a CDS table function, a CDS hierarchy, or a ABAP_CDS_V1_VIEW .
The data source is specified either directly using its name entity or using a path expression path_expr in which CDS associations are evaluated. Non-SQL CDS entities are not possible as association target of the path expression.
If the data source is a CDS entity with a list of input parameters, actual parameters must be passed to these using parameters.
An alternative name alias for a directly specified data source can be defined after AS. It is also possible to define an alias name without the keyword AS (see example below). If a path expression is used, an alternative name must be defined. The name must comply with the naming rules for names.
The syntax JOIN can be used to combine multiple data sources as joins.



Latest notes:

For an overview of all possible data sources of all available CDS entities, see Data Source Matrix.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
Defines the CDS view demo_business_partner_1 for the DDIC database table snwd_bpa, for which an alternative name partner is specified. This name is used in the SELECT list.
DDLS DEMO_BUSINESS_PARTNER_1
as can also be omitted in front of the alternative name partner. The following example demonstrates another valid spelling that is potentially confusing:
DDLS DEMO_BUSINESS_PARTNER_2
ABAP_EXAMPLE_END