10-07-2007 7:35 AM
hi we can create a field in a table without using dataelement and also wwe cancreate a dataelement without domain creation with the help of built in type , then what is the need of data element and domain.
10-07-2007 7:45 AM
Hi swathi,
For reusability.
Suppose you are having a field called Name in a table.Let us assume you created zname data element for it.Now if you come across some other table where you need to create field name you can just type in the name of dataelement.Also with dataelements You can maintain field labels , documentation etc,.
Similarly Domain is also used for reusability
10-08-2007 4:56 AM
Hi,
The Domain specifies the Technical attributes of the field such as the data type, length and the value range.
The data element is an elementary type defining the description/text for the field when displaying on the screen and Parameter ID.They are used to specify the types of columns in the database. They describe the individual fields.
In an ABAP program, you can use the TYPE addition to refer directly to a data element. The predefined Dictionary data types of the domain are then converted into the corresponding ABAP types.
The main advantage of these data elements and domains is the <b>Maintainability</b> ( using the same multiple times )
domain gives the techincal attributes of the data object.
( techincal attributes - data type , length , decimal places, uppercase or lowercase etc...)
data element gives the descriptional attributes of the data object.
( descriptional attributes - The business functionality of the object )
One data element can have only one domain.
One domain can be attached to no. of data elements.
Hope this helps you.
Regards,
Anjali
10-08-2007 8:23 AM
Hi,
It is not mandatory that you have to use Data Element and Domain while creating fields in a table. However, common domain is mandatory, if you wish to define foreign key relationship. Two data elements for those two fields are allowed but there has to be a common domain for both the fields.
Regards,
Nitin
10-08-2007 10:01 AM
Hi Swathi
Good Quetion
when your doing vertion upgradation then at that time you will face problems with the built in type declaration
in vertion upgradation the built in data type declaration won't be reflect in the next vertion
if you use dataelement and domain then they can easily reflect in next vertion
<b>Reward if usefull</b>
10-08-2007 3:10 PM
hi
good
In SE11 one option is available above the fields strip. Data element/ direct type.
thanks
mrutyun^
10-10-2007 12:39 PM
Data elements and Domains are necessary for <b>global declarations</b>. You can create a single data element and/or domain and use them in various fields of multiple database tables.
Thanks and Regards,
Anindita