How map table form prodataset to static TEMP-TABLE ?
Paweł
Exmple
define temp-table tt_buf NO-UNDO like IKORmenu .
define temp-table tt_sys NO-UNDO like IKORsystem .
DEFINE INPUT PArameter DATASET-HANDLE ds .
/* ------------------------ */
TEMP-TABLE tt_buf:copy-temp-table ( ds:get-top-buffer(1) ).
TEMP-TABLE tt_sys:copy-temp-table ( ds:get-top-buffer(2) ).
I'm not sure about what are you actually asking.
If the question is actually about copying table structure: you can't change a static table structure.
If the question is about copying table content:
topBuff = ds:get-buffer(1).
create query hquery.
hquery:query-prepare('for each ' + topBuff:table-name).
hquery:query-open().
do while hquery:get-next():
create tt_buf.
buffer tt_buf:Handlef:BUFFER-COPY(topBuff,'<field mapping here>').
end.
Look the docs for buffer-copy, it has parameters and I never remembers if it receives source, or destination, buffer.