TYPES - key

Syntax

... [UNIQUE | NON-UNIQUE] { {KEY comp1 comp2 ...}
                          | {DEFAULT KEY} } ... .

Effect

Definition of a table key in an internal table.

You use UNIQUE and NON-UNIQUE to specify whether the table key is unique or not. For a table key specified with UNIQUE, a row with a certain key field content can only occur once in an internal table of this type. You can only use NON-UNIQUE for standard tables, you have to use UNIQUE for hashed tables, and both for sorted tables.

The key fields can be alternatively defined as follows:

The table key does not have to be specified in the statement TYPES and does not have to be unique. If a table key is not or only partially specified, then the resulting table type is generic and can only be used for typing formal parameters or field symbols. The individual table types are differentiated as follows: