You have the following CDS definition (aliases shown):
define view entity Z_ENTITY
as select from Z_SOURCE1 as _Source1
association to Z_SOURCE2 as Source2 on ???
{
key carrier_id as Carrier,
key connection_id as Connection,
cityfrom as DepartureCity,
cityto as ArrivalCity,
Source2
}
(The data sources are joined by the field carrier_id. The corresponding field in Z_SOURCE2 is also carrier_id.)
Which ON condition must you insert?
In a CDS view entity defined AS SELECT FROM, the association ON condition must use the source aliases defined in the FROM clause.
$projection is used in projection views (AS PROJECTION ON ...), not in a basic select view entity. Therefore, options using $projection (B, C) are invalid here.
Using global names (Z_SOURCE1, Z_SOURCE2) in the ON (A) ignores the declared aliases and is not the recommended/valid form within the view definition.
The correct ON clause uses the aliases _Source1 and Source2 with the matching key fields:
ON _Source1.carrier_id = Source2.carrier_id (D).
This aligns with CDS modeling rules in RAP: use aliases consistently and model associations with precise ON conditions based on keys.
Study Guide Reference: ABAP CDS Development---Associations & ON conditions; RAP Data Modeling.
Michael
1 month agoCasie
1 month agoPortia
2 months agoLudivina
2 months agoVanna
2 months agoEmogene
2 months agoSusy
3 months agoElena
3 months agoLuisa
3 months agoMarge
3 months agoJospeh
3 months agoNieves
2 months ago