‎2008 Jan 09 6:44 AM
i have declaerd an internalo table
what is the syntax to declare work area
‎2008 Jan 09 6:46 AM
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
‎2008 Jan 09 6:48 AM
Hi,
data workarea type <the structure you used to declare itab>
With regards
Madhu
‎2008 Jan 09 6:53 AM
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
‎2008 Jan 09 6:53 AM
Hi,
Data : wa like itab.
Don't use Occurs 0 or with header line statements while defining wa.
Thanks,
Sriram Ponna.
‎2008 Jan 09 6:54 AM
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..
‎2008 Jan 09 6:56 AM
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.
‎2008 Jan 09 6:56 AM
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...
‎2008 Jan 09 7:15 AM
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
‎2008 Jan 09 9:35 AM
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
‎2008 Jan 09 11:14 AM
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..
‎2008 Jan 09 12:38 PM