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

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.
 
You need to create the target record first. Otherwise it will just try to copy it to the current record int he buffer.
 
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.
 
Back
Top