<?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 performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563622#M254750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope everything is working fine for all.&lt;/P&gt;&lt;P&gt;  Frnds i hav a doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; which one is better and what is the diff between the statements below.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;here so_matnr is my select-options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;stmt1 :&lt;/P&gt;&lt;P&gt;select matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stm2 :&lt;/P&gt;&lt;P&gt;select single matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 with regards,&lt;/P&gt;&lt;P&gt;                                 sahakla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Sep 2006 15:50:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-17T15:50:44Z</dc:date>
    <item>
      <title>performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563622#M254750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frnds .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope everything is working fine for all.&lt;/P&gt;&lt;P&gt;  Frnds i hav a doubt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; which one is better and what is the diff between the statements below.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;here so_matnr is my select-options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;stmt1 :&lt;/P&gt;&lt;P&gt;select matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stm2 :&lt;/P&gt;&lt;P&gt;select single matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 with regards,&lt;/P&gt;&lt;P&gt;                                 sahakla&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Sep 2006 15:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563622#M254750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-17T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563623#M254751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; stmt1 :&lt;/P&gt;&lt;P&gt;&amp;gt; select matnr from mara into wa_matnr where matnr in&lt;/P&gt;&lt;P&gt;&amp;gt; so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; This will have a ENDSELECT. This will process all the selections satisfying the selection crieria one by one. In effect this is a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; stm2 :&lt;/P&gt;&lt;P&gt;&amp;gt; select single matnr from mara into wa_matnr where&lt;/P&gt;&lt;P&gt;&amp;gt; matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one selects only row from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two cannot be compared directly as the first one process mulitple row where as the second process processes only one row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are looking for only row then go with the second, if looking for multiple rows, change to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MATNR ... INTO TABLE T_MATNR FROM MARA WHERE MATNR IN S_MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will directly put the data into table without a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Sep 2006 16:03:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563623#M254751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-17T16:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563624#M254752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both the statements will return only one value,  even though you pass the MATNR in ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use the select single statement only when we have all primary keys in the search criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Statement 2, as you have mentioned the primary key in the search criteria but it is based on ranges i.e so_matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the statements will return only one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first statment has to have a ENDSELECT statement.&lt;/P&gt;&lt;P&gt;The select.. Endselect would be in a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best way is to get the MATNR is an internal table and do the processing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr into table itab&lt;/P&gt;&lt;P&gt;  from mara&lt;/P&gt;&lt;P&gt;  where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The intenal table itab will have all the valid MATNR and you can do the necesarry processing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Sep 2006 16:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563624#M254752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-17T16:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563625#M254753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Ravi sorry for late rely..&lt;/P&gt;&lt;P&gt;ravi can u tell me which one is performance wise better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Sep 2006 16:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563625#M254753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-17T16:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563626#M254754</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;  select single performance is better when compared to the other select. As, we are selecting all the records that satisfies the selection criteria specified in the select options. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  In case of select single, we are fetching only one record. Once a record is found, execution of the select is completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sailaja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 03:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563626#M254754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-18T03:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563627#M254755</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;kindly chk this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stmt1 :&lt;/P&gt;&lt;P&gt;select matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HERE WE NEED END SELECT.&lt;/P&gt;&lt;P&gt;BUT NEVERE USE SELECT - END SELECT.&lt;/P&gt;&lt;P&gt;IT WILL RESULT IN VERY LOW PERFORMANCE.&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO THE OPTION FOR U IS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara into&amp;lt;b&amp;gt; table&amp;lt;/b&amp;gt; int_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then manipulate the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stm2 :&lt;/P&gt;&lt;P&gt;select single matnr from mara into wa_matnr where matnr in so_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE STMNT2 HAS HIGH PERFORMANCE.&lt;/P&gt;&lt;P&gt;IF U WANT ONLY ONE MATNR THN GO WITH THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oTHER WISE &amp;lt;b&amp;gt;INTO TABLE&amp;lt;/b&amp;gt; WILL BE THE BEST METHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helepd mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2006 04:05:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance/m-p/1563627#M254755</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-18T04:05:49Z</dc:date>
    </item>
  </channel>
</rss>

