Limitations of Associations in CDS views (2024)

0Kudos

Hi Gurus,

I have started working with the CDS associations recently and noticed some of the limitations it has when compared to joins. One of the limitations seems to be that we can use the fields from the first data source only in all of the ON conditions if we want to use the fields from further tables in the same CDS view.

Limitations of Associations in CDS views (1)

As per the above example, we cannot use _LFA1 in the path expressions in the same CDS view, as we have used $projection.lifnr in the ON condition, and this belongs to association _BSEG which is not the first data source. It would have worked perfectly fine if we had used JOINs instead of associations here. Could some one try to explain why we have this restriction on the associations?

Also If I remove the path expression and only expose the _LFA1, then the error is removed, but I get below warnings.

Limitations of Associations in CDS views (2)

Can some one please explain their significance? Thanks for your help!

Warm Regards,

Raveesh

Preview file

72 KB

Preview file

87 KB

Limitations of Associations in CDS views (2024)
Top Articles
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 6062

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.