Table Read hook
Use this hook to write the SQL query to read the data of the table. There are two cases for which it is not required to implement this hook for a Table Selection:
- The table is already linked to the report. However, it can be that not all fields of the table are available; in that case, still a Table Read hook is required to read those additional fields.
- The table data is read in the Write Row hook at report level. This is mandatory if you need data of multiple table records being sent in the XML file.
To select the correct data from the tables, all fields that are sent from the print session to the native report are available. Those fields can be found in the Reports session (ttadv3530m000), option Report Input Fields.
Example:
function extern void tccom100.read()
{
select tccom100.*
from tccom100
where tccom100.bpid = :tdpur400.otbp
as set with 1 rows
selectdo
endselect
}