ABAP Dictionary Domain

Data elements use domain or predefined type to define their technical attributes. Domain is not data type and hence cannot be used as type to data objects.

Create domains and use them in data elements
Standard domain PRZ32 of Data Type DEC

Domains define the technical properties centrally. Technical properties means data type and length. Domains are used by Data Elements to maintain their technical properties. Domains support standardization and several Data Elements can share the same domain.

The data type of domain is chosen from a built-in list of data types.-

  • The output length is maximum field length including commas or decimal points
  • Data type CHAR and NUMC can have maximum length 255 characters in tables. For longer character strings, use data type LCHR.
  • Data type DEC have maximum length of 31 characters.
  • In Routine field you can enter a conversion routine. We can use conversion routine to add leading zeros or alter display format.
  • When Sign is checked, the system reserves the first character for +/- sign. This is useful for data types such as DEC, FLTP, QUAN, or CURR.
  • If checkbox Case sensitive is checked, characters will be saved as Uppercase.
  • Under the Value Range tab, you can enter fixed values or value range or value table for input checks.

Steps to create Domain

  • Execute SE11
  • Select the Domain radio button, enter Domain name and choose Create.
  • Enter a meaningful description for the domain.
  • We will create a domain of type decimal with two places of decimal with sign. In the Data Type field enter DEC
  • In No. of Characters field enter 10 and in Decimal places field enter 2.
  • Check the Sign checkbox
  • Click Save to save the domain in a package. Check and Activate the domain.