title: How to exclude multiple values in OData call?
body: <p>I am creating a SAPUI5 application. This application is connected to a backend SAP system via OData. In the SAPUI5 application I use a smart chart control. Out of the box the smart chart lets the user create filters for the underlying data. This works fine - except if you try to use multiple 'not equals' for one property. Is there a way to accomplish this?</p>
  <p>I found out that all properties within an 'and_expression' (including nested or_expressions) must have unique name.</p>
  <blockquote>
  <p>The reason why two parameters with the same property don't get parsed into the select options:</p>
  <p><code>/IWCOR/CL_ODATA_EXPR_UTILS=&gt;GET_FILTER_SELECT_OPTIONS</code> takes the expression you pass and parses it into a table of select options.</p>
  <p>The select option table returned is of type <code>/IWCOR/IF_ODATA_TYPES=&gt;EDM_SELECT_OPTION_T</code> which is a <code>HASHED TABLE  ..  WITH UNIQUE KEY</code> property.</p>
  </blockquote>
  <p><sup>From: <a href="https://archive.sap.com/discussions/thread/3170195" rel="nofollow noreferrer">https://archive.sap.com/discussions/thread/3170195</a></sup></p>
  <p>The problem is that you cannot combine <code>NE</code> terms with <code>OR</code>. Because both parameters after the <code>NE</code> should not be shown in the result set.</p>
  <p>So at the end the <code>it_filter_select_options</code> is empty and only the <code>iv_filter_string</code> is filled.</p>
  <p>Is there a manual way of facing this problem (evaluation of the <code>iv_filter_string</code>) to handle multiple <code>NE</code> terms?</p>
  <p>This would be an example request:</p>
  <pre><code>XYZ/SmartChartSet?$filter=(Category%20ne%20%27Smartphone%27%20and%20Category%20ne%20%27Notebook%27)%20and%20Purchaser%20eq%20%27CompanyABC%27%20and%20BuyDate%20eq%20datetime%272018-10-12T02%3a00%3a00%27&amp;$inlinecount=allpages
  </code></pre>
  <p>Normally I want this to exclude items with the category 'Notebook' and 'Smartphone' from my result set that I retrieve from the backend.</p>