<?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 Avoiding performance issue due to loop within loop on internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745580#M901226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;                I have a requirement where in i want to check whether each of the programs stored in one internal table are called from any of the programs stored in another internal table. In this case i am looping on two internal tables (Loop within a loop) which is causing a major performance issue. Program is running very very slow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one advise how to resolve this performance issue so that program runs faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 04:49:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-02T04:49:14Z</dc:date>
    <item>
      <title>Avoiding performance issue due to loop within loop on internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745580#M901226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;                I have a requirement where in i want to check whether each of the programs stored in one internal table are called from any of the programs stored in another internal table. In this case i am looping on two internal tables (Loop within a loop) which is causing a major performance issue. Program is running very very slow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one advise how to resolve this performance issue so that program runs faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 04:49:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745580#M901226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T04:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding performance issue due to loop within loop on internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745581#M901227</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;How are your internal tables defined?  Is either table defined as SORTED or HASHED?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, that would help a lot with performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,    Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 05:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745581#M901227</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T05:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding performance issue due to loop within loop on internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745582#M901228</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 Paraller Cursor Cursor concept it will reduce the time very much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.saptechnical.com/Tutorials/ABAP/ParallelCursor.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This link would help u to understand better&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 06:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745582#M901228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T06:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding performance issue due to loop within loop on internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745583#M901229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forget the parallel cursur stuff, it is much to complicated for general usage and helps nearly nothing. I will publish a blog in the next days where this is shown in detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop on loop is no problem if the inner table is a hashed or sorted table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it must be a standard table, then you must make a bit more effort and faciliate a binary search (read binary search / loop from index exit)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see here the exact coding Measurements on internal tables: Reads and Loops:&lt;/P&gt;&lt;P&gt;/people/siegfried.boes/blog/2007/09/12/runtimes-of-reads-and-loops-on-internal-tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And don't forget, the other table must not be sorted, the loop reaches anyway every line. The parallel cursor requires both tables to be sorted. The additional sort&lt;/P&gt;&lt;P&gt;consumes nearly the whole advantage of the parallel cursor compared to the simple but good loop in loop solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 08:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/avoiding-performance-issue-due-to-loop-within-loop-on-internal-tables/m-p/3745583#M901229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T08:44:59Z</dc:date>
    </item>
  </channel>
</rss>

