<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: IN operator in odata get query in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343133#M4622697</link>
    <description>&lt;P&gt;Hi Anuja,&lt;/P&gt;&lt;P&gt;have you tried putting the IDs into brackets so that it is "OrderID IN (10248,10249)"?&lt;/P&gt;&lt;P&gt;I can't find OData standard docu on the topic, but I have seen several examples of the IN-clause in that way. Note that OData is "SQL for the Web", so sometimes the syntax and requirements are like in SQL. Also there, the IN clause uses brackets  - otherwise it is difficult to parse a query in an appropriate way.&lt;/P&gt;&lt;P&gt;However, if this is an issue of the CPI OData Adapter, then please use the tag &lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/tags/73554900100800003241" target="test_blank"&gt;https://answers.sap.com/tags/73554900100800003241&lt;/A&gt; for CPI for your question, instead of Cloud Platform Workflow. Otherwise you won't get the attention of CPI experts.&lt;/P&gt;&lt;P&gt;I have asked moderators to move the post to that tag.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 08:06:58 GMT</pubDate>
    <dc:creator>tobias_breyer</dc:creator>
    <dc:date>2021-03-10T08:06:58Z</dc:date>
    <item>
      <title>IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaq-p/12343132</link>
      <description>&lt;P&gt;Hi SAP,&lt;/P&gt;
  &lt;P&gt;I am trying to create an OData query with IN operator as it is mentioned in the sap help center that ODATA v2 adapter now supports IN operator in filter. Link to the sap help center: &lt;A href="https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/c5c2e38e0c87472e996dfda04920bfc4.html" target="test_blank"&gt;https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/c5c2e38e0c87472e996dfda04920bfc4.html&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I want to get the same result of the below query which uses eq with or operator, but I want to use IN operator&lt;/P&gt;
  &lt;P&gt;$select=OrderID,CustomerID,OrderDate&amp;amp;$filter=OrderID eq 10248 or OrderID eq 10249&lt;/P&gt;
  &lt;P&gt;The query which I created is with IN operator is below but its not working.&lt;/P&gt;
  &lt;P&gt;$select=OrderID,CustomerID,OrderDate&amp;amp;$filter=OrderID in 10248,10249&lt;/P&gt;
  &lt;P&gt;I am getting error in CPI is (Fault:Sequential processing failed for number 0)&lt;/P&gt;
  &lt;P&gt;Please let me know if I am missing something in the query.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Anuja&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 16:40:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaq-p/12343132</guid>
      <dc:creator>former_member717479</dc:creator>
      <dc:date>2021-03-09T16:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343133#M4622697</link>
      <description>&lt;P&gt;Hi Anuja,&lt;/P&gt;&lt;P&gt;have you tried putting the IDs into brackets so that it is "OrderID IN (10248,10249)"?&lt;/P&gt;&lt;P&gt;I can't find OData standard docu on the topic, but I have seen several examples of the IN-clause in that way. Note that OData is "SQL for the Web", so sometimes the syntax and requirements are like in SQL. Also there, the IN clause uses brackets  - otherwise it is difficult to parse a query in an appropriate way.&lt;/P&gt;&lt;P&gt;However, if this is an issue of the CPI OData Adapter, then please use the tag &lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/tags/73554900100800003241" target="test_blank"&gt;https://answers.sap.com/tags/73554900100800003241&lt;/A&gt; for CPI for your question, instead of Cloud Platform Workflow. Otherwise you won't get the attention of CPI experts.&lt;/P&gt;&lt;P&gt;I have asked moderators to move the post to that tag.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 08:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343133#M4622697</guid>
      <dc:creator>tobias_breyer</dc:creator>
      <dc:date>2021-03-10T08:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343134#M4622698</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;tobias.breyer&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your response and for the tag suggestion.&lt;/P&gt;&lt;P&gt;And yes I have tried with the brackets and its still not working.&lt;/P&gt;&lt;P&gt;I am providing the below link where is it mentioned about the IN operator used in the filter option while creating query:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/c5c2e38e0c87472e996dfda04920bfc4.html"&gt;https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/c5c2e38e0c87472e996dfda04920bfc4.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Any help will be useful.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 08:56:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343134#M4622698</guid>
      <dc:creator>former_member717479</dc:creator>
      <dc:date>2021-03-10T08:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343135#M4622699</link>
      <description>&lt;P&gt;Hi Anuja, does the OData service you are trying to consume support the IN operator in query parameter $filter ? According to this article &lt;A href="https://docs.microsoft.com/en-us/odata/odatalib/in-operator" target="test_blank"&gt;https://docs.microsoft.com/en-us/odata/odatalib/in-operator&lt;/A&gt; the IN operator is supported only from OData version 4.01. So if you are calling an OData version 2 service the IN operator is probably not supported. The mentioned article links to the official 'what's new' document by OASIS which also states that values must be listed as a collection which is a parentheses-enclosed list of comma-separated primitive values. I see in the SAP documentation that parentheses are omitted in the shown example. I guess this is misleading ( an error in the documentation ).&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Mauri &lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 15:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343135#M4622699</guid>
      <dc:creator>MauriF</dc:creator>
      <dc:date>2021-03-10T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343136#M4622700</link>
      <description>&lt;P&gt;Hi Anuja,&lt;/P&gt;&lt;P&gt;Kindly use &lt;STRONG&gt;in&lt;/STRONG&gt; operator like this &lt;STRONG&gt;&amp;amp;$filter=userId in '82094','108713'&lt;/STRONG&gt;  with odata V2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Wajahat Imam&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 08:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343136#M4622700</guid>
      <dc:creator>former_member37103</dc:creator>
      <dc:date>2022-03-09T08:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: IN operator in odata get query</title>
      <link>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343137#M4622701</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;wajahat_n2a&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;This does not work and throws error "Invalid parametertype used at function 'and' (Position: 90)"&lt;/P&gt;&lt;P&gt;If we use $filter=OrderID eq 10248 or OrderID eq 10249 then it works fine.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 14:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/in-operator-in-odata-get-query/qaa-p/12343137#M4622701</guid>
      <dc:creator>former_member36641</dc:creator>
      <dc:date>2022-05-12T14:12:05Z</dc:date>
    </item>
  </channel>
</rss>

