Ansicht
Dokumentation

ABENCDS_DATA_SOURCE_V2 - CDS DATA SOURCE V2

ABENCDS_DATA_SOURCE_V2 - CDS DATA SOURCE V2

General Data in Customer Master   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- CDS View Entity, SELECT, data_source

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

Effect

Defines a data source of a CDS view entity. A data source can be a DDIC database table, a CDS view entity, a CDS table function, a CDS hierarchy, or a .

  • 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.
  • An alias name alias for a directly specified data source can be defined after AS. The name must comply with the naming rules for names.
  • The syntax JOIN can be used to combine multiple data sources as joins.

Note

If the data source after FROM is specified as a path expression and if, additionally, the view defines an association, then there's a conflict because in the ON condition of an association, it is not possible to specify a path expression. To prevent this conflict, the following options are available:

  • Use the $projection syntax in the ON condition
  • Assign an alias name to the data source
  • Resolve the path expression and use the association target as prefix in the ON condition.

Example

Defines the CDS view entity DEMO_CDS_DATA_SOURCE with two data sources:

  • The first data source demo_cds_param_view_entity requires values for three input parameters. It is assigned the alias name source1. To use this data source in the SELECT list, the alias name source1 must be used as prefix.
  • The second data source scarr is defined using an inner join. It is assigned the alias name _source2. To use this data source in the SELECT list, the alias name _source2 must be used as prefix.





BAL Application Log Documentation   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 5211 Date: 20240420 Time: 080227     sap01-206 ( 53 ms )