Question

I have creted one dynamic temp-table and dynamic query.Now I want to populate it into browse.Here is my code.My issue is it is showing error like "source element of a buffer-copy statement has no record(5365)". How to solve this one? cip-tablename = tableName getting from UI

CREATE BUFFER hBuffer FOR TABLE cip-tablename.


CREATE QUERY hQuery.        /*this query I need for some other logic.
hQuery:SET-BUFFERS(hBuffer).
hQuery:QUERY-PREPARE("FOR EACH " + cip-tablename + " WHERE " + cip-condition).
hQuery:QUERY-OPEN().


create temp-table hTT.
hTT:Create-Like(cip-tablename).
hTT:temp-table-prepare("tt" + cip-tablename).

hTTb = htt:default-buffer-handle.
hTTb:buffer-create().
hTTb:buffer-copy(hBuffer).


CREATE QUERY hQuery1.
hQuery1:SET-BUFFERS(hTTbh).
hQuery1:QUERY-PREPARE("for each tt " + cip-tablename).
hQuery1:QUERY-OPEN().

CREATE BROWSE hbrowse-hdl1
ASSIGN
TITLE     = cip-tablename + " Browse"
FRAME     = Frame DetailsFrame:Handle
QUERY     = hQuery1
X         = 48
Y         = 100
WIDTH     = 96
DOWN      = 10
VISIBLE   = YES
SENSITIVE = TRUE
READ-ONLY = yes.
hbrowse-hdl1:ADD-COLUMNS-FROM(hTTbh).

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top