Domains 

Different fields with identical technical attributes are combined in a domain. A domain defines a value range that describes the valid data values for all the fields that refer to this domain.

Fields that refer to the same domain (with the assigned data elements) are also changed when the domain is changed. This ensures that the fields are consistent.

The value range of a domain is defined by specifying a data type and length. For example, a personnel number is defined by the data format NUMC and by specifying the number of places for this personnel number.

Fixed values

The value range of a domain can be further restricted by defining fixed values.

Domain S_CLASS (data type CHAR, length 1) in the flight model describes the possible classes for a flight booking. The value range of domain S_CLASS is defined by the fixed values C (business class), F (first class) and Y (economy class). As a result, only the values C, F and Y may be entered in a screen for a field referring to this domain.

If fixed values are defined for a domain, these are used in the input check in screen templates. If no other means of help is defined for a field ( search help, foreign key), the fixed values are also offered in the input (F4) help.

Value Table

In some cases, it is already apparent when you define a domain that all the fields referring to this domain will need to be checked against a certain table. This information can be stored in the domain by entering a value table. The system proposes the value table as check table when you attempt to define a foreign key for this field. This suggestion can also be overridden. A check is not implemented by simply entering a value table! The check against the value table only takes effect when a foreign key has been defined.

Domain S_CARR_ID (data type CHAR, length 3) in the flight model describes the three-place code of the airlines. All the airlines are listed together with their codes in table SCARR. It is generally advisable to check fields referring to domain S_CARR_ID against table SCARR. SCARR is therefore entered as value table for domain S_CARR_ID. If you want to define a foreign key for a field referring to S_CARR_ID, SCARR is proposed as the check table.

A table can only be the value table of at most one domain. All the fields referring to the value range of this table must therefore use the same domain.

See also:

Creating Domains

Editing Domains

Deleting Domains

Input and Output Conversions