Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to copy content?

Hi ,

I just wanna copy the content of one transparent table to another transparent table.

I have created two tables with same fields. In one table content is their and in other its not.

Please tell me all the methods to do that?

And which one is best in terms of good programiong?

Reward points sure>>>>

Thanks, Ajay

Tags:
Former Member
Former Member replied

Hi ajay,

parameters:
  p_old type tabname,
  p_new type tabname.
field-symbols:
  <tab> type standard table.
data:
  lr_tab type ref to data.
create data lr_tab type table of (p_old).
assign lr_tab->* to <tab>.
select * from (p_old) into table <tab>.
insert (p_new) from table <tab>.
write: sy-dbcnt. 'entries copied from', p_old, 'to'. p_new.

This is without any checks if the tables are compatible - this is what you may add.

Regards,

Clemens

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question