Translate

Tuesday, 27 November 2012

Running an sqr using people code push button



.      How to Run SQR thru PeopleCode?
Thru Create Process Request..    
  What is the procedure to run SQR thru CreateProcessRequest?
· Create SQR.
· Place the SQR in SQR Directory mentioned in the Configuration Manager.
· Create a New Process Definition in Process Scheduler.
In PeopleCode Event – call the CreateProcessRequest() function and specify Attributes ProcessType, ProcessName, and RunControlID

· Call the Schedule() method.
· Schedule() method will schedules the Process and then executes the rest of PeopleCode. It will not wait till the process gets completed.
· In Process Monitor we can see the Program Status whether it ran to Success or not. – RUNSTATUSDESCR field from PS_PMN_PRCSLIST Table.
.      What is the code to run SQR thru CreateProcessRequest PeopleCode Command?
Local ProcessRequest &RQST;

&RQST = CreateProcessRequest();
&RQST.ProcessType = "SQR Report";
&RQST.ProcessName = "Program1 ";
&RQST.RunControlID = "Srinivas";

&RQST.Schedule();

If &RQST.Status = 0 Then
   WinMessage("SQR Successfully Scheduled", 0);
Else
   WinMessage("There is a problem while Scheduling SQR", 0);
End-If;

write above code in pushbutton field change event. 

No comments:

Post a Comment