‎2007 Aug 03 2:07 PM
Hi all,
I am having 2 internal tables onw with header and other without header.How will i move the contents from one internal table to other.
Regards,
Alex.
‎2007 Aug 03 2:18 PM
hi,
here a short example
data: imara type table of mara with header line.
*
data: imara1 type table of mara.
*
data: imaras type mara.
*
start-of-selection.
select * from mara up to 10 rows into table imara.
*
if you want the whole itab in itab1.
imara1[] = imara[].
loop at imara1 into imaras.
write: / imaras-matnr, imaras-brgew.
endloop.
*
if you want not the whole itab
clear: imara1[], imaras.
loop at imara.
imaras-matnr = imara-matnr.
imaras-mtart = imara-mtart.
append imaras to imara1.
endloop.
loop at imara1 into imaras.
write: / imaras-matnr, imaras-brgew.
endloop.
Regards, Dieter
‎2007 Aug 03 2:11 PM
move table itab1[] into table itab2[].
or
itab2[] = itab1[]
regards,
srinivas
<b>reward for useful answers</b>
‎2007 Aug 03 2:11 PM
just write as itab2[] = itab1[].
<b>Reward for Helpful answers.</b>
-Satish
‎2007 Aug 03 2:18 PM
hi,
here a short example
data: imara type table of mara with header line.
*
data: imara1 type table of mara.
*
data: imaras type mara.
*
start-of-selection.
select * from mara up to 10 rows into table imara.
*
if you want the whole itab in itab1.
imara1[] = imara[].
loop at imara1 into imaras.
write: / imaras-matnr, imaras-brgew.
endloop.
*
if you want not the whole itab
clear: imara1[], imaras.
loop at imara.
imaras-matnr = imara-matnr.
imaras-mtart = imara-mtart.
append imaras to imara1.
endloop.
loop at imara1 into imaras.
write: / imaras-matnr, imaras-brgew.
endloop.
Regards, Dieter