ABAP - Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Data Types →  Data Elements →  Domains → 

Semantic Attributes of Domains

Domains can be given the following semantic attributes:

Each domain has a short description specified when it is created.
A domain can be given (optional) documentation.
The output attributes determine how fields defined with reference to a data element (that itself references the domain) are displayed on dynpros or Web Dynpros or when formatted with the statements WRITE or WRITE TO.
Value ranges can be defined for domains of the predefined types CHAR, NUMC, DEC, INT1, INT2, INT4, and INT8. For domains of the types CHAR and NUMC, this range specifies the valid input values in dynpro fields defined with reference to a data element of the domain in question. The value range is evaluated for all types for the input help of dynpro fields if no input help with a higher priority exists. The value range is ignored for the content of data objects in ABAP programs or of database table fields that reference a data element with a domain of this type. A value range can be defined using the following:
Fixed values and intervals can be combined here as required. The following can be specified as fixed values and interval boundaries:
A short text can be specified for each fixed value or interval, which is then displayed when used in an input help. The fixed values of a domain can be specified as special literals in a CDS view.
A fixed value append is an enhancement of the standard SAP system performed in customer systems that does not make any modifications and that is preserved by upgrades. A fixed value append adds further fixed values or intervals to the value range of a domain. A domain can have more than one fixed value append.
A value table can be a database table that is used as a default for the check table in cases where a table field of a database table that references a data element with this domain is included in a foreign key. Just specifying a value table does not trigger a check.

Example

The domain S_CLASS with the type CHAR describes the possible classes in a flight booking. The value range of the domain is defined by the fixed values "C" (Business Class), "F“ (First Class), and "Y“ (Economy Class). This means that only the values "C", "F", and "Y" can be entered for all dynpro fields that point to this domain.