Ansicht
Dokumentation

ABENCDS_ASSOC_JOIN_V2_ABEXA - CDS ASSOC JOIN V2 ABEXA

ABENCDS_ASSOC_JOIN_V2_ABEXA - CDS ASSOC JOIN V2 ABEXA

PERFORM Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

- CDS View Entity, Joins of CDS Associations

This example demonstrates how path expressions are transformed to joins in ABAP CDS.

Source Code

Execute

Description

This example demonstrates which joins are implemented for path expressions containing CDS associations. The following two CDS view entities - DEMO_CDS_ASSOC_JOIN1_O_VE and DEMO_CDS_ASSOC_JOIN1_I_VE - access their own association _demo_join2 in path expressions of the SELECT list and the exposed CDS association _demo_join3 of DEMO_CDS_ASSOC_JOIN2.

LEFT OUTER and INNER are explicitly specified in the path expressions.

  • LEFT OUTER specifies the implementation of CDS associations as a left outer join, which is the default behavior at these places.
  • INNER specifies the implementation of CDS associations as an inner join, which overwrites the default behavior at these places.

In the DDL source code editor of the ADT, the respective join can be seen in the display of the generated SQL DDL statement.

The program DEMO_CDS_ASSOC_JOINS_VE displayed above shows that the result sets of the CDS view entities DEMO_CDS_ASSOC_JOIN1_O_VE and DEMO_CDS_ASSOC_JOIN1_I_VE are identical to the result sets of statements SELECT with explicitly programmed left outer and inner joins. The CDS view entities and the DDIC database table DEMO_JOIN3 above are accessed. All involved database tables are filled with sample data. With an inner join, unlike a left outer join, only the row is returned for which the join condition t3~l = t2~d is fulfilled.






CPI1466 during Backup   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 2748 Date: 20240424 Time: 110321     sap01-206 ( 41 ms )