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
In order to get the field labels use the menu in the ABAP editor GOTO->Text Elements->Selection Texts.
All the input fields will be displayed in a table.
Just check the Dictionary Ref checkbox and press enter.
The Text ( Field Label ) will be automatically read from the Data Element. Now save, activate, go back and run the program again.
Now place the cursor on the input field and press F1 key to get the documentation from the data element.
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.
really nice tutorial…..
very nice…….
thanks a lot……
very nice
And you could refer how to debug in abap report
thanks a lot…for such a great guide
good
be more specific and explain in lay man language then it could be very nice tutorial and elaborate on DATA ELEMENT.
Very Good Answer
can anyone please explain advantage and disadvantage of data element and domain?
awesome
Awesome tutorial
Good one
Great Post. The information provided is of great use as I got to learn new things. Keep Blogging.
SAP ABAP