If you want to add fields from another table to the temp-table individually, or you need to rename fields as you add them, use the ADD-LIKE-FIELD() method once for each field:
tt-handle:ADD-LIKE-FIELD( tt-field-name-exp ,
    { source-buffer-field-handle-exp | source-db-field-name-exp } ).
This method takes two arguments:
  • The name of the field in the temp-table, as a character expression
  • An identifier of the source field, which can be either its buffer-field handle or an expression evaluating to its name, with the table name qualifier (and, if necessary, its database name qualifier)
This example adds the Region field from the SalesRep table, which was not added in the ADD-FIELDS-FROM() method, and renames it to Area:
DEFINE VARIABLE hTT AS HANDLE NO-UNDO.
CREATE TEMP-TABLE hTT.
hTT:CREATE-LIKE("Customer","Name").
hTT:ADD-FIELDS-FROM("SalesRep","MonthQuota").
hTT:ADD-LIKE-FIELD("Area", "SalesRep.Region").