<?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! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366256#M523958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE type &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The field f is created with type type. For the type, you can specify either one of the predefined types listed below, a type defined using the TYPES statement, or a type created in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;The standard length ( SL ) of a field depends on its type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type        Explanation         SL   Initial value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C    Text (Character)        1      space &lt;/P&gt;&lt;P&gt;N    Numeric text            1      '00...0' &lt;/P&gt;&lt;P&gt;D    Date (YYYYMMDD)         8      '00000000' &lt;/P&gt;&lt;P&gt;T    Time (HHMMSS)           6      '000000' &lt;/P&gt;&lt;P&gt;X    Hexadecimal (HeX code)  1      X'00' &lt;/P&gt;&lt;P&gt;I    Integer                 4      0 &lt;/P&gt;&lt;P&gt;P    Packed number           8      0 &lt;/P&gt;&lt;P&gt;F    Floating point number   8      0 &lt;/P&gt;&lt;P&gt;STRING Character sequence (string)  variable-length empty string &lt;/P&gt;&lt;P&gt;XSTRING Byte sequence (X string) &lt;/P&gt;&lt;P&gt;variable-length empty hexadecimal string &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA NUMBER TYPE I. &lt;/P&gt;&lt;P&gt;DATA WA_SPFLI TYPE SPFLI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field NUMBER is created with type I. You can now use it in the program. In particular, you can assign numeric values to the field and use it in calculations ( ABAP number types). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field WA_SPFLI is created using the type of the database table SPFLI from the ABAP Dictionary. This field is structured and can be used especially for working with data from database table SPFLI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... LIKE f1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See Cannot Use LIKE References to Dictionary Types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Field f is created with the same field attribtues as the data object f1, which has already been declared. Any data object (field, parameter, structure...) is allowed as long as its type has been fully specified. &lt;/P&gt;&lt;P&gt;f1 can be any ABAP Dictionary reference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA TABLE_INDEX LIKE SY-TABIX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field TABLE_INDEX now has the same attributes as SY-TABIX (index field for internal tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You should use this addition whenever you can. If the type of a field to which you are referring changes, the ABAP runtime system updates all references automatically. It also stops the system from carrying out unnecessry (and maybe undesirable) type conversions.&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;&lt;/P&gt;&lt;P&gt;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Jun 2007 13:44:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-16T13:44:22Z</dc:date>
    <item>
      <title>Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366248#M523950</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;   Whats the diff b'tween declaring internal table using type &amp;amp; like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  When we need to ve itab with or without header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 12:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366248#M523950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T12:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366249#M523951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE is to refer the data type like c ,i ,p etc.&lt;/P&gt;&lt;P&gt;a type i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE is to refer the predefined structure like mara-matnr,lfa1-lifnr&lt;/P&gt;&lt;P&gt;a like mara-matnr.&lt;/P&gt;&lt;P&gt;wa-mara like mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u have header line then u will be able to loop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u dont have the header line u have to explictly declare  a work area for acessing.&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;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 12:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366249#M523951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T12:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366250#M523952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi prabu!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    whats mean by&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;             &lt;/P&gt;&lt;P&gt;if u dont have the header line u have to explictly declare a work area for acessing.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Pls explain me how to do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 13:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366250#M523952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T13:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366251#M523953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To say it political correct (close my heart): This explanation is not very accurate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE refers to a self-defined (using TYPES statement) type or a basic type or a dictionary type (data element or table field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIKE refers to a data object already defined using DATA statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For pure compatibilty reasons (in the past there was no TYPE) the LIKE is identical to TYPE for all dictionary types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE REF TO and LIKE REF TO is analog but defines reference (pointer) fields&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>Sat, 16 Jun 2007 13:07:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366251#M523953</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-16T13:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366252#M523954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I ve an internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;            mara iike mara-matnr,&lt;/P&gt;&lt;P&gt;            ......,&lt;/P&gt;&lt;P&gt;            end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Now with like&lt;/P&gt;&lt;P&gt;    Data itab1 like itab occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now with type,&lt;/P&gt;&lt;P&gt;   Data itab2 like itab occurs 0,&lt;/P&gt;&lt;P&gt;  Is this correct whats the difference b'tween the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Rahul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 13:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366252#M523954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T13:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366253#M523955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ve an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;mara iike mara-matnr,&lt;/P&gt;&lt;P&gt;......,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now with like&lt;/P&gt;&lt;P&gt;Data itab1 like itab occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now with type,&lt;/P&gt;&lt;P&gt;Data itab2 type itab occurs 0,&lt;/P&gt;&lt;P&gt;Is this correct whats the difference b'tween the two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Rahul.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 13:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366253#M523955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T13:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366254#M523956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.mis.cmich.edu/sap-abap/abap04/sld012.htm" target="test_blank"&gt;http://sap.mis.cmich.edu/sap-abap/abap04/sld012.htm&lt;/A&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;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 13:30:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366254#M523956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T13:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366255#M523957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data itab2 type itab occurs 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will not pass the syntax check because itab is neither a type defined with TYPES nor a dictionary type nor a ABAP simple type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES:
  begin of ty_itab occurs 0,
  mara iike mara-matnr,
