<?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: performance ..which one is better in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556801#M252072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think logic may be more of a problem here than performance. Do you want to &amp;lt;b&amp;gt;EXIT&amp;lt;/b&amp;gt; out of the loop or &amp;lt;b&amp;gt;CONTINUE&amp;lt;/b&amp;gt; withe the next loop pass?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Sep 2006 03:20:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-16T03:20:22Z</dc:date>
    <item>
      <title>performance ..which one is better</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556799#M252070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT gt_bsak. " INTO wa_bsak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT SINGLE lifnr FROM  lfb1&lt;/P&gt;&lt;P&gt;                        INTO  wa_lifnr&lt;/P&gt;&lt;P&gt;                        WHERE lifnr = gt_bsak-lifnr&lt;/P&gt;&lt;P&gt;                        AND   bukrs = gt_bsak-bukrs&lt;/P&gt;&lt;P&gt;                        AND   uzawe EQ 'ZN'&lt;/P&gt;&lt;P&gt;                        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      DELETE TABLE gt_bsak. "FROM wa_bsak.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Checking document header text,.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT SINGLE bktxt FROM  bkpf&lt;/P&gt;&lt;P&gt;                        INTO  wa_bktxt&lt;/P&gt;&lt;P&gt;                        WHERE bukrs = gt_bsak-bukrs&lt;/P&gt;&lt;P&gt;                        AND   belnr = gt_bsak-belnr&lt;/P&gt;&lt;P&gt;                        AND   gjahr = gt_bsak-gjahr.&lt;/P&gt;&lt;P&gt;    IF wa_bktxt+0(5) = 'OTPY:' OR&lt;/P&gt;&lt;P&gt;       wa_bktxt+0(5) = 'OTPN:'.&lt;/P&gt;&lt;P&gt;      DELETE TABLE gt_bsak. " FROM wa_bsak.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Is the above loop is ok ..performance point of view ? out of select single and SELECT up to 1 rows which one is the better ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 00:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556799#M252070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T00:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: performance ..which one is better</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556800#M252071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Avoding a select is always better inside a loop. Whether it is select single or select up to one rows its always better to avoid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; But if the situation is such that you cannot avoid select within a loop then better to use SELECT SINGLE with all KEY FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can also use Field symbols with LOOP as described in the weblog by rich&lt;/P&gt;&lt;P&gt; /people/rich.heilman2/blog/2006/03/07/using-field-symbols-in-loop-statements--performance-boost&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijayendra  Rao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 00:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556800#M252071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T00:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: performance ..which one is better</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556801#M252072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think logic may be more of a problem here than performance. Do you want to &amp;lt;b&amp;gt;EXIT&amp;lt;/b&amp;gt; out of the loop or &amp;lt;b&amp;gt;CONTINUE&amp;lt;/b&amp;gt; withe the next loop pass?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Sep 2006 03:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-which-one-is-better/m-p/1556801#M252072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-16T03:20:22Z</dc:date>
    </item>
  </channel>
</rss>

