cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gateway: Filter more than one NOT EQUAL values for one field

dpz_de
Discoverer
0 Kudos

Hi,

i want to filter all aufnr but 1 and 2. This is the request:


MySet?sap-client=100&$select=Line,Value1,Value2&$filter=(((((Date ge datetime"2017-08-19T00:00:00" and Date le datetime"2017-11-26T23:59:59"))) and ((Aufnr ne "1") and (Aufnr ne "2"))))&$inlinecount=allpages


Debugging the DPC_EXT class shows that IT_FILTER_SELECT_OPTIONS is empty, because class /IWCOR/CLDS_EXPR_SELOPT throws Exception /IWCON/cx_DS_expor_selopt_error

Its not possible to determine a binary relation for two select-options.

Filter "aufnr NE 1" only works fine.

Used Gateway Version:

SAP_GWFND 740 0015 SAPK-74015INSAPGWFND SAP Gateway Foundation 7.40

Any idea to solve this?

BR

Accepted Solutions (0)

Answers (2)

Answers (2)

eachtime
Explorer
0 Kudos

I also have the same issue. With an and of to not equals the Gateway discards completely the query.

$filter=(Aufnr ne "1") and (Aufnr ne "2") a filter like this doesn't work. Does anyone have any solution for this problem?

former_member185414
Active Contributor
0 Kudos

Hi Tiago,

Ideally you should open a new thread and post your query but anyways go through this. It has sample implementation and a SAP note reference.

eachtime
Explorer
0 Kudos

Hi Ankit. Unfortunately it's a different case. That case is ge le with empty dates. In my case is just a combination of not equals so it's a different case

former_member185414
Active Contributor
0 Kudos

Ok.

So you mean to say that the iv_filter_string itself does not have the complete filter string which was passed in the URL?

Please open a new thread.

Lokes
Participant
0 Kudos

Hello ,

MySet?sap-client=100&$select=Line,Value1,Value2&$filter=((Date ge datetime"2017-08-19T00:00:00" and Date le datetime"2017-11-26T23:59:59") and (Aufnr ne "1" or Aufnr ne "2"))&$inlinecount=allpages

try the above set, it will work, it works for me.