‎2006 Oct 24 10:50 AM
hi,
I would like to describe (generate) a internal table like a existing table:
data: var_xxx like table mara.
but without the fields (e.g. ernam, laeda).
Which possibilitys do I have?
Thanks
Michael
‎2006 Oct 24 10:54 AM
Hi,
You have to use types declaration.
Types : begin of ty,
matnr type mara-matnr,
...declare all other fields you want here,
end of ty.
data itab type standard table of ty.
‎2006 Oct 24 10:52 AM
Please go thru the help topics in declaring internal tables.
may be the code you need will be :
data : xyz like mara occurs 0 [with header line ].
"[with header line ]" is optional
regards,
Sandeep Josyula
*Dont forget to reward helpful answers
‎2006 Oct 24 10:54 AM
Hi,
You have to use types declaration.
Types : begin of ty,
matnr type mara-matnr,
...declare all other fields you want here,
end of ty.
data itab type standard table of ty.
‎2006 Oct 24 10:58 AM
Hi,
This help will reveil all:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
Eddy
‎2006 Oct 24 10:59 AM
you can create a strc in se11 and then refer to that particular str in your program
data: t_ex like standard table of r_str initial size 0.
r_str is repostory str.
this str can be created from data element radiobutton in se11
santhosh
‎2006 Oct 24 11:05 AM
Hi Miachael,
this declares all of mara:
Data: begin of itab occurs 0.
include structure mara.
Data: end of itab.
this a part of mara.
Data: begin of itab occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
... ,
end of itab.
Regards, Dieter
‎2006 Oct 24 11:09 AM
Hi,
You can use the following simple syntax for your purpose.
data: it_mara type standard table of mara with header line initial size 0.
Bansi
SAP Technical Consultant.