<?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 tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857253#M669835</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 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE DATA TYPE OF AN INTERNAL TABLE IS FULLY SPECIFIED BY ITS LINE TYPE, KEY, AND TABLE TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	LINE TYPE - THE DATA TYPE OF AN INTERNAL TABLE IS NORMALLY A STRUCTURE. EACH COMPONENT OF THE STRUCTURE IS A COLUMN IN THE INTERNAL TABLE.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	KEY - THE KEY IDENTIFIES TABLE ROWS. KEY MAY BE EITHER UNIQUE OR NON-UNIQUE. IF A TABLE HAS AN ELEMENTARY LINE TYPE, THE DEFAULT KEY IS THE ENTIRE LINE. THE DEFAULT KEY OF AN INTERNAL TABLE WHOSE LINE TYPE IS AN INTERNAL TABLE, THE DEFAULT KEY IS EMPTY.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	TABLE TYPE &amp;#150; STANDARD, HASHED AND SORTED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	STANDARD TABLES	SORTED TABLES	HASHED TABLES&lt;/P&gt;&lt;P&gt;1) INDEX	YES	YES	NO&lt;/P&gt;&lt;P&gt;2) UNIQUE/ NON-UNIQUE	ALWAYS NON-UNIQUE	UNIQUE/ NON-UNIQUE	ALWAYS UNIQUE&lt;/P&gt;&lt;P&gt;3) ACCESS TIME	LINEAR 	LOG PROPORTIONAL TO NO. OF ENTRY 	INDEPENDENT&lt;/P&gt;&lt;P&gt;4) SEARCH	LINEAR	BINARY	HASH ALGORITHM&lt;/P&gt;&lt;P&gt;5) ACCESS	KEY/INDEX	KEY/INDEX	KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	HASHED TABLES MAY NOT CONTAIN MORE THAN 2 MILLION ENTRIES.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	EVEN EMPTY INTERNAL TABLES WITH HEADER LINE OCCUPY 256 BYTES OF MEMORY. IF WE USE WITHOUT HEADER LINE IT WILL JUST OCCUPY 8 BYTES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2007 06:19:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-27T06:19:02Z</dc:date>
    <item>
      <title>Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857244#M669826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;what r the different types of internal tables.&lt;/P&gt;&lt;P&gt;what is the difference between them?&lt;/P&gt;&lt;P&gt;when we use hashed,standard,index ?&lt;/P&gt;&lt;P&gt;pls give me each with examples?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857244#M669826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857245#M669827</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 table is aruntime entity created for storing data.&lt;/P&gt;&lt;P&gt;internal tables are resided on presentation server memory itself.&lt;/P&gt;&lt;P&gt;internal tables are of different types like&lt;/P&gt;&lt;P&gt;1. internal tables with header line.&lt;/P&gt;&lt;P&gt;2. internal tables with out header lines...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dictionary tables are global and can be used by anyone.&lt;/P&gt;&lt;P&gt;dictionary tables resides on databse server.&lt;/P&gt;&lt;P&gt;we can data from dictionary tables using native-sql and also open sql statements also.&lt;/P&gt;&lt;P&gt;dictionary tables are of different types as&lt;/P&gt;&lt;P&gt;1. cluster tables&lt;/P&gt;&lt;P&gt;2. pool tables..&lt;/P&gt;&lt;P&gt;3. transparent tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857245#M669827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857246#M669828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are three types of Internal Tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1.Standard Internal Tables: These tables have a linear index and can be accessed using the index or the key. The response time is in linear relationship with number of table entries. These tables are useful when user wants to address individual table entries using the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.Sorted Internal Tables: These tables also have an index and the key. But, the response time is in logarithmic relationship with number of table entries, since it uses binary search algorithm instead of linear search. These tables are useful when user wants the table to be sorted while additional entries have to be added. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.Hashed Internal Tables: These tables have no index, but have the key. The response time is constant irrespective of number of table entries, since it uses a Hash algorithm. These tables are useful when user wants to access the entries with key only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:06:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857246#M669828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857247#M669829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the examples below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when and internal table without header is used, the operations of that internal table should be performed from/to a workarea or fieldsymbol instead of a header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example: (int-table with header line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;var1 type i,&lt;/P&gt;&lt;P&gt;var2 type char,&lt;/P&gt;&lt;P&gt;var3 type i,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example: (internal table without header line)&lt;/P&gt;&lt;P&gt;types: begin of type1,&lt;/P&gt;&lt;P&gt;var1 type i,&lt;/P&gt;&lt;P&gt;var2 type char,&lt;/P&gt;&lt;P&gt;var3 type i,&lt;/P&gt;&lt;P&gt;end of type1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type table of type1,&lt;/P&gt;&lt;P&gt;workarea type type1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857247#M669829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857248#M669830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;devender&lt;/P&gt;&lt;P&gt;Standard Tables &lt;/P&gt;&lt;P&gt;This table category is suited best whenever the individual entries can be accessed using the index. The index access is the fastest access to table entries. You should fill a standard table by appending rows with APPEND and execute the other accesses by specifying an index (addition INDEX of the resprective statement). Since the expenditure for key accesses to standard tables increases directly with the number of table entries, you should use key accesses to standard tables only if you can decouple the filling of the table from the other processing operations. If a standard table is sorted after the filling, a key access with binary search (BINARY SEARCH) is connected to the number of table entries only logarithmically. &lt;/P&gt;&lt;P&gt;Sorted Tables &lt;/P&gt;&lt;P&gt;This table category is suited whenever the table must already be sorted when it is filled. You then use INSERT to fill the table according to the sort sequence defined by the table key. With key accesses, the expenditure is connected logarithmically to the number of table entries, because a binary search is carried out automatically. Sorted tables are suited for partly sequential processing in a LOOP if the beginning of the table key is specified in the WHERE condition. &lt;/P&gt;&lt;P&gt;Hashed Tables &lt;/P&gt;&lt;P&gt;This table category is suited whenever the key accessess represent the central operation on the table entries. With hashed tables, no index access is possible. With key accesses, the expenditure is always constant and independent of the number of table entries. Like with database tables, the key of a hashed table is always unique. Therefore, hashed tables are also suited as database-type internal tables. &lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nagesh.Paruchuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:10:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857248#M669830</guid>
      <dc:creator>paruchuri_nagesh</dc:creator>
      <dc:date>2007-09-27T06:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857249#M669831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 3 types of internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal tables can be classified like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            INDEX                                                NON-INDEX            &lt;/P&gt;&lt;P&gt;STANDARD and SORTED                                 HASHED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard and sorted use indeces while hashed will not use index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-are-different-types-of-internal-tables-and-their-usage.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF TY_STUDENT,&lt;/P&gt;&lt;P&gt;SNO TYPE I,&lt;/P&gt;&lt;P&gt;SNAME(5),&lt;/P&gt;&lt;P&gt;END OF TY_STUDENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_STUDENT TYPE TABLE OF TY_STUDENT (STANDARD TABLE DECL)&lt;/P&gt;&lt;P&gt;DATA: IT_STUDENT TYPE SORTED TABEL OF TY_STUDENT (SORTED)&lt;/P&gt;&lt;P&gt;DATA: IT_STUDENT TYPE HASHED TABLE OF TY_STUDENT WITH KEY... (HASHED)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES - tabkind &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... { {[STANDARD] TABLE} &lt;/P&gt;&lt;P&gt;    | {SORTED TABLE} &lt;/P&gt;&lt;P&gt;    | {HASHED TABLE} &lt;/P&gt;&lt;P&gt;    | {ANY TABLE} &lt;/P&gt;&lt;P&gt;    | {INDEX TABLE} } ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Definition of the table type in an internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can specify the non-generic table types standard table ( STANDARD TABLE), sorted table ( SORTED TABLE), and hashed table (HASHED TABLE), as well as the generic table types ANY TABLE and INDEX TABLE. The addition STANDARD is optional for standard tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The non-generic table types determine the internal administration and access type in the ABAP program for an internal table: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables are managed system-internally by a logical index. New rows are either attached to the table or added at certain positions. The table key or the index identify individual rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables are managed by a logical index (like standard tables). The entries are listed in ascending order according to table key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables are managed by a hash algorithm. There is no logical index. The entries are not ordered in the memory. The position of a row is calculated by specifying a key using a hash function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generic table types define a generic table type that can only be used for typing formal parameters and field symbols: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANY TABLE includes all table types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDEX TABLE includes all standard tables and sorted tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857249#M669831</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2007-09-27T06:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857250#M669832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THREE TYPES:&lt;/P&gt;&lt;P&gt;1.STANDARD TABLES&lt;/P&gt;&lt;P&gt;2.SORTED TABLES&lt;/P&gt;&lt;P&gt;3.HASHED TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STANDARD AND SORTED TABLES ARE BASICALLY INDEX BASED INTERNAL TABLES... WHILE HASHED TABLES ARE BASED ON KEY VALUE SEARCH....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IF USEFUL..&lt;/P&gt;&lt;P&gt;THANKS...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:15:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857250#M669832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857251#M669833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , devender reddy .&lt;/P&gt;&lt;P&gt;I found this from SAP Library, I hope it's helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Table type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Choosing a Table Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At last, I think the method is almost the same, follow this rule: &lt;/P&gt;&lt;P&gt;DATA &amp;lt;itab&amp;gt; TYPE|LIKE &amp;lt;tabkind&amp;gt; OF &amp;lt;linetype&amp;gt; WITH &amp;lt;key&amp;gt;&lt;/P&gt;&lt;P&gt;            [INITIAL SIZE &amp;lt;n&amp;gt;]&lt;/P&gt;&lt;P&gt;            [WITH HEADER LINE].&lt;/P&gt;&lt;P&gt;Hashed:&lt;/P&gt;&lt;P&gt;DATA ITAB TYPE HASHED TABLE OF SPFLI &lt;/P&gt;&lt;P&gt;WITH UNIQUE KEY CARRID CONNID.&lt;/P&gt;&lt;P&gt;Standard:&lt;/P&gt;&lt;P&gt;DATA ITAB TYPE STANDARD TABLE OF SPFLI WITH KEY CARRID CONNID.&lt;/P&gt;&lt;P&gt;Sorted:&lt;/P&gt;&lt;P&gt;DATA ITAB TYPE SORTED TABLE OF SPFLI WITH UNIQUE KEY CARRID CONNID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857251#M669833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857252#M669834</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;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Internal tables&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&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;Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects.  A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Table type&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled&lt;/P&gt;&lt;P&gt;very quickly, since the system does not have to check whether there are already existing entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are&lt;/P&gt;&lt;P&gt;known generically as index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Choosing a Table Type&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Standard tables&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access,&lt;/P&gt;&lt;P&gt;standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Sorted tables&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for&lt;/P&gt;&lt;P&gt;partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hashed tables&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;1.&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;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;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;The output is:&lt;/P&gt;&lt;P&gt;A B&lt;/P&gt;&lt;P&gt;The example creates two standard tables ETAB and FTAB with the line type of the&lt;/P&gt;&lt;P&gt;structure LINE. ETAB has a header line. After filling ETAB line by line using the&lt;/P&gt;&lt;P&gt;APPEND statement, its entire contents are assigned to FTAB. Note the brackets in the statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;DATA: FTAB TYPE SORTED TABLE OF F&lt;/P&gt;&lt;P&gt;WITH NON-UNIQUE KEY TABLE LINE,&lt;/P&gt;&lt;P&gt;ITAB TYPE HASHED TABLE OF I&lt;/P&gt;&lt;P&gt;WITH UNIQUE KEY TABLE LINE,&lt;/P&gt;&lt;P&gt;FL TYPE F.&lt;/P&gt;&lt;P&gt;DO 3 TIMES.&lt;/P&gt;&lt;P&gt;INSERT SY-INDEX INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;FTAB = ITAB.&lt;/P&gt;&lt;P&gt;LOOP AT FTAB INTO FL.&lt;/P&gt;&lt;P&gt;WRITE: / FL.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;The output is:&lt;/P&gt;&lt;P&gt;1.000000000000000E+00&lt;/P&gt;&lt;P&gt;2.000000000000000E+00&lt;/P&gt;&lt;P&gt;3.000000000000000E+00&lt;/P&gt;&lt;P&gt;FTAB is a sorted table with line type F and a non-unique key. ITAB is a hashed table with line type I and a unique key. The line types, and therefore the entire tables, are convertible. It is therefore possible to assign the contents of ITAB to FTAB. When you assign the unsorted table ITAB to the sorted table FTAB, the contents are automatically sorted by the key of FTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ILINE,&lt;/P&gt;&lt;P&gt;NUM TYPE I,&lt;/P&gt;&lt;P&gt;END OF ILINE,&lt;/P&gt;&lt;P&gt;BEGIN OF FLINE,&lt;/P&gt;&lt;P&gt;NUM TYPE F,&lt;/P&gt;&lt;P&gt;END OF FLINE,&lt;/P&gt;&lt;P&gt;ITAB LIKE TABLE OF ILINE,&lt;/P&gt;&lt;P&gt;FTAB LIKE TABLE OF FLINE.&lt;/P&gt;&lt;P&gt;DO 3 TIMES.&lt;/P&gt;&lt;P&gt;ILINE-NUM = SY-INDEX.&lt;/P&gt;&lt;P&gt;APPEND ILINE-NUM TO ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;FTAB = ITAB.&lt;/P&gt;&lt;P&gt;LOOP AT FTAB INTO FLINE.&lt;/P&gt;&lt;P&gt;WRITE: / FLINE-NUM.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;The output might look like this:&lt;/P&gt;&lt;P&gt;6.03823403895813E-154&lt;/P&gt;&lt;P&gt;6.03969074613219E-154&lt;/P&gt;&lt;P&gt;6.04114745330626E-154&lt;/P&gt;&lt;P&gt;Here, the line types of the internal tables ITAB and FTAB are structures each with&lt;/P&gt;&lt;P&gt;one component of type I or F. The line types are convertible, but not compatible.&lt;/P&gt;&lt;P&gt;Therefore, when assigning ITAB to FTAB, the contents of Table ITAB are converted&lt;/P&gt;&lt;P&gt;to type C fields and then written to FTAB. The system interprets the transferred data as type F fields, and obtains meaningless results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;COLUMN1 TYPE I,&lt;/P&gt;&lt;P&gt;COLUMN2 TYPE I,&lt;/P&gt;&lt;P&gt;COLUMN3 TYPE I,&lt;/P&gt;&lt;P&gt;END OF LINE.&lt;/P&gt;&lt;P&gt;TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.&lt;/P&gt;&lt;P&gt;The program defines a table type ITAB. It is a sorted table, with line type of the&lt;/P&gt;&lt;P&gt;structure LINE and a unique key of the component COLUMN1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.&lt;/P&gt;&lt;P&gt;TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE&lt;/P&gt;&lt;P&gt;LINE.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;COLUMN1 TYPE I,&lt;/P&gt;&lt;P&gt;COLUMN2 TYPE I,&lt;/P&gt;&lt;P&gt;COLUMN3 TYPE I,&lt;/P&gt;&lt;P&gt;END OF LINE.&lt;/P&gt;&lt;P&gt;TYPES ITAB TYPE SORTED TABLE OF LINE WITH UNIQUE KEY COLUMN1.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF DEEPLINE,&lt;/P&gt;&lt;P&gt;FIELD TYPE C,&lt;/P&gt;&lt;P&gt;TABLE1 TYPE VECTOR,&lt;/P&gt;&lt;P&gt;TABLE2 TYPE ITAB,&lt;/P&gt;&lt;P&gt;END OF DEEPLINE.&lt;/P&gt;&lt;P&gt;TYPES DEEPTABLE TYPE STANDARD TABLE OF DEEPLINE&lt;/P&gt;&lt;P&gt;WITH DEFAULT KEY.&lt;/P&gt;&lt;P&gt;The program defines a table type VECTOR with type hashed table, the elementary&lt;/P&gt;&lt;P&gt;line type I and a unique key of the entire table line. The second table type is the&lt;/P&gt;&lt;P&gt;same as in the previous example. The structure DEEPLINE contains the internal&lt;/P&gt;&lt;P&gt;table as a component. The table type DEEPTABLE has the line type DEEPLINE.&lt;/P&gt;&lt;P&gt;Therefore, the elements of this internal table are themselves internal tables. The key is the default key - in this case the column FIELD. The key is non-unique, since the table is a standard table.&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, 27 Sep 2007 06:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857252#M669834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857253#M669835</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 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE DATA TYPE OF AN INTERNAL TABLE IS FULLY SPECIFIED BY ITS LINE TYPE, KEY, AND TABLE TYPE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	LINE TYPE - THE DATA TYPE OF AN INTERNAL TABLE IS NORMALLY A STRUCTURE. EACH COMPONENT OF THE STRUCTURE IS A COLUMN IN THE INTERNAL TABLE.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	KEY - THE KEY IDENTIFIES TABLE ROWS. KEY MAY BE EITHER UNIQUE OR NON-UNIQUE. IF A TABLE HAS AN ELEMENTARY LINE TYPE, THE DEFAULT KEY IS THE ENTIRE LINE. THE DEFAULT KEY OF AN INTERNAL TABLE WHOSE LINE TYPE IS AN INTERNAL TABLE, THE DEFAULT KEY IS EMPTY.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	TABLE TYPE &amp;#150; STANDARD, HASHED AND SORTED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	STANDARD TABLES	SORTED TABLES	HASHED TABLES&lt;/P&gt;&lt;P&gt;1) INDEX	YES	YES	NO&lt;/P&gt;&lt;P&gt;2) UNIQUE/ NON-UNIQUE	ALWAYS NON-UNIQUE	UNIQUE/ NON-UNIQUE	ALWAYS UNIQUE&lt;/P&gt;&lt;P&gt;3) ACCESS TIME	LINEAR 	LOG PROPORTIONAL TO NO. OF ENTRY 	INDEPENDENT&lt;/P&gt;&lt;P&gt;4) SEARCH	LINEAR	BINARY	HASH ALGORITHM&lt;/P&gt;&lt;P&gt;5) ACCESS	KEY/INDEX	KEY/INDEX	KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	HASHED TABLES MAY NOT CONTAIN MORE THAN 2 MILLION ENTRIES.&lt;/P&gt;&lt;P&gt;&amp;amp;#61692;	EVEN EMPTY INTERNAL TABLES WITH HEADER LINE OCCUPY 256 BYTES OF MEMORY. IF WE USE WITHOUT HEADER LINE IT WILL JUST OCCUPY 8 BYTES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857253#M669835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857254#M669836</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;There are 3 types of Internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard Internal Tables: &lt;/P&gt;&lt;P&gt;Standard tables have a linear index. You can access them using either the index or the key. If you use the key, the response time is in linear relationship to the number of table entries. The key of a standard table is always non-unique, and you may not include any specification for the uniqueness in the table definition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table type is particularly appropriate if you want to address individual table entries using the index. This is the quickest way to access table entries. To fill a standard table, append lines using the (APPEND) statement. You should read, modify and delete lines by referring to the index (INDEX option with the relevant ABAP command). The response time for accessing a standard table is in linear relation to the number of table entries. If you need to use key access, standard tables are appropriate if you can fill and process the table in separate steps. For example, you can fill a standard table by appending records and then sort it. If you then use key access with the binary search option (BINARY), the response time is in logarithmic relation to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted Internal Tables: &lt;/P&gt;&lt;P&gt;Sorted tables are always saved correctly sorted by key. They also have a linear key, and, like standard tables, you can access them using either the table index or the key. When you use the key, the response time is in logarithmic relationship to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique, or non-unique, and you must specify either UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables both belong to the generic group index tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table type is particularly suitable if you want the table to be sorted while you are still adding entries to it. You fill the table using the (INSERT) statement, according to the sort sequence defined in the table key. Table entries that do not fit are recognised before they are inserted. The response time for access using the key is in logarithmic relation to the number of table entries, since the system automatically uses a binary search. Sorted tables are appropriate for partially sequential processing in a LOOP, as long as the WHERE condition contains the beginning of the table key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed Internal Tables: &lt;/P&gt;&lt;P&gt;Hashes tables have no internal linear index. You can only access hashed tables by specifying the key. The response time is constant, regardless of the number of table entries, since the search uses a hash algorithm. The key of a hashed table must be unique, and you must specify UNIQUE in the table definition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table type is particularly suitable if you want mainly to use key access for table entries. You cannot access hashed tables using the index. When you use key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key of a hashed table is always unique. Hashed tables are therefore a useful way of constructing and &lt;/P&gt;&lt;P&gt;using internal tables that are similar to database tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857254#M669836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857255#M669837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Devender,&lt;/P&gt;&lt;P&gt;Internal table types are as follows below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STANDARD table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key access to a standard table uses a linear search. This means that the time required for a search is in linear relation to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use index operations to access standard tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORTED table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defines the table as one that is always saved correctly sorted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key access to a sorted table uses a binary key. 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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HASHED table&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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can only access a hashed table using the generic key operations or other generic operations ( SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not allowed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDEX table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A table that can be accessed using an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Index table is only used to specify the type of generic parameters in a FORM or FUNCTION. That means that you can't create a table of type INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard tables and sorted tables are index tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax :&lt;/P&gt;&lt;P&gt;DATA itab TYPE table type of line type [WITH UNIQUE/NON-UNIQUE KEY &amp;lt;key&amp;gt;] [Iinitial size n]  [WITH HEADER LINE]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 06:27:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2857255#M669837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T06:27:40Z</dc:date>
    </item>
  </channel>
</rss>

