CDS View Error Association Cannot Be Used Locally
source link: https://answers.sap.com/questions/390248/cds-view-error-association-cannot-be-used-locally.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
CDS View Error Association Cannot Be Used Locally
Hello Friends
While using CDS view
I am getting error
Association cannot be used locally within the view
Please find attached image of my CDS view and help me resolve the error.
Any ides how to resolve the error.
Regards,
Sunil
Hello Sunil,
Looks like the issue is because of the usage of $projection.For details, please see Horst Keller's comment from April 19,2017 in response to the comment by Ceyhun Alp here
Best,
Aashrith.
Hi Sunil,
Association can't be used where it's defined, it's not the association purpose.
you have two options:
1, you have a higher level CDS for the current one, then you could use the association freely.
or 2, you switch the association to leftouter join.
Best Regards,
Did you find a solution to this ? The Association can be exposed but the direct fields can't be used ?
There will be a problem that on using the _vbep.wmeng as Orderqty defining in the higher level view that if the higher level view is a Query view because the definition is not recognised by the ODP and will throw the error "Cannot Resolve name in the ODP" , so in such case create one more new higher level view view2 to the current view view1 and use the association to vbep in that view2 and define the field from vbep. use that view2 as the source view to query view instead of the view1..
Thanks
Before answering
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that your answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.
Recommend
-
6
Masaaki Arai October 23, 2021 8 minute read ...
-
6
Manasi Balagere April 30, 2022 5 minute read...
-
6
Zeshan Shafqat October 7, 2022 3 minute read...
-
3
Chau Nguyen Phuc December 3, 2022 1 minute read...
-
10
Umut Yazici December 17, 2022 1 minute read ...
-
29
Ravi Dave January 31, 2023 2 minute read ...
-
1
Mohamed Thariqki 23 minutes ago Session variables in CDS view association 7 Views
-
2
Overview Pages with Parameterized CDS view and RAP approach Skip to Content...
-
5
CDS View Performance Best Practises 1 4 140 The ABAP CDS development framework offers enormous...
-
9
Maria Luz Lloveras 17 minutes ago Is it possible to generate a concatenation + a subtraction in a CDS view in a CAP applicatio...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK