Learn SAP Free
Back to Dashboard
Data Dictionary

What is a Domain in SAP ABAP? (SE11)

Daksh | May 8, 2026 | 14 min read

Domain in SAP ABAP

When I built my first custom SAP table back in 2022, I remember getting confused about the difference between a Data Element and a Domain.

I opened transaction SE11, entered my table name, added a field ZSTUDENT_ID, and tried to save. SAP popped up an error: “Field ZSTUDENT_ID has no Data Element.” So I created a Data Element. Then SAP asked for a Domain.

I asked my senior developer: “Why do we need both? Why can’t I just say this field is CHAR 10 directly on the table?”

He handed me a cup of coffee and explained: “Because SAP is an enterprise system built for thousands of developers working across hundreds of tables. If 50 different developers create 50 different tables that store Student IDs, and next year the management decides to change Student IDs from 10 digits to 12 digits, do you want to manually edit 50 tables, or edit 1 Domain in 30 seconds?”

That explanation made it click instantly.

A Domain in the ABAP Dictionary (transaction SE11) represents the physical, technical definition of data. It defines the raw data type, field length, decimal places, allowed value ranges, and conversion rules at the lowest level.

This guide explains everything you need to know about Domains in SAP ABAP: technical attributes, value lists, conversion exits, value tables, and how to create custom domains in SE11.


Domain vs Data Element — The Core Relationship

To master the ABAP Data Dictionary, you must understand the distinction between Domains and Data Elements.

  • Domain (Technical Layer): Describes how the data is stored in the database. It defines the data type (CHAR, NUMC, DEC, DATS), character length, decimal positions, and allowed input values.
  • Data Element (Semantic Layer): Describes what the data means to the business user. It defines the field label (the text shown on screens like “Student Identification Number”), header text, and tooltips.
┌─────────────────────────────────────────────────────────┐
│              ABAP Data Dictionary Layer                 │
├─────────────────────────────────────────────────────────┤
│  Data Element (Semantic / Business Meaning)             │
│  e.g., ZDE_STUDENT_ID ("Student Identification No.")    │
│    │                                                    │
│    ▼ References                                         │
│  Domain (Technical Definition / Physical Storage)       │
│  e.g., ZDO_STUDENT_ID (CHAR, Length 10, Uppercase)      │
└─────────────────────────────────────────────────────────┘

Multiple Data Elements can point to a single Domain.

For example, the domain CHAR10 (character of length 10) is used by thousands of standard SAP Data Elements including Customer Number, Vendor Number, Document Number, and User ID.


Key Technical Attributes Defined in a Domain

When you create or inspect a domain in SE11, you configure several core properties across two tabs: Definition and Value Range.

                          ┌─────────────────────────────┐
                          │    Domain Attributes (SE11) │
                          └──────────────┬──────────────┘

             ┌───────────────────────────┴───────────────────────────┐
             ▼                                                       ▼
  ┌───────────────────────┐                               ┌───────────────────────┐
  │    Definition Tab     │                               │   Value Range Tab     │
  ├───────────────────────┤                               ├───────────────────────┤
  │ • Data Type           │                               │ • Fixed Values        │
  │ • Length & Decimals   │                               │ • Value Intervals     │
  │ • Output Length       │                               │ • Value Table         │
  │ • Conversion Exit     │                               └───────────────────────┘
  │ • Lowercase Flag      │
  └───────────────────────┘

1. Data Type

SAP ABAP provides built-in dictionary data types. Common options include:

Dictionary TypeABAP TypeDescriptionExample
CHARCCharacter string (text, codes)'ABC123'
NUMCNNumerical character (digits only, leading zeros)'00012345'
INT4I4-byte integer (-2,147,483,648 to +2,147,483,647)4500
DECPPacked number (currency, quantities with decimals)1499.50
CURRPCurrency field (requires reference CUKY field)1050.75
QUANPQuantity field (requires reference UNIT field)50.000
DATSDDate format (YYYYMMDD)'20260803'
TIMSTTime format (HHMMSS)'143000'

2. Field Length and Output Length

  • Field Length: Specifies how many bytes or characters are stored physically in the database table column.
  • Output Length: Specifies how many characters are displayed on screen masks or report outputs. For example, a DATS field has a stored field length of 8 (20260803), but an output length of 10 (2026-08-03 or 03.08.2026 depending on user settings).

3. Lowercase Flag

By default, SAP automatically converts all text entered in a CHAR field to UPPERCASE when saving to the database.

If your domain stores case-sensitive text (like email addresses, passwords, URLs, or file paths), you must check the Lowercase checkbox in the Domain definition.


4. Conversion Exits (Conversion Routines)

A Conversion Exit is a pair of function modules that automatically format data when moving between screen display and database storage:

  • CONVERSION_EXIT_<NAME>_INPUT: Converts screen input into database format (e.g., converts user input 100 into 0000000100).
  • CONVERSION_EXIT_<NAME>_OUTPUT: Converts database format into human-readable screen output (e.g., strips leading zeros from 0000000100 so the user sees 100).

Example: Standard domain MATNR (Material Number) uses conversion exit MATN1. When a user types 100, the INPUT function module pads it with 15 leading zeros (000000000000000100) for database storage.


Restricting Input with Value Ranges

Domains are the primary mechanism for enforcing data validation at the Dictionary level. You restrict inputs on the Value Range tab using three methods:


