ABAP_SYNTAX ... ASSOCIATION $[cardinality> $] TO target ON cds_cond> $[ WITH DEFAULT FILTER cds_cond> $] ...>
What does it do? Defines a CDS association> in the element list> of an CDS abstract entity>. The CDS association uses an ON> condition to associate the current CDS entity with a association target> target>. The same rules apply that are described in topic CDS view entity, ASSOCIATION> > with the following differences:
The addition AS _assoc> is not used. The CDS association is declared using the name _assoc>, after which the addition ASSOCIATION> is specified in the element list.
No session variables> can be used in the conditions cds_cond> >. A CDS association defined using the addition ASSOCIATION> in the element list of a CDS abstract entity is always exposed. It cannot, however, be used in any SQL path expressions>, neither in ABAP CDS or in AB_SQL .
Latest notes:
A CDS association of a CDS abstract entity cannot be used anywhere where it could produce instances of join expressions.
For an overview of all possible association targets of all CDS entities that can define associations, see Data Source Matrix>. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 The following DDL source code shows a CDS abstract entity that exposes a CDS association with another CDS abstract entity: DDLS DEMO_CDS_ABSTRACT_ENTITY_ASSOC ABAP_EXAMPLE_END