Skip to Content
0
Jun 06, 2018 at 04:45 PM

How to apply Filter Query parameters to XS OData Service?

3800 Views Last edit Jan 19, 2023 at 09:55 AM 5 rev

Hi All,

I have HANA tables exposed as XS OData service and I am trying to consume the service in my Fiori application running on SAP Cloud platform.I have created destination for the XS OData service and I am able to see data.

Now I wanted to restrict the data using Query String parameters.

I would like to know how to use $filter query parameter syntax for XS OData service.

We are using the below sample query to test my OData service on Postman and I am getting the following error.

/EMPLOYEESAMPLE.xsodata/EMPLOYEE_ODATA/?$format=json&$filter=LOCATION eq 'ABC'

*********** Error Details***********

{ "error": { "code": "", "message": { "lang": "en-US", "value": "Operator 'eq' incompatible with operand types 'Edm.Int32' and 'Edm.String'." } } }

Do we need to enable Query parameters on HANA Tables like we do implement for Gateway OData services?

Thank you in advance.

Best Regards

Mahalakshmi