<?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: For All entries or Loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940372#M693163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Siegfried,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, there might be equal number records in the other tables as well.&lt;/P&gt;&lt;P&gt;I am going bring  them into 10 different internal tables, using the PERNR in this master table as key and then move the entire data into a final internal table to send to ALV grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The employee details in the first table is being stored in a SORT table, do u still think we need to explicitly run the SORT command?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2007 12:16:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-09T12:16:06Z</dc:date>
    <item>
      <title>For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940367#M693158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with around &amp;gt; 50000 to 100 000 employee records.&lt;/P&gt;&lt;P&gt;like pernr, etc etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to bring other data from 10 tables for the records in this internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, which one would be better to use, For all entries or Loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using For all entries, but seriously doubt whether loop would be better or for all entries in this scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 10:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940367#M693158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T10:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940368#M693159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES is better, if you look at the Performance wise then use the for all entries ....&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 10:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940368#M693159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T10:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940369#M693160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     If the records which u wanted to bring are in database then you can go for FOR ALL ENTRIES and if they are in internal tables thn you can go for LOOP ...... ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards,&lt;/P&gt;&lt;P&gt; Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 11:07:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940369#M693160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T11:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940370#M693161</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;Use FOR ALL entries instead of LOOP and also before using FOR ALL entries sort  the internal table by field for which you want to fetch the data from 10 tables.&lt;/P&gt;&lt;P&gt;which would give better performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 11:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940370#M693161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T11:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940371#M693162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should specify your problem in more detail, 100.000 records is a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess that you have the table with 100.000 records and you want to add information of the other database tables to this table or to independent other internal tables? In the first case, the FOR ALL ENTRIES must combine the different tables with the large employee table, therefore it is not straightforward, which version is faster.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are some of the db tables buffered? If yes, then simply use select ... endselect inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will you read also up 100.000 different records from the other tables, or are sometimes much less, i.e. many employees have the same entries in some tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you use joins for some of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would not rely on guessing, but try both versions. Use command GET RUNTIME and measure the version with LOOP ... ENDLOOP and the version with FOR ALL ENTRIES. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 11:59:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940371#M693162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T11:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940372#M693163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Siegfried,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, there might be equal number records in the other tables as well.&lt;/P&gt;&lt;P&gt;I am going bring  them into 10 different internal tables, using the PERNR in this master table as key and then move the entire data into a final internal table to send to ALV grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The employee details in the first table is being stored in a SORT table, do u still think we need to explicitly run the SORT command?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 12:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940372#M693163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T12:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940373#M693164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if pernr is the key then you should definitely use hashed tables, if you go to sizes of more than 10.000 lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use joins on some of 10 DB tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check buffer setting, buffered tables should not be used with FOR ALL ENTRIES but directly inside the LOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ...&lt;/P&gt;&lt;P&gt;    INTO itab2&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN itab_0&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;LOOP AT itab0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT .... buffered tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ itab2 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab0 or append itab_new&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 14:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940373#M693164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-09T14:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940374#M693165</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;FOR ALL ENTRIES is the better way to use other than LOOP &lt;/P&gt;&lt;P&gt;beacuse getting data from that 10 tables is difficult by useing LOOP &lt;/P&gt;&lt;P&gt;you need to LOOP for every record &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use FOR ALL ENTRIES then it will give the total selection at one time &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES is the best way than the LOOP &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if usefull&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 04:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940374#M693165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T04:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: For All entries or Loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940375#M693166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr:Mohan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let your current data in ITAB1(100000records).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u have to fetch data from diffrent data base tables correspondingly. Here you must use FOR ALL ENTRIES Of ITAB1.&lt;/P&gt;&lt;P&gt;One Important think you must notice is whenever you use FOR ALL ENTRIES of ITAB1, u must check whether ITAB1 is intial or not.Because if ITAB1 is initial it will pull all the detaisl from data bases which will reversely affect performance.&lt;/P&gt;&lt;P&gt;Another pre-requisite is &amp;lt;b&amp;gt;sort itab1&amp;lt;/b&amp;gt; with fileds which you are using for selection, which will also increase the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Incase of any doubt regarding this you can ask me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if find useful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Antony Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2007 09:26:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-or-loop/m-p/2940375#M693166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-10T09:26:32Z</dc:date>
    </item>
  </channel>
</rss>

