Summary -

In this topic, we described about the below sections -

What is Domain?

Specifies the technical characteristics of a table field. Domain assigned to a data element and defines a value range.

Any value of the table field that linked to a data element range also defines by a domain. Fields or components that assigned to a same domain gets changed if domain changed.

Domain ensures that the value ranges are data consistent. The domain value range is defined by specifying a data type and length. The domain value range can be restricted by defining fixed values.

Create Domain -

Before creating a new domain, check if any existing domain have the same required specifications. If exists, then we must use the existing domain. If not exists, create a new domain using the below steps -

Step-1: Go to SE11 transaction.

Create Domain Process

It opens "ABAP Dictionary: Initial Screen".

Create Domain Process

Step-2: Select the Domain radio button and enter the Domain name (For this example, it is Z_CUST_GENDER) and click on "Create" button. Domains under the customer namespaces always starts with 'Z' or 'Y'.

Create Domain Process

It opens "Dictionary: Change Domain Screen".

Create Domain Process

Step-3: Enter the Short Description, Data Type and No. characters. Short description, No. characters can be entered manually.

Create Domain Process

To get the list of Data Types, place the cursor in data type field and press F4. It opens the Data Type in ABAP Dictionary popup.

Create Domain Process

Double click on the desired data type to select and enter No. characters. For this example, the No. characters is 1.

Step-4: Open the tab "Value Range" if required to enter the fixed values or the lower/higher limits if the domain is a range. For this domain, we are entering fixed values and the description.

Create Domain Process

Step-5: Once range entered, open definition tab and press (Ctrl + S) to save the domain. It asks for the package. Enter existing package if you have any or create new package.

Create Domain Process

Once the package information entered, click on "Local Object" (non transportable object) to save the domain.

Step-6: Once the domain saved successfully, the "Z_CUST_GENDER saved" message displayed on status bar as shown below.

Create Domain Process

Step-7: Once the domain is saved successfully, click on Activate button or Ctrl +F3 to activate or create the domain.

Note! At this point it displays all inactive domains list if any other inactive domain exists. Select the appropriate domain that needs to activate.
Create Domain Process

If the domain activated successfully, the "Object activated" message displayed on status bar like below.

Create Domain Process

Domain now created and activated. If any error messages or warnings occurred during the activation of the domain, the activation log is displayed automatically. The same activation log can navigate through menu option Utilities(M) → Activation log.

Create Domain Process

Change Domain -

Domain needs to be modified if any information in the domain updated wrongly. Change Domain option is used to change the domain properties. Follow the below steps for change domain.

Step-1: Go to SE11 transaction.

Change Domain Process

It opens "ABAP Dictionary: Initial Screen" with a domain information in change mode.

Change Domain Process

Step-2: Enter the "Domain Name" and click on the "Change" button.

Change Domain Process

Step-3: Click on Save button once the required information modified.

Change Domain Process

Step-4: click on Activate button or Ctrl +F3 to activate the new changes of the domain.

Change Domain Process

Delete Domain -

If a domain is wrongly created and to delete the domain existing domain, follow the below steps to delete domain -

Step-1: Go to SE11 transaction.

Delete Domain Process

It opens "ABAP Dictionary: Initial Screen".

Delete Domain Process

Step-2: Enter the "Domain Name" and click on the "Delete" icon.

Delete Domain Process

It displays a popup for confirmation, click on "Yes" to delete the domain.

Delete Domain Process

Once the domain successfully deleted, the below message displays on status bar.

Delete Domain Process