<?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 abap work area in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667596#M1447250</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;many times it is advised to use work areas while defining internal table instead of header line or using default work area.  so i want to know how defining separate work area improves the performance?  is it the memory or cpu perfomance is improved by defining separate work area?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Mar 2010 06:21:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-09T06:21:00Z</dc:date>
    <item>
      <title>abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667596#M1447250</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;many times it is advised to use work areas while defining internal table instead of header line or using default work area.  so i want to know how defining separate work area improves the performance?  is it the memory or cpu perfomance is improved by defining separate work area?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 06:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667596#M1447250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T06:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667597#M1447251</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;header lines are not allowed in oo context, there is not influence on performance comparing header lines and work areas.&lt;/P&gt;&lt;P&gt;If you concern about performance, use field-symbols, not work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 06:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667597#M1447251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T06:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667598#M1447252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will have no performance improvement when using work areas as a replacement for implicit header lines of tables with header lines. Because implicit header lines have the same name as the internal table itself, you will always get a warning in extended syntax check. For this reason tables with header lines are forbidden in OO context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you LOOP AT an internal table, the current record is always copied into the header line or work area. You will gain performance using field-symbols:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  lt_t001 TYPE TABLE OF t001.
FIELD-SYMBOLS:
  &amp;lt;t001&amp;gt; TYPE t001.
...
LOOP AT lt_t001 ASSIGNING &amp;lt;t001&amp;gt;.
  WRITE: / &amp;lt;t001&amp;gt;-bukrs.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just an example. Here the current record in the loop is assigned to field-symbol &amp;lt;t001&amp;gt;. That means nothing is copied, just the memory address is assigned to the field-symbol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This technique is &lt;STRONG&gt;never&lt;/STRONG&gt; slower than using a work area or header line, if you have long table structures with many fields, it is up to 10 times faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my suggestion is to get used to field-symbols and internal tables without header lines and forget work areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 09:58:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667598#M1447252</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-03-09T09:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667599#M1447253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; This technique is never slower than using a work area or header line, if you have long table structures with many fields, it is &amp;gt; up to 10 times faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is incorrect, for LOOPs the overhead is very small, but for reads it can be considerable.&lt;/P&gt;&lt;P&gt;You should really expect only a benefit, if you use ASSIGNING with rather width tables and deep structures!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Work areas should be used because there was a lot of confusion between the header lines and the whole tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much more than the ASSIGNING is the fast search on internal tables, i.e. BINARY SEARCH or the sorted or hashed tables which use a primary key.&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 Mar 2010 13:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667599#M1447253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T13:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667600#M1447254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sigi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we talked about loops. I just said that you are &lt;STRONG&gt;never&lt;/STRONG&gt; slower using assigning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;his is incorrect, for LOOPs the overhead is very small, but for reads it can be considerable.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate on &lt;EM&gt;read overhead&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 16:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667600#M1447254</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-03-09T16:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667601#M1447255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the discussion on header lines v/s work area is up again, may i use this opportunity to ask a small question. (Dear mods, hope this is ok)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my basic ABAP training we were told header line actually holds some memory area of its own but a work area does not. Is this reason enough for not using header lines ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: For me the main reasons for discarding header lines would be: a. non-compatibility in OO context, b. confusion between main table &amp;amp; header lines.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 16:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667601#M1447255</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-09T16:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667602#M1447256</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;in the BC400 training there is suggestion, that is it better to use header lines instead of explicit work areas, because of:&lt;/P&gt;&lt;P&gt;- shorter form of instructions (APPEND itab instead of APPEND wa TO itab; LOOP AT, etc.)&lt;/P&gt;&lt;P&gt;- you have one variable (table body and header), not two&lt;/P&gt;&lt;P&gt;but you have to concern, does system use table header or table body in specified instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, in ABAP Objects you are not allowed to use header lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the BC402 there is suggestion, that you should use field-symbols rather than header lines - it is faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is quite easy to distinguish if instruction uses table body or header:&lt;/P&gt;&lt;P&gt;- some instructions use both of them - i.e. APPEND itab. LOOP AT itab.&lt;/P&gt;&lt;P&gt;- in all other situations, table header is used by default, so if you want to use body, just write: itab[]&lt;/P&gt;&lt;P&gt;- I try to place [] everywhere in the code, when I want to mark that I am using a table (even if it is not necessary),&lt;/P&gt;&lt;P&gt;      like: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT * 
  INTO TABLE itab[]
  ...

CLEAR itab[].

CALL FUNCTION ...
  IMPORTINT
    it_tab = itab[]
  TABLES
    tab = itab[].
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I am using field-symbols (mainly). &lt;/P&gt;&lt;P&gt;If I write some simple, low-importantance program - I choose table header lines - it is easier and faster to write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Mar 2010 08:20:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667602#M1447256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-10T08:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: abap work area</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667603#M1447257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One can use field symbols but has to be careful with it.&lt;/P&gt;&lt;P&gt;When you use field symbols and pass values of one field symbol to other field symbols you have to assign the latter field symbol with a work area of same type as field symbol and also have to clear the work area since whatever you pass to field symbol gets stored in work area also.&lt;/P&gt;&lt;P&gt;Have a look of the below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 LOOP AT i_a910 ASSIGNING &amp;lt;fs_a910&amp;gt;.
    CLEAR wa_cond.
    ASSIGN wa_cond TO &amp;lt;fs_cond&amp;gt;.
    MOVE-CORRESPONDING &amp;lt;fs_a910&amp;gt; TO &amp;lt;fs_cond&amp;gt; .
APPEND &amp;lt;fs_cond&amp;gt; TO i_cond.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ASINGH512 on Mar 11, 2010 7:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 06:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-work-area/m-p/6667603#M1447257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T06:05:52Z</dc:date>
    </item>
  </channel>
</rss>