......,
  end of ty_itab,
  ty_t_itab type standard table of ty_itab with default key.

Data:
  lt_itab type ty_t_itab. "WITH HEADER LINE if not OO and if old fashioned
  lt_itab2 like lt_itab
* or lt_itab2 type ty_t_itab.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_itab2 = lt_itab. "works for tables without header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_itab2[] = lt_itab[]. "works for tables with or without header line&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>Sat, 16 Jun 2007 13:36:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366255#M523957</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-16T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366256#M523958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE type &lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The field f is created with type type. For the type, you can specify either one of the predefined types listed below, a type defined using the TYPES statement, or a type created in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;The standard length ( SL ) of a field depends on its type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type        Explanation         SL   Initial value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C    Text (Character)        1      space &lt;/P&gt;&lt;P&gt;N    Numeric text            1      '00...0' &lt;/P&gt;&lt;P&gt;D    Date (YYYYMMDD)         8      '00000000' &lt;/P&gt;&lt;P&gt;T    Time (HHMMSS)           6      '000000' &lt;/P&gt;&lt;P&gt;X    Hexadecimal (HeX code)  1      X'00' &lt;/P&gt;&lt;P&gt;I    Integer                 4      0 &lt;/P&gt;&lt;P&gt;P    Packed number           8      0 &lt;/P&gt;&lt;P&gt;F    Floating point number   8      0 &lt;/P&gt;&lt;P&gt;STRING Character sequence (string)  variable-length empty string &lt;/P&gt;&lt;P&gt;XSTRING Byte sequence (X string) &lt;/P&gt;&lt;P&gt;variable-length empty hexadecimal string &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA NUMBER TYPE I. &lt;/P&gt;&lt;P&gt;DATA WA_SPFLI TYPE SPFLI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field NUMBER is created with type I. You can now use it in the program. In particular, you can assign numeric values to the field and use it in calculations ( ABAP number types). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field WA_SPFLI is created using the type of the database table SPFLI from the ABAP Dictionary. This field is structured and can be used especially for working with data from database table SPFLI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2 &lt;/P&gt;&lt;P&gt;... LIKE f1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See Cannot Use LIKE References to Dictionary Types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Field f is created with the same field attribtues as the data object f1, which has already been declared. Any data object (field, parameter, structure...) is allowed as long as its type has been fully specified. &lt;/P&gt;&lt;P&gt;f1 can be any ABAP Dictionary reference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA TABLE_INDEX LIKE SY-TABIX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field TABLE_INDEX now has the same attributes as SY-TABIX (index field for internal tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You should use this addition whenever you can. If the type of a field to which you are referring changes, the ABAP runtime system updates all references automatically. It also stops the system from carrying out unnecessry (and maybe undesirable) type conversions.&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;&lt;/P&gt;&lt;P&gt;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2007 13:44:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2366256#M523958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-16T13:44:22Z</dc:date>
    </item>
  </channel>
</rss>

