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: 

copying contents from one database table to another

Former Member
0 Kudos

is their any technioque to transfer contents from one database table to anther table that is made by copying structure of same parent table

8 REPLIES 8

Former Member
0 Kudos

Hi Kunwar,

Do you want to do it in the same client?

Do you want to use ABAP?

Also provide more details about table.

Regards,

Atish

0 Kudos

ya,the tables are on same client and to with using abap codes,if possible plz send abap codes...

Former Member
0 Kudos

Hi Kunwar,

What i could understand from your question is, you have a table T1 and you copied the entire table or may be few fields of table T1 and created another table T2. Now you want to copy all the relevant data from T1 to T2.

Is that the case? Then the simplest way is to write a report.

Step:

Select all the records of the relevant fields from table T1 into an internal table

Insert the internal table into T2

Regards,

kinshuk

0 Kudos

can you plz send me codes for doing that

0 Kudos

Hi,

Check the code below

Data: itab1 type table of tab1,
      itab2 type table of tab2.

* itab2 is of new table type created from some fields of tab1

* In the select statement below you can select few fields depending upon your requirement
select * from tab1 into table itab1.

loop at itab1 into wa1.
  wa2-f1 = wa1=f1.
 ....
  append wa2 to itab2.
endloop.

insert itab2 into tab2.

Regards,

kinshuk

PS: Reward points if you find it helpful

Former Member
0 Kudos

hi

good

As such of there is no standard Trascation code or Function Module to copy the table data from one to another .

Only through the ABAP code it is possible .

thanks

mrutyun^

hanauser8wasim
Explorer
0 Kudos

just have to create a table with same fields