How to create a Domain in SAP ABAP
Domains
A domain defines a value range. A domain is assigned to a data element. All table fields or structure components that use this data element then have the value range defined by the domain. The relationship between the field or component and the domain is thus defined by the data element of the field or component.
Fields or components that refer to the same domain (with the assigned data elements) are also changed when the domain is changed. This ensures that the value ranges of these fields or components are consistent. Fields or components that are technically the same can thus be combined with a reference to the same domain.
We can Create Domains
Change Domains
Delete Domains
A domain defines a value range. A domain is assigned to a data element. All table fields or structure components that use this data element then have the value range defined by the domain. The relationship between the field or component and the domain is thus defined by the data element of the field or component.
Fields or components that refer to the same domain (with the assigned data elements) are also changed when the domain is changed. This ensures that the value ranges of these fields or components are consistent. Fields or components that are technically the same can thus be combined with a reference to the same domain.
How to create a Domain in SAP ABAP |
We can Create Domains
Change Domains
Delete Domains
Cresting a Domain in SAP ABAP
Go to the SE11 and select the Radio Button Domain and give the Domain name.
Write the domain description and choose the data type as CHAR and click on right symbol
Define the number of characters and decimal places and output length.
The value range of a domain can be restricted by defining fixed values. If all the fields or components that refer to the domain should be checked against a certain table, this table can be defined as the value table of the domain.
Output attributes can also be defined for all the fields or components that refer to the domain (see Creating Domains). A conversion routine can be assigned to a domain. This conversion routine converts values from display format to internal format for the fields or components that refer to this domain.
You can see the properties of domain in the below screen.
Finally,SAVE and Activate the Domain and we have created domain successfully