07-21-2016 7:43 AM
Hi Experts
What is the difference between Inner join and Association in ABAP CDS ??
When we go for association in ABAP CDS and benefits of associations than inner join ??
Thanks
Naveen
07-21-2016 9:05 AM
Hi Naveen,
In association , both of inner join and left outer join can be defined by specifying association name in path expressions.
Refer the link below to differentiate association with inner join.
http://help.sap.com/abapdocu_740/en/index.htm?file=abencds_path_expression_attr.htm
Effect
Defines an association of the name assoc in a SELECT statement of a CDS view in ABAP CDS. An association joins the first elementary data source entity specified as the initial data source (after FROM using the ON condition cond_exp) with the data source entityspecified as the target data source (in the definition of the association). A data source entity can be a database table defined in ABAP Dictionary or a view. In the latter case, the view can be an external view or another CDS view.
An association of a SELECT statement can be accessed - in the same statement at all places where this is documented - by specifying the association name in path expressions. When a CDS view is activated with path expressions, the specified associations are converted to join expressions. The initial data source is shown on the left side and the target data source is shown on the right side. The ON condition of the association is added to the ON condition of the join. By default, the category of the join is determined by where the path expression is used:
This setting can be overwritten when specifying the association in a path expression using an attribute.When specifying the ON condition, the following special rules apply:
Notes
Thanks,
Kala L.