SQR's are already setup and defined as a Process Definition inside of your PeopleSoft application, so we will deal with how to launch an SQR. There are two ways of launching a program from within your PeopleCode programs. The first way is to make a system call to launch the SQRW.exe if you are on windows or the equivalent binary program if you are running on a UNIX operating system. However, this is not the best method. 

Using the method to make a call to the system does not give you the control and integration that you desire with your PeopleSoft environment. Therefore, the best and safest way to launch an SQR program is to use the PeopleCode functions CreateProcessRequest() and Schedule(). 

The CreateProcessRequest function allows you to create a ProcessRequest object. Remember, you should be coding your PeopleCode programs using the Object Oriented methods. Once you've created your object, you can assign values to its properties and use the Schedule method to submit the process request for scheduling. The CreateProccessRequest function takes 2 arguments. The Process Type and the Process Name.

REM Declare your Variables;
Local ProcessRequest &MYRQST; 
Local String &MySQR;

&MySQR = "DDDAUDIT"

REM Create My Process Request Object;
&MYRQST = CreateProcessRequest("SQR Process", &MySQR);

REM Set Properties of My Process Request Object;
&MYRQST.RunControlID = "MYRUNCNTRL_ID"

REM Set Properties of My Process Request Object;
&MYRQST.SetOutputOption("Web", "PDF", "", &MySQR); 

The above example creates a ProcessRequest object for the DDDAUDIT SQR named &MYRQST. You will notice that I also specified Run Control ID and the output options. I can now take this Object and use the Schedule() method agains it to Schedule the SQR. Here is an example.

&MYRQST.Schedule();
If &MYRQST.Status = 0 then
/* Schedule succeeded. */
Else
/* Process (job) not scheduled, do error processing */
End-If;

Views: 169

Reply to This

Replies to This Discussion

thanks... much needed..

Very informative and detailed indeed.

Thanks.

it's a pleasure to meet you. I am USA Army personnel, i have an important thing to discus with you.
Please write me on my email (captkristen899@gmail.com)

RSS

PeopleSoft Jobs in US

Videos

  • Add Videos
  • View All

© 2021   Created by Maisam Agha.   Powered by

Badges  |  Report an Issue  |  Terms of Service