‎2007 May 10 11:13 AM
Hi
Wat is the difference between Standard , Sorted ,Hashed & Indexed Intenal tables &How we r going to declare this tables while writing program (i.e) Wat is the syntax for declaring this 4 internal table .Plz give an example.
Regards
Sai
‎2007 May 10 12:02 PM
tables in dictionary are of two types
1) INDEXED
a) standard
b)sorted
2)NON INDEXED
a) Hashed
... { {[STANDARD] TABLE}
| {SORTED TABLE}
| {HASHED TABLE}
| {ANY TABLE}
| {INDEX TABLE} } ... .
Effect
Definition of the table type in an internal table.
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.
The non-generic table types determine the internal administration and access type in the ABAP program for an internal table:
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.
Sorted tables are managed by a logical index (like standard tables). The entries are listed in ascending order according to table key.
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.
The generic table types define a generic table type that can only be used for typing formal parameters and field symbols:
ANY TABLE includes all table types.
INDEX TABLE includes all standard tables and sorted tables.
‎2007 May 10 12:13 PM
Hi
Internal tables in ABAP are catogerized into 3 types
1) Standard tables - by default
2) Sorted internal tables - declared by SORTED addition, while doing insertions
system follows the sorting order, needs a key field
3) Hashed internal tables:
declared with HASHED TABLE addition, followes some hash technique to store the records in the table,
also follows the same hash technique while retriving the value, main advantage is time to access any record is same.