Domain in ABAP

by | Apr 11, 2018 | ABAP Beginner

Preface – This post is part of the ABAP Beginner series.

Domain in ABAP

To define Data in ABAP Dictionary we need Domain, Data Element and Tables. Domain in ABAP is the smallest unit that is defined in ABAP Dictionary. Thereafter, Data Element is created which further describes the domain to the End User. Thereafter Table is created which utilizes the Data Element.

All domains are saved in a Standard ABAP Table DD01L and their Text Descriptions are saved in Standard ABAP Table DD01T.

Definition:

Domain in ABAP is a reusable object that is assigned to a Data Element and it is used to define a value range (F4 Help) and provides technical attributes (Data Type, Number of character, etc).

 

Creation of Domains:

#Using ABAP Dictionary

 

Step 01: Open SE11.

Step 02: Click Domain Radio Button and give your domain name starting with Z or Y e.g. “ZBarry_Domain”.

Step 03: Click Create, Enter explanatory description for Domain in Text Field e.g. “Domain for Test”.

Step 04: Under Definition tab we have two options whose significance are described below:

 

FIELDSValueDescription
Format
Data TypeChoose from pre-defined valuesIt describes type of data e.g. INT for Integer and CHAR for Character
No. of CharactersMaximum length of Data20 for CHAR means 20 Letters allowed
Decimal PlacesMax. allowed Decimal ValuesDecimal Places mainly for Float Type Value e.g. 10000.08
Output Characteristics
Output LengthMax. Output LengthIt is mainly for Floating Values
Conversion RoutineTwo Function Modules:

CONVERSION_EXIT_xxxxx_INPUT

CONVERSION_EXIT_xxxxx_OUTPUT

Takes Input in one format and return as another e.g. Takes 02.01.2009 as Input and Returns 02 Jan 2009 as Output
SignNegativeSet if your data can be negative
Lower CaseLower CaseToggles Case

 

Step 05: Under Value Range you can fix your Input using following three ways:

  • Fixed Value Range: If you Want to Fix Input of Gender, you can create following
Fixed ValueDescription
FFemale
MMale

 

  • Interval Value Range: If you want to give Interval as Value Range
  • Value Help: If you want to give fix value from given table. This is the concept of Value Table and Check Table which we will discuss in upcoming chapters.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.