<?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: work area VS header line in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906898#M377927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guyz...plzzzzzz some1 reply....ill reward.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Feb 2007 02:29:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-11T02:29:23Z</dc:date>
    <item>
      <title>work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906897#M377926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guyz!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why do we hafta create WORK AREA ??? cant we make use of the header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what if we make use of int tabs wid header lines.???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont say dat performance issue....plzz explain me dat..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;zid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 01:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906897#M377926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T01:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906898#M377927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;guyz...plzzzzzz some1 reply....ill reward.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 02:29:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906898#M377927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T02:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906899#M377928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Work Area is usually uses to store only one record for example to output into a file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table with header line you should use to make process with couple of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michel Khouri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 02:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906899#M377928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T02:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906900#M377929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;header line also stores only 1 record i guess...&lt;/P&gt;&lt;P&gt;how does dat  make diff???&lt;/P&gt;&lt;P&gt;does dat make ny performance issue???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 02:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906900#M377929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T02:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906901#M377930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not a performance issue, but it is often recommended to use a work area since you would then have a different variable name.  Also, if you are using ABAP objects, the use of a table with a header area is not allowed - so it is considered by some to be good practice for new developments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my opinion, if you are not working with abap objects, then it is really a matter of personal preference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 02:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906901#M377930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T02:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906902#M377931</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;When you define an internal table the system arranges a part of memory area in two parts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The first one is to stores all records loaded in the table;&lt;/P&gt;&lt;P&gt;- The second one is to store the single record is elaborated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you loop an internal table, the system picks up the record from the first area and puts it to the second one; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part of memory to store all records is obligatory, so the system'll always create it when an internal table is defined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The part of memory to store the single record is not necessary, you have to use it only if it needs to read the table: this one is called HEADER LINE or WORK AREA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can decide to declare a table with or without an header line in according to what you need to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A) If you need to read the table you need to have a table with header line or work area:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- WITH HEADER LINE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ITAB OCCURS 0,
              FIELD1,
              FIELD2,
              FIELD3,
           END    OF ITAB.  

LOOP AT ITAB.
  WRITE ITAB.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While looping the table the system automatically fills the header line;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- WITH WORK AREA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF WA_ITAB,
              FIELD1,
              FIELD2,
              FIELD3,
           END    OF WA_ITAB.  

DATA: ITAB LIKE STANDARD TABLE OF WA_ITAB.

LOOP AT ITAB INTO WA_ITAB.
  WRITE WA_ITAB.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While looping the table the system automatically fills the work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it can say the header line is a work area the system automatically creates by internal table defination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's the same to use the header line or work area, because you need them when you have to read the records of an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A) If you don't need to read the table, you can define a table without header line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT-OPTIONS: SO_ERDAT FOR SY-DATUM.

DATA: IT_MATERIAL LIKE MARA-MATNR OCCURS 0.

DATA: IT_MARC LIKE STANDARD TABLE OF MARC WITH HEADER LINE.


SELECT MATNR FROM MARA INTO TABLE IT_MATERIAL WHERE ERDAT IN SO_ERDAT.
IF SY-SUBRC = 0.
  SELECT * FROM MARC
        FOR ALL ENTRIES IN IT_MATERIAL WHERE MATNR = IT_MATERIAL.
ENDIF.

LOOP AT IT_MARC.
  WRITE IT_MARC.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example the internal table IT_MATERIAL is used only to select the data from MARC using the option FOR ALL ENTRIES. This options doesn't use the header line of the table, so it's useless to define a table with an heaader line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 03:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906902#M377931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T03:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906903#M377932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;soo..precisely....dez no reason rite??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well..am actually preparin for my interview....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wat if he asks dis Q....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;daz wat i was wonderin....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 03:04:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906903#M377932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T03:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906904#M377933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No reason - unless you are working with ABAP objects, or the programming standards set out at your client ask that you use an explicit work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 03:11:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906904#M377933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T03:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906905#M377934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zid,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header and workarea performs the same functionality of temporarily storing internal table data . All headers are work area but all workareas are not header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header is the workarea created along with the internal table declaration, where as workarea are created separately i.e separate declaration exit for work area. &lt;/P&gt;&lt;P&gt;Header is the part of the internal table where as work area is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header is created using WITH HEADER LINE with internal table declartion where as work area may be create using like or type.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 03:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906905#M377934</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T03:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: work area VS header line</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906906#M377935</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;Yes Daniel is right! In ABAP Object it can use only internal table without header line, so you have to use a work area if you need to read it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, just as I said in my previuos answer, it's the same to use an header line or work area. Perhaps you can use both them if you have to read the same table twice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB.
  IF ITAB-FIELD1 = ......
    LOOP AT ITAB INTO WA_ITAB WHERE FIELD1 &amp;lt;&amp;gt; ITAB-FIELD1
                                AND FIELD2 = ITAB-FIELD2.
    ENDLOOP.
  ENDIF.
ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Feb 2007 03:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-area-vs-header-line/m-p/1906906#M377935</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-11T03:18:34Z</dc:date>
    </item>
  </channel>
</rss>

