You are on page 1of 2

Standard table: The key access to a standard table uses a sequential search.

The time required f or an access is linearly dependent on the number of entries in the internal tabl e.

You should usually access a standard table with index operations.

Sorted table: The table is always stored internally sorted by its key. Key access to a sorted table can therefore use a binary search. If the key is not unique, the entry wit h the lowest index is accessed. The time required for an access is logarithmical ly dependent on the number of entries in the internal table.

Index accesses to sorted tables are also allowed. You should usually access a so rted table using its key.

Hash table: The table is internally managed with a hash procedure. All the entries must have a unique key. The time required for a key access is constant, that is it does n ot depend on the number of entries in the internal table.

You cannot access a hash table with an index. Accesses must use generic key oper ations (SORT, LOOP, etc.). Hashed tables 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 t able 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.

TYPES VECTOR TYPE HASHED TABLE OF I WITH UNIQUE KEY TABLE LINE.

TYPES: BEGIN OF LINE, COLUMN1 TYPE I,

COLUMN2 TYPE I, COLUMN3 TYPE I, END OF LINE.

DATA ITAB TYPE HASHED TABLE OF SPFLI WITH UNIQUE KEY CARRID CONNID.

You might also like