Preface – This post is part of the ABAP Beginner series.
Table of Contents
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:
FIELDS | Value | Description |
Format | ||
Data Type | Choose from pre-defined values | It describes type of data e.g. INT for Integer and CHAR for Character |
No. of Characters | Maximum length of Data | 20 for CHAR means 20 Letters allowed |
Decimal Places | Max. allowed Decimal Values | Decimal Places mainly for Float Type Value e.g. 10000.08 |
Output Characteristics | ||
Output Length | Max. Output Length | It is mainly for Floating Values |
Conversion Routine | Two 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 |
Sign | Negative | Set if your data can be negative |
Lower Case | Lower Case | Toggles 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 Value | Description |
F | Female |
M | Male |
- 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