SAP DDIC DOMAINS SEMA



Get Example source ABAP code based on a different SAP table
  



ABAP_DDIC - Semantic Properties of Domains
Domains can have the following semantic properties:
Short text A descriptive short text must be specified when a domain is created.
Documentation Documentation can optionally be assigned. This documentation can be read as required.
Output properties The output properties affect how fields defined with reference to a data element that references the domain are displayed
BEGIN_SECTION VERSION 5 OUT on dynpros or Web Dynpros or when formatted with the statements WRITE or WRITE TO
END_SECTION VERSION 5 OUT .
Output length
The optional output length overrides the implicit output length as assigned to the built-in elementary data types. The possible output length is determined by the data type and is checked by the ABAP Dictionary tools. If a format is assigned to the built-in data type used, 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.
BEGIN_SECTION VERSION 5 OUT
Conversion routine
If a domain is assigned to a conversion routine, the associated function module ..._INPUT for each input in a dynpro field and ..._OUTPUT for each output using a dynpro field that is defined with reference to a data element that itself references the domain is called. The function module ..._OUTPUT is executed when a data object is formatted using WRITE or WRITE TO when the data object in question is declared with reference to a data element that itself references the domain.
Sign
If a dynpro field has a numeric DDIC data type, the Sign property must be set so that negative numbers can be displayed on the screen. This property can only be specified using a domain.
Lowercase letters
If a dynpro field has a character-like DDIC data type, the Lowercase Letters property can be set so that these letters are not transformed to uppercase. This property can only be specified using a domain.
END_SECTION VERSION 5 OUT
Time format
For the data type TIMS, a 24-hour or 12-hour format can be set for displaying
BEGIN_SECTION VERSION 5 OUT dynpro
END_SECTION VERSION 5 OUT fields in accordance with the ABAP time formats .
Value range Value ranges for fields on user interfaces can be defined for domains of the built-in types CHAR, NUMC , DEC, INT1, INT2, INT4, and INT8.
BEGIN_SECTION VERSION 5 OUT 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 such a domain. The value range is evaluated for all types for the input help of dynpro fields if no input help with a higher priority exists.
END_SECTION VERSION 5 OUT The value range is ignored for the content of data objects in ABAP programs or of DDIC 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
Intervals Fixed values and intervals can be combined in any way. The following can be specified as fixed values and interval limits:
Alphanumeric characters including blanks and special characters for the type CHAR. The length is restricted to 10.
Positive integers (including 0) for the types NUMC, INT1 , INT2, INT4, INT8, and DEC within the value range defined by the technical properties. 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 kinds of literals in a ABAP_CDS_V1_VIEW . The fixed values provided by SAP can be extended by customers or partners using fixed value appends.
Value table A value table can be a DDIC database table that is used as a default for the check table in cases where a table field of a DDIC database table that references a data element with this domain is included in a foreign key . Specifying a value table alone does not trigger a check.

ABAP_EXAMPLE_VX5
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 refer to this domain.
ABAP_EXAMPLE_END