Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14 at 10:46 AM

    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?

    Add comment
    10|10000 characters needed characters exceeded