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

Data Dic

Former Member
0 Likes
529

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
470

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

3 REPLIES 3
Read only

Former Member
0 Likes
470

move table itab1[] into table itab2[].

or

itab2[] = itab1[]

regards,

srinivas

<b>reward for useful answers</b>

Read only

Former Member
0 Likes
470

just write as itab2[] = itab1[].

<b>Reward for Helpful answers.</b>

-Satish

Read only

Former Member
0 Likes
471

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