<?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/2431731#M543657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;just refer to the link below&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g" target="test_blank"&gt;http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it may help u.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Jun 2007 14:31:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-23T14:31:09Z</dc:date>
    <item>
      <title>internal table..............</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431730#M543656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1 ) give me brief explanation about internal tables and its types&lt;/P&gt;&lt;P&gt;2 ) what is the effect of defining  work area while defining internal table.....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards basavaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2007 07:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431730#M543656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-23T07:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: internal table..............</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431731#M543657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;just refer to the link below&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g" target="test_blank"&gt;http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it may help u.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;ravish&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz dont forget to reward points if helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2007 14:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431731#M543657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-23T14:31: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/2431732#M543658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Basavraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An internal table is one of two structured data types in ABAP. It can contain any number of identically structured rows, with or without a header line.&lt;/P&gt;&lt;P&gt;The header line is similar to a structure and serves as the work area of the internal table. The data type of individual rows can be either elementary or structured.&lt;/P&gt;&lt;P&gt;Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fields of Internal Tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH &amp;lt;itab&amp;gt; FOR sets SY-TABIX to the index of the table line in which the search string is found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TFILL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TLENG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the length of the lines in the relevant internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TOCCU&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TLENG contains the initial amount of memory allocated to the relevant internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this links....&lt;/P&gt;&lt;P&gt;&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;Internal table declaration &lt;/P&gt;&lt;P&gt;Declaring internal tables is an essential part of writing ABAP code as this is where most of the data retrieved &lt;/P&gt;&lt;P&gt;from database tables will be stored. During the select statement you retrieve data from a database table into &lt;/P&gt;&lt;P&gt;an internal table (multiple rows) or a work area or header line (single row). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZTYPES                                                      *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTYPES                                                  .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table declaration (old method)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line&lt;/P&gt;&lt;P&gt;  ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;  ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt; END OF tab_ekpo.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*Table declaration (new method)     "USE THIS WAY!!!&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_ekpo,&lt;/P&gt;&lt;P&gt;  ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;  ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt; END OF t_ekpo.&lt;/P&gt;&lt;P&gt;DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab&lt;/P&gt;&lt;P&gt;      wa_ekpo TYPE t_ekpo.                    "work area (header line)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build internal table and work area from existing internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method&lt;/P&gt;&lt;P&gt;      wa_datatab LIKE LINE OF tab_ekpo.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build internal table and work area from existing internal table,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;adding additional fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: BEGIN OF t_repdata.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!&lt;/P&gt;&lt;P&gt;TYPES: bukrs  TYPE ekpo-werks,&lt;/P&gt;&lt;P&gt;       bstyp  TYPE ekpo-bukrs.&lt;/P&gt;&lt;P&gt;TYPES: END OF t_repdata.&lt;/P&gt;&lt;P&gt;DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab&lt;/P&gt;&lt;P&gt;      wa_repdata TYPE t_repdata.                 "work area (header line)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sy-tabix will give you the no of table entries in the table .... you can see the structure in the SE11 syst which has all the fields of the system ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2007 14:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431732#M543658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-23T14:42: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/2431733#M543659</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 of 4 types&lt;/P&gt;&lt;P&gt;1) Standard table&lt;/P&gt;&lt;P&gt;2) Sorted table&lt;/P&gt;&lt;P&gt;3) Hashed table&lt;/P&gt;&lt;P&gt;4) Index table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Standard table&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defines the table as a standard table. This will always strore the data into internal table in the sorting order on Key Field using Linear search. This means that the time taken for searching records would be based on no. of records we are reading from the database. You should use index operations to access standard tables.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;            data : itab type standard table of vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Sorted table&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always defines the table in a sorted order. The records stored in this table will always be sorted using binary saerch on Key Field. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries. You can also access sorted tables by index operations.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;            data : itab type sorted table of dfkkop with unique key vkont.&lt;/P&gt;&lt;P&gt;                              (or)&lt;/P&gt;&lt;P&gt;            data : itab type sorted table of dfkkop with non-unique key vkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Hashed table&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using their unique key. Unlike standard and sorted tables, you cannot access hash tables using an index. All entries in the table must have a unique key. Access time using the key is constant, regardless of the number of table entries.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;            data : itab type hashed table of dfkkop with unique key vkont.&lt;/P&gt;&lt;P&gt;                               (or)&lt;/P&gt;&lt;P&gt;            data : itab type hashed table of dfkkop with non-unique key vkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Index table&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An index table is one that you can access using an index. Hashed tables are not index tables, and cannot therefore be passed to parameters defined as INDEX TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will solve your problem.&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;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 05:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431733#M543659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T05:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: internal table..............</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431734#M543660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Internal table declaration  &amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;Declaring internal tables is an essential part of writing ABAP code as this is where most of the data retrieved from database tables will be stored. During the select statement you retrieve data from a database table into an internal table (multiple rows) or a work area or header line (single row).   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTYPES                                                  .

* Table declaration (old method)
DATA: BEGIN OF tab_ekpo OCCURS 0,             "itab with header line
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
 END OF tab_ekpo.

*Table declaration (new method)     "USE THIS WAY!!!
TYPES: BEGIN OF t_ekpo,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
 END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,      "itab
      wa_ekpo TYPE t_ekpo.                    "work area (header line)

* Build internal table and work area from existing internal table
DATA: it_datatab LIKE tab_ekpo OCCURS 0,      "old method
      wa_datatab LIKE LINE OF tab_ekpo.

* Build internal table and work area from existing internal table,
* adding additional fields
TYPES: BEGIN OF t_repdata.
        INCLUDE STRUCTURE tab_ekpo.  "could include EKKO table itself!!
TYPES: bukrs  TYPE ekpo-werks,
       bstyp  TYPE ekpo-bukrs.
TYPES: END OF t_repdata.
DATA: it_repdata TYPE STANDARD TABLE OF t_repdata INITIAL SIZE 0,   "itab
      wa_repdata TYPE t_repdata.                 "work area (header line)

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points if it is usefull ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 07:57:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/2431734#M543660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T07:57:55Z</dc:date>
    </item>
  </channel>
</rss>

