‎2008 Feb 12 6:14 AM
what is the difference between field and data element in table.
‎2008 Feb 12 6:20 AM
Data element specifies the length and description of the field (i.e technical attributes of a field)
1 data element can be attached to many fields of a table.
Example: Check table BKPF (transaction SE11/12)
BELNR is the technical name of the field.
BELNR_D is its data element which defines how much data the field can hold and the data should be of which type (char/numc/int etc). Also the description 'Accounting Document Number' is specified in the data element
‎2008 Feb 12 6:20 AM
Hi,
Data element is one which have the symatic representation of your field in which you call the domine.
Domine is one which will have the technical atributes of the field.
Field is just a name of the column in your table.
hope it will be clear for you.
reward Points if it is usefull
Cheers
Chandrra
‎2008 Feb 12 6:21 AM
Hi,
A field is a part of the database table, one of the components of the DB table structure.
However a data element is a reference for the DB field. It defines the technical attributes of the DB field i.e. length, type (char/int etc.).
A data element is hence an independent data dictionary object (created from SE11) and can exist by itself and be used in a number of database tables.
But a field can exist only under a database table and is unique to that database table.
Cheers,
Aditya
‎2008 Feb 12 6:21 AM
hi,
In the description of a database table, the table lines consist of single fields or columns. An elementary data type must be assigned to each column. The elementary types in the ABAP Dictionary are data elements. Like data objects in ABAP programs, database tables and views have data types as attributes. A line of a database table or view has the data type of a flat structure, which consists of individual data elements.
Data elements in the ABAP Dictionary describe individual fields. They are the smallest indivisible units of the complex types described below, and are used to specify the types of columns in the database. Data elements can be elementary types or reference types.
· Elementary Types
Elementary types are part of the dual-level domain concept for fields in the ABAP Dictionary. The elementary type has semantic attributes, such as texts, value tables, and documentation, and has a data type. There are two different ways to specify a data type:
¡ By directly assigning an ABAP Dictionary type.
You can assign a predefined ABAP Dictionary type and a number of characters to an elementary type. The ABAP Dictionary has considerably more predefined types than the ABAP programming language. The number of characters here is not the field length in bytes, but the number of valid characters excluding formatting characters. The data types are different because the predefined data types in the ABAP Dictionary have to be compatible with the external data types of the database tables supported by the SAP Web AS ABAP.
Reference Types
Reference types describe single fields that can contain references to global classes and interfaces from the ABAP class library.
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.
If you define a local data type in a program by referring to a data element as follows:
TYPES dtype TYPE data_element.
Hope this helps, Do reward.
‎2008 Feb 12 6:24 AM
Hello Radharaman,
Field in the table is used for only name purpose. Like MATNR for Material number, WERKS for Plant like that...
But Data Element is the one which will contains semantic attributes of the field like text of that element.
Domain will have techinical attrbutes like type and length.
Dataelement will have the domain. And one more thing is that, In data element without Domain you can define technical attributes for the fields.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
‎2008 Feb 12 6:27 AM
Hi,
Difference between field and data element is :
For one field say EMP_NAME u can use data element NAME1 and
if u want a field CUST_NAME the same data element can be used for the
multiple fields depending on the requirement.....
The relation is here NAME1 is data element already defined in DDIC for
which u have domain NAME with the attributes like
Type : Character
size : 31
Etc..
this way ve declare for all fields it can be buttom up or TOp down...
like field-> dataelement->domain -
top down or
bottom up---domain->data element-> field like this.
‎2008 Feb 12 6:28 AM
Fields is just a name of table column to identify each one seperate and this name we can use in our program to update,insert and display.
we can use the field name in many table but again you have to define the its technical attribute.
Date Element is technical name which dfine the type of the fields like it is character or numeric what is it's lenght.
We can use data element is many table it display the same attribute.
Data Domain : One more advanced concept given by SAP.
Domain contain the Value range which is not possible in data element.
one domain can be used in many data element but vise versa is not possible. you can't use domain in the table directly for defining the table fields. yaa it can be used with data element at many table
Hope it help you.
Regards
Swati
‎2008 Feb 12 6:45 AM
Hi
In data dictionary whenever we create table 's fields
it is defined in two ways
1. use built in type ( or predefined data type) in this we can directly assign field name and it s type char of 20 length.
2. second way and preferable way is use data element .
it is like centeral location where u define the characteristic of field. for eg name field can be used in no of tables and if in future any changes is required in characterstic of name u can directly make in data element in stead of all table who use this name field.
So now i hope data element concept is clear, generally we use name of field same as that of data element for better understanding and from clarity point.
Rewards point if helpful. plssssssss