What does it do? CDS associations from the projected entity> can be exposed in the projection list of a CDS projection view. Note that only an association from the projected entity can be exposed, path expressions are not valid to expose an association. All elements included in the ON> clause of an exposed CDS association> must also be included in the projection list of the CDS projection view. The following additions are possible:
filter>> An exposed association in a CDS projection view can be modified. That means that you can add a filter condition and in this way implicitly change the cardinality>.
AS alias> The names of the elements of a SELECT> list must be unique. There must be no other element with this name. If necessary, AS> must be used to define an alternative element name alias > for the CDS association. If no alternative element name alias> is defined, the element name is defined by the name of the CDS association used in the path expression. When a CDS association with a filter condition> cds_cond> is exposed, an alternative element name alias> using AS> is mandatory.
redirection>> If the original association target > is also projected, you can redirect the association to the new target using the keyword REDIRECTED TO>. Find details in the topic CDS DDL - projection_view >, REDIRECTED TO>> below. A CDS association can be exposed multiple times with various alternative element names. This makes it possible to use different filter conditions . An exposed CDS association is part of the projection list. It is not, however, part of the result set, nor a component of the type defined in ABAP with respect to the CDS projection view.
Latest notes:
As alternative to exposing an association with a filter and redirection described in this topic, it is also possible to redefine an association on header level using the keyword REDEFINE ASSOCIATION>>. The filter and redirection is then automatically applied to all fields exposed via path expression. NON_V5_HINTS
Projected CDS associations, CDS compositions, and CDS to-parent associations can be specified as values for the CDS annotations ElementRef>> and AssociationRef>>. ABAP_HINT_END