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

What is the difference between Structure and Work area

manoj_goyal2
Participant
0 Likes
3,786

Hi Guys,

What is the difference between Structure and work area?

Are they same with different names?

Thanks,

mini.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,871

Hi,

In the functionality point of view there is no difference between the structure and workarea.

But structure is defined in the data dictionary and can be used in both data dictionary as well as in program while workarea id confined to program.

workarea is also a type of structure .

Reward points if helpful .

Thanks and Regards.

Hi Guys,

What is the difference between Structure and work area?

Are they same with different names?

Thanks,

mini.

8 REPLIES 8
Read only

Former Member
0 Likes
1,871

A work area is an structure, you are correct

Read only

Former Member
0 Likes
1,871

workarea can hold single record

structure can hold more than one

i mean at run time

Read only

Former Member
0 Likes
1,871

Structure does not contain any data.

work area contains only single record of that structure.

types : being of ty_tab,

matnr type mara-matnr,

ernam type mara-ernam,

end of ty_tab.

data : it_tab type standard table of ty_tab initial size 0. (this is internal table of type ty_tab

data : is_tab type ty_tab. ( this is work area for the structure ty_tab)

Read only

Former Member
0 Likes
1,871

Is the same,

don't exist differences

both only contain just 1 record, in a rutine

Read only

Former Member
0 Likes
1,871

Hi ,

1)Functionallly they both are same holds a single record at a time

2) But when defining you can create structure in DDIC and ABAP Editor also

But the term work area is not user in DDIC is used in program i.e abap editor.

Read only

Former Member
0 Likes
1,872

Hi,

In the functionality point of view there is no difference between the structure and workarea.

But structure is defined in the data dictionary and can be used in both data dictionary as well as in program while workarea id confined to program.

workarea is also a type of structure .

Reward points if helpful .

Thanks and Regards.

Read only

Former Member
0 Likes
1,871

hey buddies,*

i had this same doubt for a long time and i have my finds with me ie wa and structure are the same but wa can hold a single record but structure cannot hold data in it but according to the previous posts folks say structure too holds data as wa does but i guess when debugging wa holds data and structure doesnt hold bcoz i tried.

types : begin of str_mara,

matnr type mara-matnr,

ernam type mara-ernam,

end of str_mara.

data it_mara type table of str_mara.

select matnr ernam from mara into it_mara where matnr = '100-101'.

*********************if folks say wa = structure,this should work,isn't it?*********************************

loop at it_mara into str_mara.

write:/ str_mara-matnr , str_mara-ernam.

endloop.

*******************but it throws an error saying that str_mara is not a wa*******************************

i may not be correct too plz let me know if i'm wrong

Edited by: arun_aime on Feb 12, 2010 4:41 PM

Read only

0 Likes
1,871

I think it gives you a different message. Would you check it please?

Rob