Ansicht
Dokumentation

ABENPATH_EXPR_IN_COLSPEC_ABEXA - PATH EXPR IN COLSPEC ABEXA

ABENPATH_EXPR_IN_COLSPEC_ABEXA - PATH EXPR IN COLSPEC ABEXA

Vendor Master (General Section)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

Path Expressions, Use in the SELECT List

This example demonstrates path expressions in the SELECT list in .

Source Code

Execute

Description

The first SELECT statement accesses the CDS view demo_cds_assoc_scarr:

This view exposes its CDS association _spfli in its SELECT list. The CDS association _spfli uses the view demo_cds_assoc_spfli as an association target:

This view exposes its CDS associations _sflight and _sairport in its SELECT list, making it possible to specify them in path expressions after _spfli. These CDS associations use wrappers of DDIC database tables as data sources.

The SELECT statement contains three path expressions in its SELECT list alongside an elementary column specification. The first association contains only the CDS association _spfli of the CDS view demo_cds_assoc_scarr specified after FROM. The CDS associations of the data source of the root element are added to the other two path expressions. The path expressions specify the cardinality of the associations, which prevents syntax check warnings indicating that the path expressions affect the cardinality of the result set.

The second SELECT statement demonstrates which joins must be created in to achieve the same result. This is guaranteed by an assertion.

The third SELECT statement accesses the CDS view demo_cds_use_assocs:

This view shows how the same paths specified in the SELECT statement of the view in CDS DDL syntax and also achieves the same result.

Finally, a fourth SELECT statement accesses the CDS view demo_cds_outer_joins:

In this view, the same result is again achieved using joins.






Fill RESBD Structure from EBP Component Structure   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 3541 Date: 20240328 Time: 135330     sap01-206 ( 47 ms )