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

work area

Former Member
0 Likes
1,171

i have declaerd an internalo table

what is the syntax to declare work area

11 REPLIES 11
Read only

Former Member
0 Likes
1,146

Hi,

data: itab like mara occurs 0 with header line,"internal table

wa_mara like itab. "work area

Regards

Edited by: K.P.N on Jan 9, 2008 7:46 AM

Read only

Former Member
0 Likes
1,146

Hi,

data workarea type <the structure you used to declare itab>

With regards

Madhu

Read only

Former Member
0 Likes
1,146

Hi,

Please find sample code for reference

1.

Types:

BEGIN OF ty_header,

fname type char15,

lname type char15,

END OF ty_header.

DATA: lt_header type STANDARD TABLE OF ty_header, "Table Declaration

ls_header TYPE ty_header. "Work Area Declaration

2.

If you are using table directly instead of creating a structure then use below declaration

DATA: ls_header TYPE <TABLE_NAME>.

Regards,

Farheen

Read only

Former Member
0 Likes
1,146

Hi,

Data : wa like itab.

Don't use Occurs 0 or with header line statements while defining wa.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,146

Hi Das,

Here is a sample code 4 u check in once..

data: begin of itab occurs 0,

vbeln like vbak-vbeln,

erdat like vbak-erdat,

end of itab.

data: wa like itab.

OR

data: wa like line of itab.

Award points if helpful.

Kiran Kumar.G

Have a Nice Day..

Read only

Former Member
0 Likes
1,146

Hi,

data: itab type table of SPFLI.

wa like line of itab.

data: itab type table of SPFLI.

wa type SPFLI.

data: wa type SPFLI.

itab like table of SPFLI.

regards,

vasavi.reward if helpful.

Read only

Former Member
0 Likes
1,146

HI

so u have internal table then with simple syntax u can declare work area

i.e.

data:

fs_wa like line of it_tab.

then it will automatically declares a work area for the internal table that u have

plzz reward if u found it is usefull to u...

Read only

Former Member
0 Likes
1,146

Hi,

this is an internal table

BEGIN OF t_vsart OCCURS 0,

vsart TYPE vttk-vsart,

END OF t_vsart,

BEGIN OF t_vbuk OCCURS 0,

vbeln TYPE vbuk-vbeln,

trsta TYPE vbuk-trsta,

END OF t_vbuk,

if u wanna declare a work area for this table.. use this

w_vsart like line of t_vsart.

Instead line of u can use someother relevant keyword based on ur needs.

Regards,

Ari

Read only

Former Member
0 Likes
1,146

Hi dear,

If u declare the internal table as it_Sample

For tht declare the workarea as follows:

  • Before creating an internal table u hav 2 write

structure(x_Sample) or u hav 2 use table ok

Data: it_Sample type standard table of x_Sample (or)

table name initial size 0. //For internal table

wa_Sample type x_Sample(or)table name.

Regards

AshokChowdhary

Read only

Former Member
0 Likes
1,146

Hi,

Structure:

types: Begin of t_tab,

lifnr type lifnr,

land1 type land1,

name1 type name1,

End of t_tab.

Internal table:

Data: it_tab type standard table of t_tab.

Workarea:

Data: wa_tab type t_tab.

Rgds

Kumar..

Read only

Former Member
0 Likes
1,146

Hi,

Data : w_fieldname type fieldname.

bye.