Skip to Content
1
Oct 31, 2019 at 08:32 AM

OData filter logical (substringof and substringof) on same property fails

941 Views

Hi, I'm having an OData filter that looks like this:

$filter=substringof('120',PROPERTY) and substringof('130',PROPERTY)

As soon as I have 2 substringof operations on the same property name, the query fails.

"Expression can not converted into ABAP select options"

Replacing the 'and' with an 'or' passes, but changes completely the context of my query.

My property is defined as a string, that can be either empty, have 1 value, or multiple comma-separated values, and the query should return the items that has all values specified.

PROPERTY=""
PROPERTY="120"
PROPERTY="120,130,150"

According to this question from 2012, multiple actions on the same properties are not supported yet.
https://answers.sap.com/questions/9264652/multiple-filters-with-dates.html

Can someone confirm this is still the case?
Does someone have another performant solution for my case?

Thanks