Skip to Content

HCI OData Service artifact - How to pass query filters

Jan 13, 2017 at 11:23 AM


avatar image

Hello experts,

I'm using HCI Web Application with an Odata Service artifact.

My scenario is:

  • Odata service exposed by HCI mapped 1:1 with an Odata Service exposed by HCP Odata provisioning.
  • Use some filters in a GET request (if i can call for example <hcpHost>/odata/sap/MYSERVICE/MyEntitySet?$filter=Field1 eq 'field1', the service exposed by HCI must support the same query, e.g. <HCIsystem>/gw/odata/SAP/MYSERVICE;v=1/MyEntitySet?$filter=Field1 eq 'field1')

When i bind a query operation, I can successfully add "select" query option, but I can't set filters in any way. Whatever I write in the filters tab, nothing change in the resource path and I can only press ok once, then the button becomes disabled.

If I don't set anything, filters passed in the GET call (…MyEntitySet?$filter=Field1 eq 'field1') are dropped and I can't see them in the backend system.

How can I solve it?

filters.png (29.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Manuel Xiccato May 29, 2017 at 04:46 PM

Hi Filippo,

when you're developing an oData service using the HCI Web Application, a pre-defined Integration Flow is created for all query operations:

The "script" step could be used to solve your issue. The standard script (automatically created) manage "$top" and "$skip" oData query options coming from the incoming URI , not the "$filter" one. You could append filter parameters to "oDataURI" header parameter with this code snippet:

After that, filter parameters are saved in the message header. The only thing you have to do is using that header parameter in the OData receiver channel:

Manuel Xiccato

image-037.png (10.1 kB)
image-037.png (10.1 kB)
sdn01.png (53.7 kB)
10 |10000 characters needed characters left characters exceeded
Pavel Penaz
Mar 03, 2017 at 07:39 PM

Hi, not sure 100% if this is the direction you want to filter, but can you please review the following extract from documentation: - section 11 on the page.

Hope this helps, let me know.

All the best.

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

Hi Pavel,

URL you posted isn't working anymore, if your solution is different from what I post, could you please update the URL?

Thank you so much,

Manuel Xiccato