Preface – This post is part of the Differences in ABAP for Interviews series.
Table of Contents
Introduction
Before jumping to the difference between a Domain and Data Element, let’s have a short introduction of the two. We need to use data in ABAP reports and it needs to be define in ABAP Dictionary and for that we need to define Domain, Data Element and, Tables.
Domain
A domain is a reusable object which describes the technical characteristics of an attribute. It defines a value range, which sets the permissible data values for the fields, data types, conversion routine, etc. A single domain can be used for any number of fields of identical structure.
With the help of domain, lowercase letters can be entered into the table fields.
Data Element
A domain cannot be directly used in a Report/Program or as a table field, it is assigned to a data element that adds some semantic information to the field i.e. Field Label, heading, etc.
Data Element is the smallest individual component of the complex types and is used to provide field labels, documentation, parameter ID, and search help for the table field.
At Domain level, Search Help fetches data either from defined fixed value or Value Table while Search help assigned to Data Element fetches data from Global Search help created via SE11.
Difference between Domain and Data Element
Now, let’s have a look at their difference:
Domain | Data Element |
It is used to describe the technical characteristics of an attribute. | It is used to describe the semantic definition of the table field. |
It describes the value range, data types, and conversion routine. | It provides field labels, documentation, parameter ID, and search help for the table field. |
Search help assigned to it fetches data from either fixed value or Value Help Table. | Search help assigned to it fetches data from Global Search help created via SE11. |
It is assigned to a data element. | It is assigned to a table field or structure. |
It cannot be referenced in ABAP programs. | It can be referenced in ABAP programs with TYPE. |
It is stored in Standard Table DD01L and Domain texts are stored in DD01T. | It is stored in standard Table DD04L and Data Element texts are stored in DD04T. |
0 Comments