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

copying table

Former Member
0 Likes
767

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
Read only

Former Member
0 Likes
719

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
Read only

Former Member
0 Likes
720

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á

Read only

Former Member
0 Likes
719

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

Read only

Former Member
0 Likes
719

Hi

directly it copies all the fields

Read only

0 Likes
719

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.

Read only

Former Member
0 Likes
719

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