<?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: internal table declaration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191373#M467175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Boy Dawson, in the new version of abap, the header line is considerer obsolete, and you have to use a work area instead. In some of them, the extended program check mark it as an error or warning i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 May 2007 03:06:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-11T03:06:24Z</dc:date>
    <item>
      <title>internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191369#M467171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that code#2 is the advisable and new form of declaring internal table. Im new to abap and I want to know the difference between the two codes and the advantage/disadvantage (if any) of one to another. &amp;lt;b&amp;gt;thanks a lot. &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------" /&gt;&lt;P&gt;code #1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------" /&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab2 type table of spfli with header line.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------" /&gt;&lt;P&gt;code #2&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------" /&gt;&lt;PRE&gt;&lt;CODE&gt;data: itab type table of spfli,
      wa like line of itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 17:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191369#M467171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T17:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191370#M467172</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;Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference between Work Area and Header Line &lt;/P&gt;&lt;P&gt;While adding or retrieving records to / from internal table we have to keep the record temporarily. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The area where this record is kept is called as work area for the internal table.  The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header line is a implicit work area for the internal table.  It depends on how the internal table is declared that the itab will have the header line or not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;data: begin of itab occurs 10, &lt;/P&gt;&lt;P&gt;           ab type c, &lt;/P&gt;&lt;P&gt;           cd type i, &lt;/P&gt;&lt;P&gt;        end of itab.  " this table will have the header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_itab like itab. " explicit work area for itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 like itab occurs 10. " table is without header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The header line is a field string with the same structure as a row of the body, but it can only hold a single row. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table.  It is the default work area for the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The difference between &lt;/P&gt;&lt;P&gt;whih header line and with out heater line of internal table.&lt;/P&gt;&lt;P&gt;ex:-&lt;/P&gt;&lt;P&gt;a) Data : itab like mara occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Data: itab like mara occurs 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-While adding or retrieving records to / from internal table we have to keep the record temporarily. &lt;/P&gt;&lt;P&gt;-The area where this record is kept is called as work area for the internal table. &lt;/P&gt;&lt;P&gt;-The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line. &lt;/P&gt;&lt;P&gt;-Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Data : itab like mara occurs 0 with header line.&lt;/P&gt;&lt;P&gt;table is with header line&lt;/P&gt;&lt;P&gt;b) Data: itab like mara occurs 0. &lt;/P&gt;&lt;P&gt;table is without header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)work area / field string and internal table&lt;/P&gt;&lt;P&gt;which one is prefarable for good performance any why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.&lt;/P&gt;&lt;P&gt;In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 10, &lt;/P&gt;&lt;P&gt;ab type c, &lt;/P&gt;&lt;P&gt;cd type i, &lt;/P&gt;&lt;P&gt;end of itab. " this table will have the header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_itab like itab. " explicit work area for itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 like itab occurs 10. " table is without header line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Laxmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 17:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191370#M467172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T17:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191371#M467173</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;WITH HEADER LINE is not allowed in the OO programming..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) If you create a internal table with header line..Then you don't have to explicit work area to handle the rows of the internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If you create internal table without header line..Then for accessing the rows of the internal table..You have to create an explicit workarea..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 17:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191371#M467173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T17:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191372#M467174</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 use internal tables with header lines, you must remember that the header line and the body of the table have the same name. If you have an internal table with header line and you want to address the body of the table, you must indicate this by placing brackets after the table name (&amp;lt;itab&amp;gt;[]). Otherwise, ABAP interprets the name as the name of the header line and not of the body of the table. You can avoid this potential confusion by using internal tables without header lines. In particular, internal tables nested in structures or other internal tables must not have a header line, since this can lead to ambiguous expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 17:42:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191372#M467174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T17:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: internal table declaration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191373#M467175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Boy Dawson, in the new version of abap, the header line is considerer obsolete, and you have to use a work area instead. In some of them, the extended program check mark it as an error or warning i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 03:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-declaration/m-p/2191373#M467175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T03:06:24Z</dc:date>
    </item>
  </channel>
</rss>

