<?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 with field symbols in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390634#M1545352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is only a minor factor, one should focus on the major issues first (e.g. access to large DB or internal tables without key support). My own (not scientific) measurements showed about a 10% performance gain for large loops assigning field symbols over the same loop into work areas, because less data has to copied in memory. The effect might be a little larger if you are changing values in the work area, because the changes then have to be copied back to the table.&lt;/P&gt;&lt;P&gt;Now this measurement was only for this very loop, if your program does other things as well, the overall impact can be neglected most of the time.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Nov 2010 10:17:29 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-11-12T10:17:29Z</dc:date>
    <item>
      <title>Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390631#M1545349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can someone tell me if performance is better when using field symbols rather than work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, In loops we use Loop at table &amp;lt;tab1&amp;gt; into &amp;lt;wa&amp;gt; where var1 = var2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will it help using field symbols, when the internal table &amp;lt;tab1&amp;gt; has large number of entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 07:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390631#M1545349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-12T07:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390632#M1545350</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;Imho using Field-Symbols in LOOP .. WHERE won't improve the performance significantly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP ... WHERE is optimised for SORTED &amp;amp; HASHED tables. Read the SAP documentation for more details: [http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_ITAB_COND.htm#&amp;amp;ABAP_ADDITION_3@3@].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 07:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390632#M1545350</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-11-12T07:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390633#M1545351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found something which says field symbols might increase efficiency  -[http://wiki.sdn.sap.com/wiki/display/Snippets/Improve&lt;EM&gt;nested&lt;/EM&gt;loop&lt;EM&gt;performance&lt;/EM&gt;with&lt;EM&gt;ABAP|http://wiki.sdn.sap.com/wiki/display/Snippets/Improve&lt;/EM&gt;nested&lt;EM&gt;loop&lt;/EM&gt;performance&lt;EM&gt;with&lt;/EM&gt;ABAP]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 09:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390633#M1545351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-12T09:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390634#M1545352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is only a minor factor, one should focus on the major issues first (e.g. access to large DB or internal tables without key support). My own (not scientific) measurements showed about a 10% performance gain for large loops assigning field symbols over the same loop into work areas, because less data has to copied in memory. The effect might be a little larger if you are changing values in the work area, because the changes then have to be copied back to the table.&lt;/P&gt;&lt;P&gt;Now this measurement was only for this very loop, if your program does other things as well, the overall impact can be neglected most of the time.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 10:17:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390634#M1545352</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-12T10:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390635#M1545353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see [Performance - what will kill you and what will leave you with only a flesh wound|/people/rob.burbank/blog/2006/11/16/performance--what-will-kill-you-and-what-will-leave-you-with-only-a-flesh-wound]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 14:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390635#M1545353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-12T14:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390636#M1545354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you read the tip carefully you'll find that Ivan has mentioned that using field-symbols will improve performance when "LOOP'ing over large internal tables" &amp;amp; that too (as Thomas has mentioned) is in the range of 10%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In these kind of scenarios i always prefer doing a runtime analysis of the code rather.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Nov 2010 05:33:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390636#M1545354</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-11-14T05:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390637#M1545355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Internal tables are huge. I basically have 3 loops Loop1 with 602 entries, Loop 2 with 903 entries and Loop3 with 14448 entries and loop1 looping loop2 which in turn loops loop3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also heard about some BASIS transaction which helps bufeering loops in sections. Not sure about its exact functions. Does anyone have any idea about something like that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 02:41:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390637#M1545355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-15T02:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390638#M1545356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your scenario it is much more important that the tables in loop2 and loop3 are declared as SORTED tables and you are using a leading part of the table key in the WHERE conditions. If you use the full table key, you can also try using HASHED tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also look into maybe changing the program logic, sometimes you can rearrange the loops so that the biggest table is loop1, and the smaller ones are accessed inside the outer loop. Maybe you can even change the way the tables are being filled, e.g. by switching from FOR ALL ENTRIES to a JOIN select statement, and even reduce the nesting level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always max out the possibilities of clean programming before adjusting any system settings or adding hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 08:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390638#M1545356</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-15T08:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390639#M1545357</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;Fields symbols gives better performance over the work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the result for modify the internal table content with 100 entries with fields symbols and work area.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB INTO WA.
    WA-FLAG = 'X'.
    MODIFY ITAB FROM WA.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Runtime: 755 microseconds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB ASSIGNING &amp;lt;WA&amp;gt;.
 &amp;lt;WA&amp;gt;-FLAG = 'X'.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Runtime: 91 microseconds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For accessing the internal table content with 100 entries with fields symbols and work area.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB INTO WA.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Runtime:327 microseconds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT ITAB ASSIGNING &amp;lt;WA&amp;gt;.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Runtime: 83 microseconds &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, It is clear that fields symbols more efficient over the work area not only the 10% but more than 10% (i.e approximatly 30% to 70%) depends only where you are modify content or accessing the content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, Here is more important role is &lt;STRONG&gt;where condition&lt;/STRONG&gt; which is not consider here. &lt;/P&gt;&lt;P&gt;When you are putting the &lt;STRONG&gt;where condition&lt;/STRONG&gt; then only modification and access the row of internal table is also depends upon the type of internal table (i.e index, Hashed or sorted) &lt;/P&gt;&lt;P&gt;If you put exactly key or index fields of internal table with fields symbols. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fields symbols improve the performance 1/3rd over the work area whatever the where condtion&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your condition you are using the nested internal table you can define the the proper internal table for it. (ie standard, hashed or sorted)&lt;/P&gt;&lt;P&gt;How to used the different internal table type and there performance ? we discuss here many time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:05:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390639#M1545357</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-11-15T12:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390640#M1545358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you run this for 100,000 entries please and not only 100, and then draw conclusions?&lt;/P&gt;&lt;P&gt;I'm really interested in comparing results, but with just 100 you have too much internal overhead, I'm afraid.&lt;/P&gt;&lt;P&gt;Also please use MODIFY ITAB FROM WA TRANSPORTING FLAG for a fair comparison (depending how many fields your ITAB has, please also disclose the structure).&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:13:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390640#M1545358</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-15T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390641#M1545359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Fields symbols improve the performance 1/3rd over the work area whatever the where condtion.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Too much generic to digest. &lt;DEL&gt;Definitely FS have advantage over WA, but 1/3rd is way too much.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I take my words back, i just compared these 2 code snippets &amp;amp; found otherwise:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab type standard table of t001.
