Hi,
I need to do a function which reads from the temp tables created by a GP report (e.g. RM Statement Report). and then do an action.
here is my code:
---------------------Procedure name: Populate_BAB_RM_Statement_Trx
inout table RM_Statements_TRX_TEMP;
in integer table_operation;
local text localtext;
{BAB_RM_Statement_Trx is a new table hase same format of RM_Statements_TRX_TEMP}
copy from table RM_Statements_TRX_TEMP to table BAB_RM_Statement_Trx;
save table BAB_RM_Statement_Trx;
---------------------
And then I created a database trigger to fire my code
----------------------Procedure name: Startup
local integer l_result;
l_result = Trigger_RegisterDatabase(anonymous(table RM_Statements_TRX_TEMP), 0, TRIGGER_ON_DB_READ, script RM_Statements_TRX_TEMP);
if l_result<>SY_NOERR then
warning str(SY_NOERR);
warning str(l_result);
warning "Database trigger registration failed.";
end if;
---------------------
Then the procedure code:
---------------------Procedure name: Complete_Message
warning "The Temp table is captured completely";
---------------------
First ,
is this a good idea to read temp tables created by GP reports?
Second,
I need to write a trigger to fire the procedure "Complete_Message". after all operations done on all temp tables used by the report. How i can target that?
Thank you,
Hany