Get Example source ABAP code based on a different SAP table
• AS WITH ASSOCIATIONS • WITH ASSOCIATIONS ( ... ) WITH
WITH>, ASSOCIATIONS>
ABAP_SYNTAX ... WITH ASSOCIATIONS ( path> $|join>$[, ...$] ) $|(assoc_syntax)>
What does it do? The addition WITH ASSOCIATIONS> for the definition of a common table expression exposes associations of this table expression for use in the subsequent queries of a WITH >> statement. The following can be specified:
Existing CDS associations> or CTE associations> of the common table expression using SQL path expressions> path>>.
Definitions of new CTE associations> of the common table expression using join>>. The parentheses must contain at least one association and multiple associations can be specified as a comma-separated list. Both existing and new associations can be specified together and in any order.
In subsequent queries of the current WITH> statement, the exposed associations can be used as root elements of the path expressions in question.
In the specified columns> of SELECT> statements of the subsequent queries.
As a data source> of the FROM> clause> of the subsequent queries.