Method A: Fixed Values (List of Allowed Values)

Use fixed values when a field has a small, static set of permissible options (like gender, marital status, or document status).

Fixed Value │ Short Text
────────────┼───────────────────────────────
S           │ Single
M           │ Married
D           │ Divorced
W           │ Widowed

When a field referencing this domain is placed on an SAP GUI screen or selection screen, SAP automatically provides a dropdown / F4 list containing these options and blocks any unlisted values.


Method B: Intervals (Value Ranges)

Use intervals when a numeric or character value must fall within a continuous range.

Lower Limit │ Upper Limit │ Short Text
────────────┼─────────────┼───────────────────────────────
1           │ 100         │ Valid Discount Percentage

If a user enters 150, SAP issues a standard error message: "Value 150 is outside the allowed range 1-100".


Method C: Value Table (Foreign Key Check Preparation)

A Value Table specifies the master data table that contains all valid entries for a domain.

For example, domain KUNNR (Customer Number) specifies KNA1 as its Value Table.

Important distinction: Specifying a Value Table on a domain does NOT automatically enforce validation by itself. The Value Table serves as a proposal when you create foreign key relationships on database tables in SE11.


Naming Standards for Custom Domains

To prevent naming collisions with SAP standard objects during system upgrades, all custom domains created by developers must start with Z or Y.

Recommended naming convention:

ZDO_<MODULE>_<NAME>   or   Z<NAME>

Examples:
ZDO_MM_VENDOR_RATING  (Custom domain for vendor rating score)
ZDO_SD_ORDER_STATUS   (Custom domain for sales order status code)
ZEMPID                (Custom domain for employee ID format)

Step-by-Step: Creating a Custom Domain in SE11

Let’s walk through creating a custom domain ZDO_MARITAL_STATUS to store marital status codes with fixed values.


Step 1: Open Transaction SE11

  1. Enter /nSE11 in the SAP GUI command field.
  2. Select the Domain radio button.
  3. Enter your custom domain name: ZDO_MARITAL_STATUS.
  4. Click Create.

Step 2: Configure Definition Properties

  1. In the Short text field, enter: "Marital Status Code".
  2. Under the Definition tab:
    • Data Type: Select CHAR (Character string).
    • No. Characters: Enter 1.
    • Output Length: 1 (automatically filled).
    • Lowercase: Leave unchecked (forces uppercase ‘S’, ‘M’, ‘D’, ‘W’).

Step 3: Configure Fixed Values

  1. Switch to the Value Range tab.
  2. In the Fix.Val. table, enter the allowed values:
Fix.Val. │ Short text
─────────┼───────────
S        │ Single
M        │ Married
D        │ Divorced
W        │ Widowed

Step 4: Save and Activate

  1. Press Ctrl + S to save. Assign your domain to a local package ($TMP) or a transport request.
  2. Press Ctrl + F3 to activate.

Your domain is now active and ready to be referenced by custom Data Elements.


Summary of Domain Advantages

  1. Reusability: Write once, reference across dozens of database tables.
  2. Centralized Maintenance: Changing a domain’s length automatically updates every referencing data element and table column.
  3. Data Integrity: Enforces fixed values and value ranges at the lowest database input layer.
  4. Automatic Formatting: Conversion exits automatically handle leading zero padding and date/currency formatting.

Quick Checkpoint — Test your understanding

Question 1: What is the primary difference between a Domain and a Data Element in transaction SE11?

Answer: A Domain defines the technical storage attributes (data type, length, value range). A Data Element defines the business semantic meaning (labels, header text, tooltips).

Question 2: If you enter KNA1 as the Value Table on a domain, does it automatically block invalid customer numbers on database screens?

Answer: No. A Value Table only proposes the default table for foreign key relationships when building database tables in SE11. You must explicitly create the foreign key on the table field to enforce validation.

Question 3: What checkbox must you enable on a CHAR domain if you want to store lower-case characters without SAP automatically converting them to uppercase?

Answer: The Lowercase checkbox on the Definition tab.


Common mistakes to avoid

Mistake 1: Creating a new domain for every single field. If an existing standard domain (like CHAR10, NUMC8, DATS) already matches your technical requirements, reuse it. Don’t create ZDO_CHAR10_1, ZDO_CHAR10_2, ZDO_CHAR10_3. Create custom domains only when you need custom fixed values or specific technical constraints.

Mistake 2: Changing domain lengths in live production systems without table conversion. If you expand a domain length on a table with 10 million rows in production, SAP must perform a database table conversion (SE14). Doing this during business hours can lock tables and cause severe downtime. Always plan table conversions during scheduled maintenance windows.

Mistake 3: Forgetting fixed values are case-sensitive if Lowercase is checked. If Lowercase is enabled and fixed values are defined as 's', 'm', entering 'S' on screen will fail validation.


Related reads on this site:

Daksh Dedha - SAP Technical Consultant

Written by Daksh Dedha

SAP Technical Consultant

Daksh is an SAP Technical Consultant specializing in ABAP programming, SAP S/4HANA migrations, Fiori development, and BTP cloud architecture. He authors free, hands-on tutorials to make enterprise SAP education accessible to all developers.

Test Your Knowledge

SAP Challenge Question 1 of 10

Loading question...

Found this tutorial useful? Share it with your SAP development team.