Building a Transaction That Uses Report Data
When building a transaction that uses report data, you should follow these guidelines:
-
Design one or more temporary tables for transaction purposes using the same key structure as the batch process. The tables are keyed by process instance.
-
The user transaction should contain inquiry parameters such as EMPLID or CAL_RUN_ID.
-
Create a push button or similar feature to launch a PeopleCode program to access the report data. It should run as follows:
-
The class ReportDataReal is initiated.
-
The PeopleCode transforms the inquiry parameters into report data parameters using the method .AppParamChar/Date/Num().
-
The method .GetInstance() is triggered. This method generates a process instance number using a table designed for report data.
-
The method .ExecuteNow() is triggered.
-
The PeopleCode can then load data from the temporary tables into the page buffers (using, for example, the process instance number returned by method .GetInstance()).
-
The content of the temporary tables must then be deleted using the process instance number.
-
-
If two users run the same transaction simultaneously, the system generates two different process instance numbers.