on 06-17-2014 12:33 PM
Hey everyone
Im trying to understand if im missing out on something or just misunderstanding things.
i've created an entity, and a function.
calling this entity using standard key filter works (i.e /FlightSet(0001), but when using /FlightSet?$filter=carried eq '0001' I simply get all the entities in the collection, no error or anything.
I've marked the key as "filterable" in the collection.
i've also taken a look at the class generated by the transaction, it doesnt seem as if the method contains code that is supposed to filter the results, it simply reads the keys and announces errors.
i have no problem implementing this manually, but i dont know if its a correct behavior.
thanks.
Eli
Hi,
Yes it is correct behavior. you need to put the code to implement $filter operation.
/FlightSet(0001) - This is not filter. it calls the get_entity method with 0001 as key passed.
whereas /FlightSet?$filter=carried eq '0001' will call get_entityset method where you need to implement the logic for filter value passed.
You can refer my blog for more information.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes the query method should be mapped for the $filter to work correctly. In addition every column of the entityset which will be used for filtering should be mapped to a range table in the data source (function module). The mapping recognizes ranges and displays them with a specialized icon ([])
Hi Eli,
If you wish to use $filter, I would not recommend mapping to a function module as you have to write the code anyway. If you are going to need to write code, do a code based implementation in the first place, it's quicker and you'll have more control over the service.
Regards
Ron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i want to fetch the data from below url but its give me.In domain name there is a Slash('\') how to resolve this kindly help.
Exception during error handling occured!
http://192.168.59.227:8080/gateway/odata/sap/EmployeeDataList;v=1/Employee?$filter=DomainAndUsername...\maheshware\reddy'
Below link is working fine.
Regards
Ali
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.