field-symbols: &amp;lt;wa&amp;gt; type t001.

select * from t001 into table itab.

loop at itab assigning &amp;lt;wa&amp;gt;.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This took 20 secs to executes whereas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab type standard table of t001,
wa type t001.

select * from t001 into table itab.

loop at itab into wa.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; took 17 secs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dunno why :-S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390641#M1545359</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-11-15T12:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390642#M1545360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write your code following way and check the difference, In above case I was considering the internal table not select SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: F1 type t,
      F2 type t,
      f3 TYPE t.

data: itab type standard table of t001,
      wa type t001.

field-symbols: &amp;lt;wa&amp;gt; type t001.

select * from t001 into table itab.

get RUN TIME FIELD f1.
loop at itab ASSIGNING &amp;lt;wa&amp;gt;.
endloop.
get RUN TIME FIELD F2.

f3 = f2 - f1.

Write f3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is approximatly 50% difference in time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:46:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390642#M1545360</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-11-15T12:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390643#M1545361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My bad! Should have removed the SQL part from the runtime analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked with this code snippet in SE30:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample1: This took 210.142 microseconds to execute.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: itab TYPE STANDARD TABLE OF char1,
      wa TYPE char1.

FIELD-SYMBOLS: &amp;lt;wa&amp;gt; TYPE char1.

DO 1000000 TIMES.
  wa = 'A'.
  APPEND wa TO itab.
ENDDO.

LOOP AT itab INTO wa.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample2: This took 208.650 microseconds to execute.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: itab TYPE STANDARD TABLE OF char1,
      wa TYPE char1.

FIELD-SYMBOLS: &amp;lt;wa&amp;gt; TYPE char1.

DO 1000000 TIMES.
  wa = 'A'.
  APPEND wa TO itab.
ENDDO.

