Get Example source ABAP code based on a different SAP table
• JOIN WITH ASSOCIATIONS • ON WITH ASSOCIATIONS
WITH>, ASSOCIATIONS>, JOIN>
ABAP_SYNTAX ... JOIN cardinality target AS _assoc ON sql_cond> ...>
ABAP Addition ... cardinality>
What does it do? Specifying JOIN> initiates the definition and exposure of a CTE association> with the name _assoc> in the addition WITH ASSOCIATIONS>> when a common table expression is defined in a WITH>> statement. A CTE association joins the current common table expression +cte> as an association source > with the association target> target> specified in the definition of the CTE association using an ON> condition sql_cond>>. All data sources> visible and usable in this position can be specified for target>. AS> must be used to specify a name _assoc> for the CTE association under which it can be addressed in the subsequent queries of the current WITH> statement. The name can contain letters, digits, the minus sign (->), and the underscore (_>) in any order. By specifying its name, a CTE association of a common table expression can be used in the subsequent queries of the same WITH> statement in all operand positions for associations. These are elements of path expressions> or the specification of hierarchy associations>. When a CTE association is used in a path expression, it is transformed to a join expression. The association source> represents the left side and the association target> represents the right side. The ON> condition of the CTE association is added to the ON> condition of the join. The category of the join is determined by where the path expression is used: