<?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: syntax for ODATA filter substringof in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748684#M212477</link>
    <description>&lt;P&gt;Hi Andre, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks for the answer, your blog was pretty useful !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I was using syntax : &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;substringof(FIELDNAME,'ABC')&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;when it should be :&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;substringof('ABC',FIELDNAME)&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Now it work like a charm, thanks a lot !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Regards, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Dany&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Mon, 24 Sep 2018 12:55:17 GMT</pubDate>
    <dc:creator>dany_charbonneau</dc:creator>
    <dc:date>2018-09-24T12:55:17Z</dc:date>
    <item>
      <title>syntax for ODATA filter substringof</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaq-p/748682</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I can read the filter Odata, for instance :&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;$filter=startswith(FIELDNAME,'ABC')&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;return option = CP, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Low = ABC*&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;in the filter internal table in the DPC_EXT &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;so far so good but I cannot find the correct syntax for the substringof. According to the Odata specifications, the syntax should be : &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;substringof(string po, string p1)&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;$filter=substringof(FIELDNAME,'ABC')&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;but this does not work. Any idea on the correct syntax ?&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 18:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaq-p/748682</guid>
      <dc:creator>dany_charbonneau</dc:creator>
      <dc:date>2018-09-21T18:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: syntax for ODATA filter substringof</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748683#M212476</link>
      <description>&lt;P&gt;The syntax you are using looks correct.&lt;/P&gt;
  &lt;P&gt;Have you checked your implementation?&lt;/P&gt;
  &lt;P&gt;I posted the following blog with regards to more complex statements with substring.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://blogs.sap.com/2018/06/07/how-to-get-select-options-for-a-filter-that-contains-two-substringof-functions-combined-with-an-or-operator/" target="test_blank"&gt;https://blogs.sap.com/2018/06/07/how-to-get-select-options-for-a-filter-that-contains-two-substringof-functions-combined-with-an-or-operator/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Andre&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 19:40:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748683#M212476</guid>
      <dc:creator>Andre_Fischer</dc:creator>
      <dc:date>2018-09-21T19:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: syntax for ODATA filter substringof</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748684#M212477</link>
      <description>&lt;P&gt;Hi Andre, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thanks for the answer, your blog was pretty useful !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I was using syntax : &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;substringof(FIELDNAME,'ABC')&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;when it should be :&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;substringof('ABC',FIELDNAME)&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Now it work like a charm, thanks a lot !&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Regards, &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Dany&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 12:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748684#M212477</guid>
      <dc:creator>dany_charbonneau</dc:creator>
      <dc:date>2018-09-24T12:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: syntax for ODATA filter substringof</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748685#M212478</link>
      <description>&lt;P&gt;Ok. I have overlooked this as well.&lt;/P&gt;
  &lt;P&gt;Glad to hear that it works now ;-).&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Andre&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 13:13:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748685#M212478</guid>
      <dc:creator>Andre_Fischer</dc:creator>
      <dc:date>2018-09-24T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: syntax for ODATA filter substringof</title>
      <link>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748686#M212479</link>
      <description>&lt;P&gt;I faced the same bug as Dany. This info may be helpful for anyone that runs into this problem:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;$filter=substringof(colName,'value') eq true&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The syntax above is correct from the odata spec and works correctly when calling S/4HANA Cloud odata v2 apis.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;$filter=substringof('value', colName) eq true&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The syntax above works when calling SuccessFactors odata v2 apis. &lt;/P&gt;&lt;P&gt;I had been using the same structure within the $filter param with both s4 and sfsf, so naturally I was confused when sfsf didn't work. &lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 23:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/syntax-for-odata-filter-substringof/qaa-p/748686#M212479</guid>
      <dc:creator>VictorI32</dc:creator>
      <dc:date>2022-09-06T23:19:14Z</dc:date>
    </item>
  </channel>
</rss>

