Thursday, April 2, 2009

PeopleCode: Get Report Path

Description
In order to retrieve report in Process Monitor, click Details>View Log/Trace File, physically, the report is storing in a server location, the code below is to retrieve the exact location that the report generated in.
------------------------------------------------------------------------------
SQLEXEC("select SEQUENCENO from PS_PRCSSEQUENCE where PRCSSEQKEY = 0",&seq_no);

SQLEXEC("select PRCSOUTPUTDIR from PSPRCSPARMS where PRCSINSTANCE = :1",&seq_no,&output_dir);

&File = GetFile(&output_dir | "\MyDocument.PDF", "W", %FilePath_Absolute);

No comments: