Application Development 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: 

Data Dictionary

Former Member
0 Kudos

Hai Friends! What is the exact difference between structure and database table?

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

structure is simply a defintion of a row, what the fields are, their length, and type, a database table can use structures to define its fields, but does not have to, database table contains rows of data on the database layer, structures do not as they are just a definition.

Regards,

Rich Heilman

0 Kudos

ALso, structures are used a lot in screen programming, where the structure will be used in the screen fields, and the data from the database will be moved to the structrure at runtime, filling the fields of the structure. Structures can hold data at runtime. These can also be referred to as work areas of an internal table, or header line.

Regards

RIch Heilman

Former Member
0 Kudos

Hi Krishna,

The main and the major deifference is: Structure is a ABAP Dictionary object only.. It does not have anything attached to in the underlying database layer.. It exists only in the ABAP dictionary not in the database,..,

A database table have a defined structure in the database, and also a chunk of memory for it.

Thanks and Best Regards,

Vikas Bittera.

**Reward if useful**

Former Member
0 Kudos

Struture is an Definition .

Table is an Definition/Storage .

reward points if it is usefull ....

Girish

former_member402443
Contributor
0 Kudos

Hi,

<u>Structure</u>

Structures in code are similar to structures in the Dictionary in that they are simply field strings. However, they are not dictionary objects, but temporary objects in program memory.

Structures are used in connection with sequential datasets and subroutines as well as a “staging area” for internal tables.

Structures are defined with the DATA statement. The start and end of the structure are indicated by BEGIN OF <FSname> and END OF <FSname>.

A structure can also be defined using a combination of the TYPES and DATA statements.

The TYPES statement defines a data type which in this example includes the fields: flag, id, name1, and city. It does not allocate any memory for these fields.

The DATA statement defines a variable using the data type defined with the TYPES statement. At this point, memory is allocated and the structure is present in the program’s work area.

The main and the major deifference is: Structure is a ABAP Dictionary object only.. It does not have anything attached to in the underlying database layer.. It exists only in the ABAP dictionary not in the database.

Reward points if useful

regards

Manoj Kumar

<u>Database Table</u>

A database table have a defined structure in the database, and also a chunk of memory for it.