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

tables

Former Member
0 Likes
1,269

do tables contain physical data?

they say that structure doesnt data..only at runtime.

then what is the difference between table and structure?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,221

i have added some more points...check it....

reward points if useful

8 REPLIES 8
Read only

Former Member
0 Likes
1,221

table is like storing for data where as structure is onw which holds data during run time..

Structures are used to define the data at the interface of module pools and screens and to define the parameter types of function modules.

The central definition of structures that are used more than once makes it possible for them to be changed centrally. The active ABAP Dictionary then makes this change wherever required. ABAP programs or screen templates that use a structure are automatically adjusted when the structure is changed.

There are Flat, nested and deep structures. A flag structure only references elementary types. A nested structure references at least one further structure, but not a table type. A deep structure references at least one table type.

In a database table, you can only include flat structures as substructures.

A structure can have elements from different tables and structures. They do work similar to tables.

The basic difference between Structure and the Table is that the Structure does not exist at the underlying data base level. Structure exists as Definition in the Dictionary.

********************************

> Actually I know that a structure can not hold data

> whereas a table can.. but then how is it different

> from a view (which doesn't hold data either)?

A view is similar to a JOIN. It ties different tables together using common fields and can be used in a select statement.

> What is the need to have structures?

They are used in many ways. Function module table parameters must be defined by referencing a structure. It provides a common data definition that can be used in programs as well.

> Do they reside in the same place in the database layer as the tables?

They are defined in DD02L and DD03L like transparent tables, but the TABCLASS is INTTAB.

> Can we make a table quickly out of a structure if we

> realize that we need to put data into a table?

You wouldn't define a transparent table using a structure, but you might use one to define an internal table.

Message was edited by:

Ramesh Babu Chirumamilla

Read only

0 Likes
1,221

hi ramesh thanks for your answer but data dictionary objects dont contain data...is that true..? pls help me out with this...

Read only

Former Member
0 Likes
1,221

hi raja,

If A is a Table type,

and you say data: itab type A. then itab is an internal table.

If B is a Line type, and you say itab type B. Then itab is a structure .

If CXX is a Structure, and you say itab type CXX, then itab is a structure.

and itab type line of A = itab type CXX = itab like line of A.

regards

warun

Read only

Former Member
0 Likes
1,222

i have added some more points...check it....

reward points if useful

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,221

A structure is merely a blue print of the data, what are the types, etc. You can use structures to build the table definitions also. Structures are defined in the data dictionary to be used to include into table definintions, or to be used in your programs to defined an internal table, or even to describe screen fields in a dynpro. A table is a definition of an actuall db table. What you define in the ABAP dictionary is direct translated to the DB and the table is created there. Structures only contain data when you move data to them in your programs. For example, if a structure was used to describe screen fields on your dynpro, you have to move values to this structure, usually from a database record.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,221

Hi

I guess, you might have got confused by reading some statement in some book. Ok, here in SAP tables contain only schema in the Dictionary (means definition) when you create and activate a table - a table will be created in the database with same name and physical records will be stored in the Database.

Structure contains just definition; it can't hold any data.

But anyway... all these definition again stored in the database but in the form of raw information but not as data.

Regards

Surya.

Read only

Former Member
0 Likes
1,221

hi,

yeah u r right structures hold data only at runtime .

take example structure vbdkl and table likp.

likp holds the data content pertaining to the delivery orders present . this falls under category transparent tables

structure vbdkl contains hte data pertaining to delivery note at runtime .

these are very important when u r designing scripts or sf's .

say that we are not having this structure then we need to declare a same itab with all the values it will be combination of more than one table so mulitple selects and get the data pertaining to one delivery .

but if i make use of this structure then its very easy .

this is where the structures are important in fetching the data at runtime and also if at all i have to make use of some Fms where i need to pass a structure.

so lot of importance is given to these structures .

regards,

vijay.

Read only

Former Member
0 Likes
1,221

thank you all...but still another doubt....

so if structure,table,view are just definitions of data....(the way data has to be presented)

what are the main differnces between them?

pls help me out with this ..