Skip to content

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:

  • Short text
Each domain has a short description specified when it is created.
  • Documentation
A domain can be given (optional) documentation.
  • Output attributes
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.
  • Output length

    The (optional) output length overrides the implicit output length as assigned to the predefined elementary data types. The potential output length is determined by the data type and is checked by ABAP Dictionary. If a format is assigned to the predefined data type in question, the output length should be long enough for all formatting characters.
  • Output style

    A domain with the type of a decimal floating point number must be assigned an output style.
  • Conversion routine

    If a domain is assigned to a conversion routine, the associated function module ..._INPUT (for each input in a dynpro field defined with reference to a data element that itself references the domain) is called. Similarly, the associated function module ..._OUTPUT (for each output using a dynpro field defined with reference to a data element that itself references the domain) is also called. The function module ..._OUTPUT is executed in the same way when a data object is formatted using WRITE or WRITE TO when the data object is declared with reference to a data element of this type.
  • Sign

    If a data type of a dynpro field defined in ABAP Dictionary is numeric, the "Sign" attribute must be set so that negative numbers can be displayed on the screen. This attribute can only be specified using a domain.
  • Lowercase letters

    If a data type of a dynpro field defined in ABAP Dictionary is character-like, the "Lowercase Letters" attribute can be set so that these letters are not transformed to uppercase. This attribute can only be specified using a domain.
  • Time format

    For the data type TIMS, a 24-hour or 12-hour format can be set for displaying dynpro fields in accordance with the ABAP time formats.
  • Value range
Value ranges can be defined for domains of the predefined types CHAR, NUMC, DEC, INT1, INT2, and INT4. 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 a 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 individual fixed values, intervals, or any combination of the two. A short text can be specified for each individual 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.
  • Fixed value append
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 respected 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.
  • Value table
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.

Other versions: 7.31 | 7.40 | 7.54


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.