<?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: Selecting char % in a column using WHERE Statement. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244633#M1526825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont use select end select, this will decrease the performance of the program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead select all the record in one single shot in a table and later read it based on your requrement.&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;Satish Boguda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Sep 2010 19:52:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-10T19:52:08Z</dc:date>
    <item>
      <title>Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244632#M1526824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im selecting records in RESB table using Open SQL  where all entries in AUFNR column that contains a character  ' % '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg.  AUFNR&lt;/P&gt;&lt;P&gt;       1%&lt;/P&gt;&lt;P&gt;       5%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code right now is using  SELECT... ENDSELECT and take so long due to RESB data and I have no idea how can i use simple SELECT in WHERE statement since % stands for any character string, including a blank string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code: (it is working but took so long)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select rsnum rspos rsart bdart rssta &lt;/P&gt;&lt;P&gt;       xloek xwaok kzear xfehl matnr &lt;/P&gt;&lt;P&gt;      werks lgort prvbe charg plpla  &lt;/P&gt;&lt;P&gt;       sobkz bdter bdmng meins shkzg &lt;/P&gt;&lt;P&gt;       fmeng aufnr                   &lt;/P&gt;&lt;P&gt;  from resb                          &lt;/P&gt;&lt;P&gt;  into i_resb01                      &lt;/P&gt;&lt;P&gt; where xloek = space.                &lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt; if i_resb01-aufnr ca '%'.           &lt;/P&gt;&lt;P&gt;    append i_resb01.                 &lt;/P&gt;&lt;P&gt;    clear i_resb01.                  &lt;/P&gt;&lt;P&gt; endif.                              &lt;/P&gt;&lt;P&gt;                                     &lt;/P&gt;&lt;P&gt;endselect.                           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 19:41:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244632#M1526824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T19:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244633#M1526825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont use select end select, this will decrease the performance of the program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead select all the record in one single shot in a table and later read it based on your requrement.&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;Satish Boguda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 19:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244633#M1526825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T19:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244634#M1526826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I do not think any entries in table RESB would have a '%' in AUFNR field. You can check it in SE16. Now if it does then use the folllowing code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select rsnum rspos rsart bdart rssta 
xloek xwaok kzear xfehl matnr 
werks lgort prvbe charg plpla 
sobkz bdter bdmng meins shkzg 
fmeng aufnr 
from resb 
into table i_resb01 
where xloek = space. 

loop at i_resb01.
if i_resb01-aufnr na '%'. 
 delete i_resb01.
endif. 
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 19:58:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244634#M1526826</guid>
      <dc:creator>prasenjit_sharma</dc:creator>
      <dc:date>2010-09-10T19:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244635#M1526827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply. In our case we have an entry in RESB-AUFNR with this character % and wanted to get them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not want to use LOOP or SELECT.. ENDSELECT because RESB is gigantic and take so long to run. All i want is if there is a way to use a single SELECT statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT rsnum rspos rsart bdart rssta   
              xloek xwaok kzear xfehl matnr   
              werks lgort prvbe charg plpla   
              sobkz bdter bdmng meins shkzg   
             fmeng aufnr                     
  FROM  resb                            
    INTO TABLE i_resb01                  
 WHERE xloek    = space                
     AND aufnr LIKE '%' .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the SELECT statement above doesn't work because SAP consider the % as keyword &lt;/P&gt;&lt;P&gt;['%' - stands for any character string, including a blank string]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 20:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244635#M1526827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T20:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244636#M1526828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello neljoti!&lt;/P&gt;&lt;P&gt;Yes you can filter a field that has a character '%'. But you must use the ESCAPE  keyword.&lt;/P&gt;&lt;P&gt;Try this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT rsnum rspos rsart bdart rssta   
              xloek xwaok kzear xfehl matnr   
              werks lgort prvbe charg plpla   
              sobkz bdter bdmng meins shkzg   
             fmeng aufnr                     
  FROM  resb                            
    INTO TABLE i_resb01                  
 WHERE xloek    = space                
     AND aufnr LIKE '%#%%' ESCAPE '#'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;Claudio (Aparatey)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 20:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244636#M1526828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T20:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244637#M1526829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting - I never heard of using an escape character in a SELECT before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the problem with this SELECT is that no key field is being used. So I doubt if there is any direct way to speed it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, is this odd order number in table AUFK?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 20:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244637#M1526829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T20:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting char % in a column using WHERE Statement.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244638#M1526830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Claudio, Your SQL works and never heard about that ESCAPE before &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob, no i didn't check the AUFK table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS A BUNCH!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 21:26:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-char-in-a-column-using-where-statement/m-p/7244638#M1526830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-10T21:26:28Z</dc:date>
    </item>
  </channel>
</rss>

