Welcome to RanjeetSridhar.com
|
More About ABAP / Programming Language for SAP:
|
Basic Topics
Internal Tables
The data type of an internal table is fully specified by its:
- Line type: - The line type defines the attributes of the individual fields. You can specify any ABAP data type.
- Key definition: - The key fields and their sequence determine the criteria by which the system identifies table lines.
- Key type: - You can define the key as either unique or non-unique . The uniqueness of the key must be
compatible with the access type you have chosen for the table. If the key is unique, there can be no
duplicate entrie s in the table.
- Access type: - Unlike database tables, the system assigns line numbers to certain kinds of internal tables. This
means that you can use the index to access lines as well as the key. We sometimes use the term "table type " to refer to this.
We can also divide up internal table types into three kinds by their access type:
In a standard table, you can access data using either the table index or the key.
Since the key of a standard table always has to be non-unique for compatibility reasons, the system
searches the whole table each time you access it using the key. Consequently, you should always use
the index to access a standard table whenever possible.
In a sorted table, the system automatically stores the entries and inserts new entries
sorted by the table key. The system uses a binary search on the table when you access it using the
key. You can specify the key of a sorted table as unique. You will often use the key to access a
sorted table, but it is also possible to use the index. Standard tables and sorted tables are generically
known as index tables.
You can only access a hashed table using the key. There are certain conditions
under which you can considerably reduce the access times to large tables by using a hashed table.
The key of a hashed table must always be unique.
You do not have to specify the access type fully. You can either omit it altogether, or specify it
partially (index table). The table type is then generic, and, by omitting certain attributes, we can use
it to specify the types of interface parameters
Page Last Updated July 28th 2008
You can email me at contactme@ranjeetsridhar.com
(R)Logos, Material, Adobe Documents are the copyright rights of SAP(r) Germany, India, Global