on 11-03-2016 8:43 AM
Hello All,
I have an issue facing me which I am trying to resolve with respect to OData.
I tried searching the existing forums, however I have read mixed replies.
So I have 2 entities - SalesOrder and SalesPos.
These 2 entities are connected with a Navigation SalesNav and cardinality 1:M
I would like to be able to get all SalesOrder header info and SalesPos Items info for all Sales Orders where
- The Customer number is 10 or 20
- The Item number is 30 or 40
And I am using here the expand functionality.
So, initially since I am a novice in OData, I felt the URI should look like....
http://blahblahblah.blah.de:7000/sap/opu/odata/SALESINFO?$filter=Order eq '10' or '20'&$expand=SalesNav&$filter=Item eq '30' or '40'
However, I checked up the OData Conventions, and then I learnt the Properties of the dependent entity are to be addressed in a different way. My URI should actually be
http://blahblahblah.blah.de:7000/sap/opu/odata/SALESINFO?$filter=Order eq '10' or '20'&$expand=SalesNav&$filter=SalesNav/Item eq '30' or '40'.
I need to use the Qualified field name.
However, when I tried with this URI .. I get an error message that "Left hand side of the expression has a false cardinality".
I tried debugging .and noticed while evaluating the Filter expression, if we use a Qualified Filter, the system expects the Cardinality to be 1:1.
I found that a little weird.. but nevertheless I trid I tried it out. I changed the cardinality to 1:1 and surprisingly it worked.
So I was able to use filters on both Entity Sets.
So now my Question:
a) Does the current version of SAP Netweaver Gateway simply not support the $filter expression on the second Entity Set in a Navigation ? If the answer is no... then I would wonder why it supports it with the Cardinality 1:1.
b) Is there some workaround.. some way we can transfer Search conditions for the second Entity Set ?
Thanks for your inputs.
Regards
Shadab.
Hi All,
Was there any solution for this issue, I'm struck by the same, it would be nice if I get any help.
Regards,
Ramnath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shadab,
Did u get any clue on how to use filter in both parent and dependent entity..
Am also having the same issue.. your input will be highly useful.
Thanks
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.