<?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: Regarding  LOOP - Endloop Performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270607#M1530041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:itab1 type sorted table of type1 with non-unique key matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just declare your matnr as above and use the same nested loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Sep 2010 15:25:36 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2010-09-26T15:25:36Z</dc:date>
    <item>
      <title>Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270604#M1530038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using below code in my prg..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;loop at itab1 where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN this code itab is having only 1 row for particular matnr and in  itab1 is having multiple row for particular matnr. and i am facing here performance issue . it is taking so much time. Because for particular  matnr ,  program  have to search matnr in whole itab1. so is there any code line i have to use so it can search directly matnr from itab1 and dont need to search whole table.... because here if itab is having m row and itab1 is having n row , than looping is happened mn times.. &lt;/P&gt;&lt;P&gt;so , how can i reduce it ? please anybody know , than please help me for same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You ,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 05:39:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270604#M1530038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-26T05:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270605#M1530039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should definitely have a look at the MUST read blog written by Rob Burbank:&lt;/P&gt;&lt;P&gt;[JOINS vs. FOR ALL ENTRIES - Which Performs Better?|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6050] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 08:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270605#M1530039</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2010-09-26T08:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270606#M1530040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;u can use parallel cursor technique to improve performance .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code is like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort: lt_vbpa by kunnr,  "Sorting by key is very important&lt;/P&gt;&lt;P&gt;      lt_kna1 by kunnr.  "Same key which is used for where condition is used here&lt;/P&gt;&lt;P&gt;loop at lt_vbpa into wa_vbpa.&lt;/P&gt;&lt;P&gt;  read lt_kna1 into wa_kna1     " This sets the sy-tabix&lt;/P&gt;&lt;P&gt;       with key kunnr = wa_vbpa-kunnr&lt;/P&gt;&lt;P&gt;       binary search.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.              "Does not enter the inner loop&lt;/P&gt;&lt;P&gt;    v_kna1_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    loop at lt_kna1 into wa_kna1 from v_kna1_index. "Avoiding Where clause&lt;/P&gt;&lt;P&gt;      if wa_kna1-kunnr &amp;lt;&amp;gt; wa_vbpa-kunnr.  "This checks whether to exit out of loop&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="6" type="ul"&gt;&lt;P&gt;Your Actual logic within inner loop ******&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   endloop. "KNA1 Loop&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.  " VBPA Loop&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;Sarang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 09:37:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270606#M1530040</guid>
      <dc:creator>sarang_gujrati2</dc:creator>
      <dc:date>2010-09-26T09:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270607#M1530041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
Data:itab1 type sorted table of type1 with non-unique key matnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just declare your matnr as above and use the same nested loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 15:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270607#M1530041</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-09-26T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270608#M1530042</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;Keshav , thanks for reply...in your declaration what is meaning of type1.. And how it works can u explain in brief ?....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 05:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270608#M1530042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-27T05:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270609#M1530043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sarang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to give me sample code of parallel cursor technique..&lt;/P&gt;&lt;P&gt;Can u just what is meaning of binary search ? how it works ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And here in your secong loop &lt;/P&gt;&lt;P&gt;loop at lt_kna1 into wa_kna1 from v_kna1_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lt_konv is having multiples row for particular Kunnr.. than its read only 1 time than how it works ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 05:35:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270609#M1530043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-27T05:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270610#M1530044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab.
loop at itab1 where matnr = itab-matnr.

endloop.
endloop. 

 itab1 is having multiple row for particular matnr

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define tab1 table as &lt;STRONG&gt;sorted table&lt;/STRONG&gt; with &lt;STRONG&gt;non-unieque key matnr&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also used the &lt;STRONG&gt;field-symbols&lt;/STRONG&gt; instead of work area.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab Assigning &amp;lt;fs_itab&amp;gt;.
loop at itab1 assigning &amp;lt;fs_itab1&amp;gt; where matnr = &amp;lt;fs_itab&amp;gt;-matnr.

endloop.
endloop. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Define&lt;/P&gt;&lt;P&gt;field-symboles &amp;lt;fs_itab&amp;gt; has type of itab table type.&lt;/P&gt;&lt;P&gt;                        &amp;lt;fs_itab1&amp;gt; has type of itab1 table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It  will give better performance, Don't used the parallel cursor technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it it will resolve your problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 06:08:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270610#M1530044</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-09-27T06:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270611#M1530045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravishankar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur help.. Its really works and easy than another method.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 06:28:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270611#M1530045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-27T06:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270612#M1530046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u just what is meaning of binary search ? how it works ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please understand binary search,sorted tables etc before getting into the coding &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can search the documentations and read how the sorted tables work .&lt;/P&gt;&lt;P&gt;Let me explain how binary search works&lt;/P&gt;&lt;P&gt;consider the below entries in your internal table. You must&lt;/P&gt;&lt;P&gt; sort the internal table before doing a binary search.&lt;/P&gt;&lt;P&gt;You will know the importance of sorting when you understand the functionality.&lt;/P&gt;&lt;P&gt;This is just a rough explanation.Suppose you want to get the record &lt;/P&gt;&lt;P&gt;which holds the value 10, when you use a binary search.&lt;/P&gt;&lt;P&gt;the contents are divided into two segements like&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;7&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;13&lt;/P&gt;&lt;P&gt;17&lt;/P&gt;&lt;P&gt;18&lt;/P&gt;&lt;P&gt;It takes the left segement and does a left traversal, if the value is found its&lt;/P&gt;&lt;P&gt; returned else it takes the right segement and again divides it&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;13&lt;/P&gt;&lt;P&gt;17&lt;/P&gt;&lt;P&gt;18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It again does the same left traversal, here the data is found.it stops and exits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Experts correct me if im wrong &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 12:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270612#M1530046</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-09-27T12:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding  LOOP - Endloop Performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270613#M1530047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your explanation......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 04:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-loop-endloop-performance/m-p/7270613#M1530047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-28T04:44:25Z</dc:date>
    </item>
  </channel>
</rss>

