Domains in SAP [Part 1]


Domain: 

A domain specifies the technical characteristics and the allowed values of a field. Domains are linked to fields via data elements. 


In other words, fields are assigned to data elements, and data elements are assigned to domains. You cannot directly assign fields to domains.


One can create domain by SE11. Go to SE11. Select domain and type a domain name and click create.
Give a domain description.
Domain creation
Domain creation


Data types in domain:
The following data types are available :
Data Types in Domain
Data Types in Domain
One should select any one of those. Some data types offer the facility to control the length by altering Number of characters.

Some data classes have a fixed length. For example, the data class CLNT (client) always has three places. If you enter an invalid length for such a data class, the system will give you a warning and then correct the error automatically.


Decimal Places is applicable for float type data types


In output characteristics, we have:

  • Output length
  • Conversion Routine: Conversion routine is a function created to convert the external input to sap internal format. Example : external material number can be up-to 40 chars : SAP when storing these material numbers will convert this external material number into a 18 character number. Now if we need the external material number, we just need to use a function module in our report to get the external number from SAP internal material number.

Example is MATNR:
MATNR domain
MATNR domain
If you double click the MATN1 , then it will ask you which FM you want , whether its input or output type. 

Conversion Routines
Conversion Routines
Input means = > External material number to internal SAP format
Output => Internal SAP material format to external material number

To be continued....