Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Structure vs Table in database........

Former Member
0 Likes
2,398

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,868

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

12 REPLIES 12
Read only

Former Member
0 Likes
1,868

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

Read only

Former Member
0 Likes
1,869

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

Read only

0 Likes
1,868

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

Read only

0 Likes
1,868

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

Read only

Former Member
0 Likes
1,868

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

Read only

Former Member
0 Likes
1,868

hi,

structure contains list of fields ,but has no data.

table contains fields as well as contents.

thanks

shyam

Read only

Former Member
0 Likes
1,868

Hi,

Regards

Bala

Read only

Former Member
0 Likes
1,868

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

Read only

Former Member
0 Likes
1,868

hi,

tables : permanantly store data in DB .

structures: contain data only when the program related to that structure is run.

ravi

Read only

Former Member
0 Likes
1,868

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

Read only

Former Member
0 Likes
1,868

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

Read only

Former Member
0 Likes
1,868

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