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 table

Former Member
0 Kudos

Hi Abapers,

I have one custom table say 'ynacctr1', now i have copied this table to another table say 'ynacctr2'. structure got copied but how to copy the contents to newly created table...

Kindly help me.

Thanks,

Radhika.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi!

Use SM30 to copy them manually. For this you have to set the table maintenance generator in SE11 for that table.

IF you don't want to do it manually, you have to write a program for it.

Regards

Tamá

5 REPLIES 5

Former Member
0 Kudos

Hi!

Use SM30 to copy them manually. For this you have to set the table maintenance generator in SE11 for that table.

IF you don't want to do it manually, you have to write a program for it.

Regards

Tamá

Former Member
0 Kudos

HI,

Write small program for this.

data : itab like standard table of ynacctr1.

select * from ynacctr1 into itab.

if sy-subrc eq 0.

modify ynacctr1 from itab.

endif.

Thanks

mahesh

Former Member
0 Kudos

Hi

directly it copies all the fields

0 Kudos

Solution: if it is a view, contents also gets copied automatically.

But if its a table, only structure gets copied. inorder to copy contents we can create table maintenance gen. and copy manually or through select query we can do it...

Thanks,

Radhika.

Former Member
0 Kudos

Hi,

The table contents will be copied when you copy a table, Gto SM30 and copy the contents, and come back to newly created strucutre from SM30 and press nEw Entries and paste those entries

Regards

Sudheer