Skip to Content
0

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

Nov 27, 2017 at 11:54 AM

56

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Lokeswar Reddy Byni Nov 28, 2017 at 01:21 PM
-1

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.

Share
10 |10000 characters needed characters left characters exceeded
Tiago Cadavez Feb 14 at 10:46 AM
0

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?

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

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.

0

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

0

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.

0