<?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 INTERNAL TABLE WITH HEADER LINE. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319175#M1029230</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAP GURU,&lt;/P&gt;&lt;P&gt;   I have very simple question relate to Internal table defined "With Header Line" you see following code. I am trying to learn ABAP. I just don't understand why  we need create or why we need to use table, which created "WITH HEADER LINE"? I have attached code for sample, which I came cross. I was debugging the code and saw table ETAB TABLE DEFINED WITH HEADER LINE AND other just without Header line.  Please, can you explain me with simple lay man term. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;             COL1,&lt;/P&gt;&lt;P&gt;             COL2,&lt;/P&gt;&lt;P&gt;          END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ETAB LIKE TABLE OF LINE WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;           FTAB LIKE TABLE OF LINE.&lt;/P&gt;&lt;P&gt;LINE-COL1 = 'A'. LINE-COL2 = 'B'.&lt;/P&gt;&lt;P&gt;APPEND LINE TO ETAB.&lt;/P&gt;&lt;P&gt;MOVE ETAB[] TO FTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT FTAB INTO LINE.&lt;/P&gt;&lt;P&gt;      WRITE: / LINE-COL1, LINE-COL2.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;A B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shailesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Aug 2008 17:54:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-16T17:54:28Z</dc:date>
    <item>
      <title>INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319175#M1029230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAP GURU,&lt;/P&gt;&lt;P&gt;   I have very simple question relate to Internal table defined "With Header Line" you see following code. I am trying to learn ABAP. I just don't understand why  we need create or why we need to use table, which created "WITH HEADER LINE"? I have attached code for sample, which I came cross. I was debugging the code and saw table ETAB TABLE DEFINED WITH HEADER LINE AND other just without Header line.  Please, can you explain me with simple lay man term. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;             COL1,&lt;/P&gt;&lt;P&gt;             COL2,&lt;/P&gt;&lt;P&gt;          END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ETAB LIKE TABLE OF LINE WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;           FTAB LIKE TABLE OF LINE.&lt;/P&gt;&lt;P&gt;LINE-COL1 = 'A'. LINE-COL2 = 'B'.&lt;/P&gt;&lt;P&gt;APPEND LINE TO ETAB.&lt;/P&gt;&lt;P&gt;MOVE ETAB[] TO FTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT FTAB INTO LINE.&lt;/P&gt;&lt;P&gt;      WRITE: / LINE-COL1, LINE-COL2.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;A B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shailesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 17:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319175#M1029230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-16T17:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319176#M1029231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;internal tables with Header line&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;---No Need of explicit work area, by default header line acts as work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal tables without header line&lt;/P&gt;&lt;P&gt;&amp;lt;---work area required for processing the internal table like read/modify etc.&lt;/P&gt;&lt;P&gt;same code can also be done using the without header line concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF LINE,
COL1,
COL2,
END OF LINE.

DATA: FTAB TYPE TABLE OF LINE ,
           ETAB TYPE TABLE OF LINE,
WA_LINE TYPE LINE.

WA_LINE-COL1 = 'A'. WA_LINE-COL2 = 'B'.
APPEND WA_LINE TO ETAB.
MOVE ETAB[] TO FTAB.

LOOP AT FTAB INTO WA_LINE.
WRITE: / WA_LINE-COL1, WA_LINE-COL2.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 18:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319176#M1029231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-16T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319177#M1029232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Header line or the work area is used as interface. we can't access data from an internal table or send data to an internal table without header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we define internal table with header line , then we don't require to create explicit work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an in ternal table created with out work area we have create a work are of the similar structure of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;work area means a single line of table structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:-&lt;/P&gt;&lt;P&gt;Types : Begin of ty_itab,&lt;/P&gt;&lt;P&gt;              name(5) type c,&lt;/P&gt;&lt;P&gt;           End of ty_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : it_itab type table of ty_itab,&lt;/P&gt;&lt;P&gt;          wa_itab type ty_itab.&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;P&gt;Data : it_itab like ty_itab occurs 0 with header line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 18:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319177#M1029232</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-08-16T18:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319178#M1029233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;important :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are working on latest SAP versions, then working with internal table using header line concept is obsolete. and Header line concept is not supported by Object oriented ABAP  .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 18:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319178#M1029233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-16T18:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319179#M1029234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your code you have written&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ETAB LIKE TABLE OF LINE WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;FTAB LIKE TABLE OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here ETAB is an internal table and above addition like WITH HEADER LINE will also create a work area of the same structure at that time soo you do not need to create an explicit work area for internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or else you can define like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : t_kna1 TYPE STANDARD TABLE OF type_s_kna1,&lt;/P&gt;&lt;P&gt; wa_kna1 TYPE type_s_kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here wa_kna1 is a work area...this is an internal table declaration without header line..&lt;/P&gt;&lt;P&gt;so if you want to use internal table in loop then you need to do that by using workarea only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when you declare internal table with header line ..you can directly use internal table name as workarea only..no need to define wa_kna1 TYPE type_s_kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE-COL1 = 'A'. LINE-COL2 = 'B'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in above state ment also if you have defined work area then you have to use like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA_ETAB-col1 = 'A'. &lt;/P&gt;&lt;P&gt;APPEND WA_ETAB TO ETAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in new version table with header line is not working.so you need to define explicit work area there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it helps you to understand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 20:53:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319179#M1029234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-16T20:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319180#M1029235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt; I really appriciate for your time and reply.  All the answers were very helpful to understand. It cleared my concerns and understandings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shailesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 02:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319180#M1029235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T02:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE WITH HEADER LINE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319181#M1029236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 06:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-with-header-line/m-p/4319181#M1029236</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-29T06:46:21Z</dc:date>
    </item>
  </channel>
</rss>

