Creating Domains
Before creating a new domain, check whether a domain that defines the same value range already exists. In this case you should use the existing domain if possible.
Procedure
Select object type Domains in the initial screen of the ABAP Dictionary, enter the name of the domain and choose Create.
The maintenance screen for domains appears.
Enter an explanatory short text in the field Short text.
You can for example find the domain at a later time using this short text.
On the Data type tab page, choose the
data type, number of places (valid positions without editing characters such as comma or period) and number of decimal places (only needed for data types DEC, FLTP, QUAN and CURR).
Note that some data types have a fixed length. For example, the data type CLNT (client) always has 3 places. If you enter an invalid number of places for such a data type, the system corrects this automatically after issuing a warning.
If only certain input values are valid for the domain, you can enter them in the Value range tab page as
fixed values.
You can also define a
value table as proposed value for foreign key checks on this tab page.Save the domain.
You are asked to assign the domain a development class.
Choose .
Result
The domain is activated. You can find information about the activation flow in the activation log, which you can call with Utilities
®
Activation log. If errors occurred when the domain was activated, the activation log is automatically displayed.
Other Options
Create documentation: You can create technical documentation about the domain with Goto
®
Documentation.
Restrict output length: The value for the output length (maximum field length including editing characters such as comma and period) is automatically computed from the definitions for the data type, number of places and number of decimal places. If fields that refer to this domain should be output on the screen or in lists with only a certain length, you can reduce this size.
Distinguish uppercase/lowercase: If you want to distinguish uppercase and lowercase for the fields referring to this domain, you have to select Lowercase. Otherwise, all the entered letters are converted to uppercase in the database. Entries can only made for this field in data types CHAR and LCHR.
Assign conversion routine: If field values have to be converted during input or output, you can define a
conversion routine.
Output with sign: If fields that refer to this domain can contain negative values, the Sign flag must be set. When the field contents are output to the screen, the first output location is reserved for a sign. If the flag is not set but the field contains negative values, problems could occur when outputting to the screen. Entries can only made in this field for data types DEC, FLTP, QUAN and CURR.