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

question on structure

Former Member
0 Likes
1,449

does structure contains data?

6 REPLIES 6
Read only

Former Member
0 Likes
961

Structure will never contain data, its only the tables that contain the data.

Structures are generally used to temporarily stored data in your program or can be screen fields.

Regards,

Ravi

Note - Please mark the helpful answers and close the thread if the question is answered

Read only

Former Member
0 Likes
961

structure doen not contain any data

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/content.htm

The instances of structured types are known as structures, and are used in ABAP programs to group work areas that logically belong together. Since the individual elements within a structure can be of any type, and can also themselves be structures or internal tables, the possible uses of structures are very wide-ranging. For example, you can use a structure with elementary data types to display lines from a database table within a program. You can also use structures containing aggregated elements to include all of the attributes of a screen or control in a single data object.

The following terms are important when we talk about structures:

· Nested and non-nested structures

· Flat and deep structures

Nestedstructures are structures that in turn contain one or more other structures as components.

Flatstructures contain only elementary data types of fixed length (no internal tables, reference types, or strings). The term flat structure can apply regardless of whether the structure is nested or not. Nested structures are flat so long as none of the specified types is contained in any nesting level.

Any structure that contains at least one internal table, reference type, or string as a component (regardless of nesting) is known accordingly as a deep structure.

Only in the case of flat structures is the data content of the structure actually within the memory of the structure itself, while deep structures contain pointers to the data at the position of the deepest components. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures.

mahya

Read only

anversha_s
Active Contributor
0 Likes
961

Hi Ramesh,

The structure that we create in program are workareas where we can store the data from internal tables. They are similar to headerline of the internalt table. We declare structure using data statement.

data : begin of itab,
 ebeln like ekpo-ebeln,
 ebelp like ekpo-ebelp,
end of itab.

Or we can declare a type.

types : begin of ttab,
 ebeln like ekpo-ebeln,
 ebelp like ekpo-ebelp,
end of ttab.
data : itab type ttab.

So during run time the structure contain the data from the internal table.

Regards

Anver.

<b><i>if hlped kindly mark points</i></b>

Read only

Former Member
0 Likes
961

Structure is varible which holds collection of data instead of single value.

the data in structure persistent only at runtime.

it is similar to your internal table,.

Read only

Former Member
0 Likes
961

Hi Ramesh,

Take for example CAUFVD - is a structure for Order Headers and Items.

But in the Module Pool program SAPLCOIH (IW31,IW31, IW33 Transactions) you can find the declarations of the include LCOIHTOP as

*----- Tabellen -


*

TABLES: CAUFVD. "Dialog Table Struktur Header

This is the reason that the structures contain data at run time.

By default your structure cannot hold data as the normal database table do.

Hope this is what you are expecting.

Regards

Kathirvel

Read only

messier31
Active Contributor
0 Likes
961

Hi Ramesh..

Structure will only contain data during runtime. There is no underlying table maintain for structure in database hence they can not stored persistence data ..

It is populated during runtime and exist till the life time of processing block in which it is decalred...

Hope this solves ur doubt...

Enjoy SAP.

Pankaj Singh