LOOP AT itab ASSIGNING &amp;lt;wa&amp;gt;.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you explain your ~30% increment using FIELD-SYMBOLS? I don't see it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 13:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390643#M1545361</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-11-15T13:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390644#M1545362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact it's true that a LOOP ASSIGNING can be like 80% faster than a LOOP INTO. &lt;/P&gt;&lt;P&gt;However, just the loop itself doesn't take that long: what really consumes time is to find the correct entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have some something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT table INTO wa.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It won't take that long, even if table has millions of lines. It is true that you can reduce the time by changing to LOOP AT ASSIGNING, but you will be optimizing something that is not that bad to start with. It is probably &lt;STRONG&gt;not&lt;/STRONG&gt; what is causing the performance problems your users are complaining about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT table INTO wa.
   LOOP AT table2 INTO wa WHERE ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then that will take long because the inner loop is made millions of times. And for that case you will have to use SORTED tables, changing to FIELD-SYMBOLS won't make that much of a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rui Dantas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 14:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390644#M1545362</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2010-11-15T14:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390645#M1545363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rui,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see the code snippets i have used to compare LOOP INTO v/s LOOP ASSIGNING i can't see the 80% increment you're talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question to Ravi &amp;amp; you will now be: Under what circumstances will LOOP ASSIGNING be 80% faster than LOOP INTO? Please enlighten me with a few code snippets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 04:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390645#M1545363</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-11-16T04:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390646#M1545364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will largely depend on the length of the structure i.e. amount of data that is being copied in memory or not. In one of your above examples, you had a structure of just one character, so almost no gain there.&lt;/P&gt;&lt;P&gt;I don't have my dev system today, so I can chime in with my own new measurement tomorrow.&lt;/P&gt;&lt;P&gt;Whatever the outcome, my view is, when designing new programs one might as well chose field symbols right away, however it is usually not worth the effort to change existing programs just for the small performance improvement.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 08:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390646#M1545364</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-16T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390647#M1545365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case, the loops using where are satisfying 7-8 lines from the internal table. This happens for all the 3 loops. i.e I do not get a unique row from any of the loop. In that case how do I use hashed table/sorted table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 10:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390647#M1545365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-16T10:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390648#M1545366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Check the 2 different program &lt;/P&gt;&lt;P&gt;Program1&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: F1 type t,
      F2 type t,
      f3 TYPE t.

data: itab type standard table of BSEG,
      wa type BSEG.

field-symbols: &amp;lt;wa&amp;gt; type BSEG.

select * up to 100000 ROWS into table itab FROM BSEG.

get RUN TIME FIELD f1.
perform process_data.
get RUN TIME FIELD F2.

f3 = f2 - f1.

Write f3.
form PROCESS_DATA .
loop at itab ASSIGNING &amp;lt;wa&amp;gt;."into wa."
endloop.
endform.                    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program2&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: F1 type t,
      F2 type t,
      f3 TYPE t.

data: itab type standard table of HRP1001,
      wa type HRP1001.

field-symbols: &amp;lt;wa&amp;gt; type HRP1001.

select * up to 100000 ROWS into table itab FROM HRP1001.

get RUN TIME FIELD f1.
perform process_data.
get RUN TIME FIELD F2.

f3 = f2 - f1.

Write f3.
form PROCESS_DATA .
loop at itab into wa. "ASSIGNING &amp;lt;wa&amp;gt;. ""
endloop.
endform.                  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result &lt;/P&gt;&lt;P&gt;Program      fields symbols            Work Area           %Percentange variation&lt;/P&gt;&lt;P&gt;Program1   126426                         697062                 18%&lt;/P&gt;&lt;P&gt;Program2    77128                          195429                 39%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, Factor which is affect the column in internal table and alos table rows also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it will not improve the performance exactly 1/3 but it varies depending on different circumtances from 10% to 70%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are modifing the internal table content then &lt;STRONG&gt;fields-symbol&lt;/STRONG&gt; give more than 50% faster over work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will help you out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 12:26:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390648#M1545366</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2010-11-16T12:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390649#M1545367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; My question to Ravi &amp;amp; you will now be: Under what circumstances will LOOP ASSIGNING be 80% faster than LOOP INTO? Please enlighten me with a few code snippets.&lt;/P&gt;&lt;P&gt;&amp;gt; Suhas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Suhas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to SE38, Environment -&amp;gt; Examples -&amp;gt; Performance Examples.&lt;/P&gt;&lt;P&gt;Them choose the one relevant for our discussion:&lt;/P&gt;&lt;P&gt;  Internal Tables -&amp;gt; Using the Assigning Command -&amp;gt; Modifying a set of lines directly.&lt;/P&gt;&lt;P&gt;And measure it. What do you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my system I get 190 vs 35 (or a little over 80% improvement).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; ... my view is, when designing new programs one might as well chose field symbols right away, however it is usually not worth the effort to change existing programs just for the small performance improvement.&lt;/P&gt;&lt;P&gt;&amp;gt; Thomas&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I completely agree with Thomas: use field-symbols in new programs (why not?) but don't expect them to solve performance problems in existing programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rui Dantas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 14:20:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390649#M1545367</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2010-11-16T14:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance with field symbols</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390650#M1545368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; In my case, the loops using where are satisfying 7-8 lines from the internal table. This happens for all the 3 loops. i.e I do not get a unique row from any of the loop. In that case how do I use hashed table/sorted table?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't use hashed tables (they require access by a unique key) but you can and should use sorted tables. Just make sure you are reading by one or more of the first (leftmost) key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rui Dantas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 14:23:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-with-field-symbols/m-p/7390650#M1545368</guid>
      <dc:creator>Rui_Dantas</dc:creator>
      <dc:date>2010-11-16T14:23:40Z</dc:date>
    </item>
  </channel>
</rss>

