This discussion is archived
1 Reply Latest reply: Nov 5, 2012 3:51 AM by Nicolas.Gasparotto RSS

Problem with deleting PDF report in "Vew Log / Trace" Section

972464 Newbie
Currently Being Moderated
Hello everyone I just hired as a peoplesoft programmer :)
I have a question when I try to code a report generating program

I need to delete the PDF file (report) in "View Log/Trace"Section after the AE program executed.
(Actually I just want to hide it at "View Log/Trace" Section, so that user will not be able to see it).

The following program is my code

&xmlStr = &inXMLDoc.GenXmlString();
&strFilePath = %FilePath | "PAYSLIP_" | ZH_GPR068_AET.CAL_RUN_ID | "__" | ZH_GPR068_AET.PROCESS_INSTANCE | ".xml";
&FileCS = GetFile(%FilePath | "PAYSLIP_" | ZH_GPR068_AET.CAL_RUN_ID | "__" | ZH_GPR068_AET.PROCESS_INSTANCE | ".xml", "W", "UTF8", %FilePath_Absolute);
sRptDefn = "GPR0688_B";
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sRptDefn);
&oRptDefn.UseBurstValueAsOutputFileName = True;

&oRptDefn.ProcessReport("", &sLangCd, &AsOfDate, &sFileExt);
&Return_Value = PutAttachment(GetURL(URL.ZH_GPR068_PAYSLIP), &sss | ".pdf", %FilePath | &sss | ".pdf");
&conFileLog.WriteLine("PutAttachment Return Value:" | &Return_Value);

If &Return_Value = 0 Then
Local Record &ZH_PSLP_EE;
&ZH_PSLP_EE = CreateRecord(Record.ZH_PSLP_EE_DATA);

/*Delete(hide) the report file*/
Local JavaObject &javaFile;
&javaFile = CreateJavaObject("", %FilePath);

&tmpfile1 = GetFile(%FilePath | &ATTACHSYSFILENAME, "W", "UTF8", %FilePath_Absolute);
/*Delete(hide) the report file*/

After the program executed, the pdf report still exist and not being removed in "View Log/Trace" Section
&ATTACHSYSFILENAME already contain the PDF extension.

I am hoping someone can help me to find out what's wrong with my program results in cannot delete the PDF file in the "Vew Log / Trace" Section
Thank you so much

Edited by: 969461 on Nov 5, 2012 1:41 AM
  • 1. Re: Problem with deleting PDF report in "Vew Log / Trace" Section
    Nicolas.Gasparotto Oracle ACE
    Currently Being Moderated
    Maybe there's something I don't get very well, but that's quite strange to make a user able to run a process without making him able to see the report, or at least the log.
    Anyway, I think it should be better to solve it through the config rather than changing code.
    Have a look to the red-paper below, page 57 :
    I may be wrong, but I'd tend to have a look first on the process definition, "Process Security", or on permission list (process monitor)...


    Edited by: N Gasparotto on Nov 5, 2012 12:51 PM


  • Correct Answers - 10 points
  • Helpful Answers - 5 points