<?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 Select Single within Loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651409#M1094518</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;Is it acceptable to use SELECT SINGLE statement within a LOOP? Or is it very bad for the performace?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any alternative (better way) for this?&lt;/P&gt;&lt;P&gt;I can't use READ because don't have any fields to compare in the WITH KEY section..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Oct 2008 13:17:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-14T13:17:55Z</dc:date>
    <item>
      <title>Select Single within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651409#M1094518</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;Is it acceptable to use SELECT SINGLE statement within a LOOP? Or is it very bad for the performace?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any alternative (better way) for this?&lt;/P&gt;&lt;P&gt;I can't use READ because don't have any fields to compare in the WITH KEY section..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 13:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651409#M1094518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T13:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651410#M1094519</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;Its very bad for performance as every time it will Read database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont have any vale to compae that SELECT SINGLE also gives you same value every time otherwise you can use FOR ALL ENTRIES claues.&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;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 13:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651410#M1094519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T13:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single within Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651411#M1094520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have the keys used in the SELECT in the table looped, use a FOR ALL ENTRIES IN itab, then in the loop use a READ TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, perform a first loop, collect the needed keys in a second itab, at the end of the first loop perform the SELECT FOR ALL ENTRIES, then perform a second loop with the READ TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP/SELECT SINGLE/ENDLOOP is only advisable if you are sure that only a few records will be read, like in a screen dynpro  without ALV or views.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 13:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-within-loop/m-p/4651411#M1094520</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-10-14T13:26:08Z</dc:date>
    </item>
  </channel>
</rss>

