What are Data Elements and Domains?

While creating a table in data dictionary each table field is assigned to a data element. Each data element is in turn assigned to a domain.

  • Domain describes the technical attributes such as data type and length of a table field.
  • Data Element gives the field labels and documentation for the table field.

Consider the following code. PARAMETERS is the keyword to create input fields.

PARAMETERS: p_matnr TYPE matnr.

Output

What-is-dataelement-1

In order to get the field labels use the menu in the ABAP editor GOTO->Text Elements->Selection Texts.

What-is-dataelement-2

All the input fields will be displayed in a table.

What-is-dataelement-3

Just check the Dictionary Ref checkbox and press enter.

What-is-dataelement-4

The Text ( Field Label ) will be automatically read from the Data Element. Now save, activate, go back and run the program again.

What-is-dataelement-5

Now place the cursor on the input field and press F1 key to get the documentation from the data element.

What-is-dataelement-6

Actually this field label and documentation are maintained in the Data Element MATNR.

So if we want to create a table with two fields as “FirstName” and “SecondName”, then only one domain is sufficient with data type as “CHAR” and length say 20. But we need two different data elements in order to display different field labels and documentation for both the fields.


12 Comments

Leave a Reply

Your email address will not be published.


*