<?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>topic Re: FM/method create dynamic where condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893415#M1961706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we use standard coding wherever we can. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Sep 2016 07:15:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-09-22T07:15:32Z</dc:date>
    <item>
      <title>FM/method create dynamic where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893413#M1961704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to create a dynamic where condition, (BI related) to create a select for every extractor. But this is just additional information &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Though i need to create a dynamic where condition to have generic selects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i use FM CRS_CREATE_WHERE_CONDITION. But this FM got a restriction. When i want to have a where condition like:&lt;/P&gt;&lt;P&gt;WHERE TEXT CP 'A**' &lt;/P&gt;&lt;P&gt;this FM masks the * with #* and this leads to the result that i only get texts containing the string 'A*' and not every text starting with A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though i tried FM RH_DYNAMIC_WHERE_BUILD because it was recommended very often here in the forum-discussions.&lt;/P&gt;&lt;P&gt;But this FM can only work with Fields shorter than 20 signs. And it also can not work with SIGNS, so only SIGN = I is possible.&lt;/P&gt;&lt;P&gt;the most disadvantage is that it creates a where condition that can not be used for SQL-Select statements. Because in a SQL Statement you can not write TEXT EQ 'A*'&amp;nbsp; -&amp;gt; you need to write TEXT = 'A*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i also had a look on FREE_SELECTIONS_INIT. but this seems to be something different. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; But looking to the function Group of this FM i found the FM FREE_SELECTIONS_RANGE_2_WHERE. But this FM also does not produce legit SQL Where-Statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help me out? do you know any methods / FMs beside these to create dynamic where condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the where condition i need is for this statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;OPEN &lt;SPAN class="L0S52"&gt;CURSOR &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;HOLD ca_curser &lt;SPAN class="L0S52"&gt;FOR &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;pi_table_name&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;ca_t_where_condition&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Stefan Seebruger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 12:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893413#M1961704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-21T12:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: FM/method create dynamic where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893414#M1961705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need an existing function module? Isn't it more simple to build it from scratch by concatenating strings?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 19:09:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893414#M1961705</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-09-21T19:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: FM/method create dynamic where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893415#M1961706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we use standard coding wherever we can. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 07:15:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893415#M1961706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-22T07:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: FM/method create dynamic where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893416#M1961707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case, I doubt CRS_CREATE_WHERE_CONDITION and RH_DYNAMIC_WHERE_BUILD are supported by SAP (only very few function modules are released) and they may be deleted in a future release without warning (although it's not so frequent). FREE_SELECTIONS_RANGE_2_WHERE being the only released function module, so go for it! What issue do you have with it exactly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 16:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893416#M1961707</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2016-09-22T16:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: FM/method create dynamic where condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893417#M1961708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;In this statement: WHERE &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;ca_t_where_condition&lt;SPAN class="L0S55"&gt;),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;its not legit to have OPERATORS LIKE "EQ" "CP"... It will result in a Dump/exception.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;I need "=" and "LIKE"-Operator and stuff. but the method FREE_SELECTIONS_RANGE_2_WHERE does not create a legit string for my where-condition.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;I did not solve this issue, but i found out, that i dont need *-Search in my dynamic where clause of FM CRS_CREATE_WHERE_CONDITION because SAP-BI-API does not allow it in INIT-LOAD either.so i dont have to search for different methods/FMs &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/1042123" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;I left this thread open because it would be good to know for future tasks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Regards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Stefan Seeburger&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 11:32:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-method-create-dynamic-where-condition/m-p/11893417#M1961708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-23T11:32:30Z</dc:date>
    </item>
  </channel>
</rss>

