Functions hook
Use this hook to code (common) functions to use in the other hooks of the report extension. This helps you in reusing code and to keep the other hooks small and clear.
Example:
function string format.date(long i.date)
{
return(utc.to.iso(i.date, UTC_ISO_DIFF))
}
function string get.item.description(domain tcitem i.item)
{
domain tcdesc dsca
select tcibd001.dsca:dsca
from tcibd001
where tcibd001.item = :i.item
as set with 1 rows
selectdo
return(dsca)
endselect
return("???????????????")
}