2006 Nov 01 5:45 AM
HOW TO CONVERT STRUCTURE INTO INTERNAL TABLE
2006 Nov 01 5:46 AM
HI
Data: begin of itab,
matnr like mara-matnr,
end of itab.
Data: itab1 type table of itab.
OR
Data: itab1 like itab occurs 0 with header line.
Hope this helps.
Regds,
Seema.
2006 Nov 01 5:47 AM
Hi laxman,
1. Suppose struct is your structure.
2. then
3. data : itab like struct occurs 0 with header line.
regards,
amit m.
2006 Nov 01 5:49 AM
data: begin of itab occurs 0,
include structure <str_name>.
data: end of itab.
2006 Nov 01 5:53 AM
in the OO worl of ABAP itabs with header line are not accepted.
data: itab type standard table of <structure> .
Regards
Raja
2006 Nov 01 5:55 AM
a/c to SAP recommendations it is always better to avoid internal tables with header lines ....so better declare like
DATA : inter_tab TYPE STANDARD TABLE OF struct INITIAL SIZE 0.
2006 Nov 01 6:12 AM
hi,
you can do in many ways...
1. data: it_mara type table of mara.
2. data: it_mara like mara occurs 0 with header line.
..
Regards
vijay
2006 Nov 01 6:16 AM
lets declare a structure --
data: begin of str,
name(10),
age(3),
city(10),
end of str.
lets now convert this to an internal table itab --
data itab like table of str.
I hope this helps
regards,
-pankaj singh
2006 Nov 01 6:29 AM
declaring a structure
types : begin of ty_tab,
matnr type mara-matnr,
MATKL type mara-MATKL,
end of ty_tab.
internal table declaration
data : IT_tab type standard table of ty_tab initial size 0,
IS_tab type ty_tab. (work area declaration)
Regards
- Gopi