Skip to Content

HCI OData Service artifact - How to pass query filters

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    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

    Add comment
    10|10000 characters needed characters exceeded

  • 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.

    Add comment
    10|10000 characters needed characters exceeded