<?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: Checking for Empty string in WHERE condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277157#M1915868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naris,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope the below condition is helpful,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;LOOP AT itab1 INTO wa WHERE strfld = '&amp;nbsp; '.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Karthik&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 10:48:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-08-19T10:48:57Z</dc:date>
    <item>
      <title>Checking for Empty string in WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277153#M1915864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field with type sting in my database table, i need to get the records from database table where this string field is empty. I tried to use this string field in here condition and check if it is NULL or not. But it is not working because "Long string or text cannot be used in WHERE condition".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Idea is to Copy this DB table into an Internal table, Loop through the internal table with where condition that string field is empty and append those records to another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working but i would like to know if there is any other way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;itab1 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;DBtable&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itab2 &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;DBtable&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;DBtable&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;DBtable &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;itab1&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;itab1 &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;strfld &lt;SPAN class="L0S52"&gt;is &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S31"&gt;"strfld is string field.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;APPEND &lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;itab2&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;NarsiReddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 08:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277153#M1915864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-19T08:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for Empty string in WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277154#M1915865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear NarsiReddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel using of 'Loop' on the itab might be at the cost of performance.&amp;nbsp; So, better use 'DELETE' statement after 'SELECT' statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;lt;dbtable&amp;gt; INTO TABLE &amp;lt;itab1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TABLE &amp;lt;itab1&amp;gt; WHERE strfld is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this statement execution, &amp;lt;itab1&amp;gt; will have the entries for which String Field is not blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 09:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277154#M1915865</guid>
      <dc:creator>former_member206394</dc:creator>
      <dc:date>2015-08-19T09:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for Empty string in WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277155#M1915866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear NarsiReddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel using of 'Loop' on the itab might be at the cost of performance.&amp;nbsp; So, better use 'DELETE' statement after 'SELECT' statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;lt;dbtable&amp;gt; INTO TABLE &amp;lt;itab1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE TABLE &amp;lt;itab1&amp;gt; WHERE strfld is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this statement execution, &amp;lt;itab1&amp;gt; will have the entries for which String Field is not blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 09:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277155#M1915866</guid>
      <dc:creator>former_member206394</dc:creator>
      <dc:date>2015-08-19T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for Empty string in WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277156#M1915867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, Perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But a small correction, syntax is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;DELETE itab1 WHERE strfld IS INITIAL.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;NarsiReddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 09:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277156#M1915867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-19T09:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for Empty string in WHERE condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277157#M1915868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naris,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope the below condition is helpful,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;LOOP AT itab1 INTO wa WHERE strfld = '&amp;nbsp; '.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Karthik&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 10:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-for-empty-string-in-where-condition/m-p/11277157#M1915868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-19T10:48:57Z</dc:date>
    </item>
  </channel>
</rss>

