Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Path Expression and Filters in ABAP CDS

former_member594288
Participant
0 Kudos

Hi,

I am new to cds, can anyone please give me some explanation for Path Expressions and Filters in Associations and i have gone through some posts but it's not clearing my doubts like Filters are like where conditions, if it is like where condition then why we need path expression.

3 REPLIES 3

maheshpalavalli
Active Contributor
0 Kudos

You can do that with filter as well, but one specific advantage I think of is, using one single association and reusing it multiple times inside the select clause, which is not possible when you pass as a filter,

for e.g.,

... _assoc{
...
_assoc[ filter1 ].as test1,
_assoc[ filter2 ].as test2,
...
}

If you are not using path expressions, then you have to define two associations on the same table/view.

Sandra_Rossi
Active Contributor

maheshpalavalli
Active Contributor

sandra.rossi, thanks for the link.. I was searching for that and all I could find was abap select on cds path expressions..