Application Development 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: 

data transfer between 2 tables

Former Member
0 Kudos

HI Guys,

i have a table like table1 with 4 fields, and 5 records, data.

i had created another table2 with just copy from table1.

so both tables table1,table2 having same structure.

now the question is how to copy the data i.e, 5 records from table1 to table2.

plz let me know the clear scenario.

Thanks in Advance,

Amit.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

select * from table1 into itab.

insert <table2> from table itab.

7 REPLIES 7

Former Member
0 Kudos
table2[] = table1[].

Former Member
0 Kudos

Hi,

try this way if structures are same

table1[] = table2[].

Cheers,

Kothand

Former Member
0 Kudos

table2[] = table1[]

GauthamV
Active Contributor
0 Kudos

hi,

use move or move-corresponding statement.

Former Member
0 Kudos

select * from table1 into itab.

insert <table2> from table itab.

0 Kudos

Hi

if you have created standard internal tables then to copy data from one table tab1 to another table tab2 use

append lines of tab1 to tab2.

if you have created tables in abap dictionary then to copy data from one table tab1 to another table tab2 use

data :itab type table of tab1 with header line.

select * from tab1 into table itab.

loop at itab.

insert tab2 from itab.

endloop.

Former Member
0 Kudos

hiiiiiii

use

move itab2 to corresponding fields of itab2.

this will surely help you.