How to copy a record in a temp-table to a table?

abhishek.shah

New Member
I have a record in temp-table tt_pj1_mstr.
I want to copy/append that record into the existing table pj1_mstr.
Thanks in Advance.
 

abhishek.shah

New Member
BUFFER_COPY as you suggested helps copy records in a table to a temp-table. But not vice-versa. I have tried following:
/*================================*/
find first tt_pj1_mstr.
if available tt_pj1_mstr then do:
buffer-copy tt_pj1_mstr to pj1_mstr.
end.
/*================================*/

But this doesn't work. The record does not get appended to the table.
 

Cringer

ProgressTalk.com Moderator
Staff member
You need to create the target record first. Otherwise it will just try to copy it to the current record int he buffer.
 

Cringer

ProgressTalk.com Moderator
Staff member
Code:
find first tt_pj1_mstr.
if available tt_pj1_mstr then do:
  create pj1_mstr.
  buffer-copy tt_pj1_mstr to pj1_mstr.
end.
 
Top