How Sheduling SQR using Peoplecode

Description
Structured Query Report (SQR) can be executed with the help of peoplecode without taking the user to Process request page. The best way to do it is to create a process request and schedule it.
The Steps Include 1)Declare a ProcessRequest object 2)Declare name of the sqr to be processed 3)Create a Process Request Object; 4)Set Properties of the Process Request Object 5)Schedule the SQR 6)If the Process (job) not scheduled, do error processing Problem this asset addresses In order to execute a Structured Query Report (SQR) , one has to go to the corresponding Process Request Page and run the SQR manually.This manual work is cumbersome and the user has to wait to execute the SQR at predefined time intervals
 
/* Declare a ProcessRequest object */
Local ProcessRequest &PRCSRQST; 

/* Declare name of the sqr FEB_PRCS to be processed */
Local String &SQR_TO_PROCESS; 

&SQR_TO_PROCESS = "FEB_PRCS"
/* Create a Process Request Object; */
&PRCSRQST = CreateProcessRequest("SQR Process", &SQR_TO_PROCESS);

/* Set Properties of the Process Request Object; */
REM CreateProccessRequest function takes these 2 arguments - Process Type and the Process Name;

&PRCSRQST.RunControlID = "FEB07";
&PRCSRQST.SetOutputOption("Web", "PDF", "", &SQR_TO_PROCESS); 

/* Schedule the SQR */
&PRCSRQST.Schedule();
If &PRCSRQST.Status = 0 then
/* Schedule successful. */
Else
/* Process (job) not scheduled, do error processing */

End-If;
SHARE

peoplesoft

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Phaniraavi@gmail.com