<?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: Program got slow in select statment. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763606#M1305296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested this snippet in my test environment and it works fine for me. Try to copy paste the code as it is in your program and see. Make sure that you a space between the openning bracket "(" bracket and field SUBC and a space between 'F' and closing bracket ")" the way I have it in my snippet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2009 19:01:55 GMT</pubDate>
    <dc:creator>former_member723628</dc:creator>
    <dc:date>2009-06-18T19:01:55Z</dc:date>
    <item>
      <title>Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763601#M1305291</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 have written the following select statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select name secu from trdir into table it_tab &lt;/P&gt;&lt;P&gt;where name in s_name &lt;/P&gt;&lt;P&gt;and subc eq '1'or subc eq 'I' or subc eq 'F'&lt;/P&gt;&lt;P&gt;and udat in s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just added this and subc eq '1'or subc eq 'I' or subc eq 'F' and since then the program is taking lot of time... so can you please tell me what wrong I am doing.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 17:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763601#M1305291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T17:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763602#M1305292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that or is ur problem... OR makes different selects and merge the data... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to put those ORs in between '(' ')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also&lt;/P&gt;&lt;P&gt;try to remove the OR and use subc in ('1','I' ,'F')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try not puting subc in the select and fillter them after the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see which one makes ur performace better&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: soumya prakash mishra on Jun 18, 2009 8:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 17:53:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763602#M1305292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T17:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763603#M1305293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Select statement is ambiguous which might be causing the delay. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
I have written the following select statement:

select name secu from trdir into table it_tab 
where name in s_name 
and subc eq '1'or subc eq 'I' or subc eq 'F'
and udat in s_date.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try modifying the query as follows and check. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT name
       secu
  INTO TABLE it_tab
  FROM trdir
 WHERE name IN s_name
   AND ( subc EQ '1' OR 
         subc EQ 'I' OR 
         subc EQ 'F'    )
   AND udat IN s_date.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's recommended that whenever you use a combination of AND and OR clause to set the precedence of execution brackets should be used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 18:02:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763603#M1305293</guid>
      <dc:creator>former_member723628</dc:creator>
      <dc:date>2009-06-18T18:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763604#M1305294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gajendra, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't help... rather it's giving me an error that field subc EQ '1' OR subc EQ 'I' or subc EQ 'F' is unknown, it is neither in one of the specified tables nor defined by a data statament.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 18:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763604#M1305294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T18:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763605#M1305295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try following select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_subc for trdir-subc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_subc-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_subc-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_subc-low = '1'.&lt;/P&gt;&lt;P&gt;append r_subc.&lt;/P&gt;&lt;P&gt;clear r_subc-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_subc-low = 'I'.&lt;/P&gt;&lt;P&gt;append r_subc.&lt;/P&gt;&lt;P&gt;clear r_subc-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_subc-low = 'F'.&lt;/P&gt;&lt;P&gt;append r_subc.&lt;/P&gt;&lt;P&gt;clear r_subc-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select name &lt;/P&gt;&lt;P&gt;         secu&lt;/P&gt;&lt;P&gt;         subc          -&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt; Add this field in it_tab as well&lt;/P&gt;&lt;P&gt;   from trdir&lt;/P&gt;&lt;P&gt;   into table it_tab &lt;/P&gt;&lt;P&gt; where name in s_name &lt;/P&gt;&lt;P&gt;   and udat in s_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  delete it_tab where subc not in r_subc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil Salekar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 18:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763605#M1305295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T18:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Program got slow in select statment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763606#M1305296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rajeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested this snippet in my test environment and it works fine for me. Try to copy paste the code as it is in your program and see. Make sure that you a space between the openning bracket "(" bracket and field SUBC and a space between 'F' and closing bracket ")" the way I have it in my snippet. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 19:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-got-slow-in-select-statment/m-p/5763606#M1305296</guid>
      <dc:creator>former_member723628</dc:creator>
      <dc:date>2009-06-18T19:01:55Z</dc:date>
    </item>
  </channel>
</rss>

