‎2007 Apr 27 7:23 AM
Hi there,
Please explain me the diffrence between a table & a structure from the database perspective..........
I am functional consultant ........so please explain me in lucid without much jargon.......
Thanks & With Regards
Kaushik
‎2007 Apr 27 7:25 AM
Database table is where you store the records/entries. It refers to the physical storage of data within the database system.
Structure does not refer to the physical storage. It just refers the type, which can be used by ABAP in turn.
Regards
Wenceslaus
‎2007 Apr 27 7:24 AM
Structure -
> It just defines what are the fields it contains but do not hold any data
Table -
> Along with the fields , table stores the data
‎2007 Apr 27 7:25 AM
Database table is where you store the records/entries. It refers to the physical storage of data within the database system.
Structure does not refer to the physical storage. It just refers the type, which can be used by ABAP in turn.
Regards
Wenceslaus
‎2007 Apr 27 7:45 AM
Hi Wenceslaus G ,
Can you please elucidate me that how the structure will be used in ABAP.......I mean not the syntax but the logic........as per the few ans that I have got for my query it is that they told that structure can be used to display the data.......
Thanks
Kaushik
‎2007 Apr 27 7:51 AM
Hi Kaushik,
Structures are just like types/templates. These structures are defined in SE11.
They do not hold data.
Eg: I define a structure for holding material and material descriptions:
Assume the structure name being ZMAKT
And fields
- Material MATNR
- Material Description MAKTX
Then this structure can be used in ABAP programs. Like you can define your variables to store data where the variables will have the same type as that of the structure.
DATA var TYPE ZMAKT. "structure name
var-matnr = '100000'. "Material number
var-maktx = 'Screw'. "Material description
Regards
Wenceslaus
‎2007 Apr 27 7:26 AM
Hi ,
Structure: it doesnt hold any data
its just a table definition.
it will not be present in the underlying database.
tables: it holds data.
it will be created in the underlying databse.
regards,
Navneeth.K
‎2007 Apr 27 7:29 AM
hi,
structure contains list of fields ,but has no data.
table contains fields as well as contents.
thanks
shyam
‎2007 Apr 27 7:33 AM
‎2007 Apr 27 7:34 AM
Table is used to store data
Structure is used to display data
for example if u create a program there u can directly assign tables and y get the required information
but where as in case of structure u have to assign an internal table and from internal table u have to display the values in the output
Rewards if helpfull
Regards
pavan
‎2007 Apr 27 7:44 AM
hi,
tables : permanantly store data in DB .
structures: contain data only when the program related to that structure is run.
ravi
‎2007 Apr 27 7:49 AM
hi kaushik,
in structure u cant store data, using structure we can create internal table, but structure only contains the definition.
But in tables(transparent) u can actually store the data, u can change it also .
I think u r doubt is cleared.
Reward points if helpful.
Regards
Nilesh
‎2007 Apr 27 7:51 AM
Hi Kaushik,
Structure will be used to define the type of internal tables that will be using the same structure. It increases the reusability. A Single defined structure in database can be used by multiple ABAP programs.
Ex-
TYPES: begin of t_tab.
Include Structure z_vendor.
TYPES: end of t_tab.
Data: i_tab type table of t_tab,
wa_tab like line of i_tab.
now i_tab will have all the fields which structure z_vendor will be having and it can be used for furthur processing in the program.
hope it solves ur query. reward if u find it useful.
Kartavya Kaushik
‎2007 Apr 27 7:56 AM
hi,
structure contains list of fields or Single fields ,but It contains no data.
structure has two type one is Gobal other Local
table contains fields as well as contents.
By
Jay