Skip to Content
0

XSHANA Odata service filter option

Oct 02, 2017 at 08:41 AM

35

avatar image
Former Member

Hi All,

I want to fetch WERKS based on LAND1.

for example, if I pass LAND1 in the service link, service should return the respective WERKS.

what code should I write to do that in .xsodata file?

currently written the below code which is fetching data based on key fields of T001W.

service { "SAPPFD"."T001W" as "Stores" with("MANDT","WERKS","LAND1"); }.

Regards,

Subhanshu

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Oct 02, 2017 at 10:34 AM
0

In the service definition you do not have to add anything, because filtering is supported out of the box. You just have to add the corresponding $filter parameter to your OData service call. E.g. .../service.xsodata/Stores?$filter=LAND1 eq 'DE'.

Regards,
Florian

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thnaks Florian, Its working for me.

Regards,

Subhanshu

0