Translate
Sunday, 26 January 2014
Saturday, 25 January 2014
how to hide grid column in a page
Local Grid &GRID;
Local GridColumn &COLUMN;
If COMPLETE_FLAG = "Y" Then
&GRID = GetGrid(PAGE.RESOURCE, "GRID1");
&COLUMN = &GRID.GetColumn("COL5");
&COLUMN.Enable = False;
End-If;
Local GridColumn &COLUMN;
If COMPLETE_FLAG = "Y" Then
&GRID = GetGrid(PAGE.RESOURCE, "GRID1");
&COLUMN = &GRID.GetColumn("COL5");
&COLUMN.Enable = False;
End-If;
Tuesday, 21 January 2014
how to run AE from SQR
Here is the piece of code to call app engine program from SQR:
begin-procedure uCall-Unix-Script
show 'started ucall-unix-script'
let $vUNXque = 'psae -CT INFORMIX -CS hrdevsoc -CD HRDEV -CO SKAPIRED -CP saisuni20 -R test1 -I 909340 -AI AZ_JOB_0322'
show $vUNXque
call system using $vUNXque #unix-stat[NOWAIT]
if #unix-stat 0
show 'UNIX call error [' $vUNXque ']'
end-if
end-procedure
begin-procedure uCall-Unix-Script
show 'started ucall-unix-script'
let $vUNXque = 'psae -CT INFORMIX -CS hrdevsoc -CD HRDEV -CO SKAPIRED -CP saisuni20 -R test1 -I 909340 -AI AZ_JOB_0322'
show $vUNXque
call system using $vUNXque #unix-stat[NOWAIT]
if #unix-stat 0
show 'UNIX call error [' $vUNXque ']'
end-if
end-procedure
To run an sqr from application engine
You could use the ProcessRequest Class PeopleCode to call an SQR program from
an application engine. You would add the PeopleCode step to the application
engine. Below is some sample code to accomplish this task:
Local ProcessRequest &RQST;
/********************************************* **************************
* Construct a ProcessRequest Object. *
********************************************** *************************/
&RQST = CreateProcessRequest();
/********************************************* **************************
* RunControlID and ProcessType, ProcessName or JobName *
* are required properties. *
********************************************** *************************/
&RQST.ProcessType = "SQR Report";
&RQST.ProcessName = "XRFWIN";
&RQST.RunControlID = RUN_CNTL_ID;
/********************************************* **************************
* RunLocation can be Client, Server or a Process Scheduler Server *
* Name. If the Run Location is Server, the Process Request would be *
* scheduled on Process Scheduler server for the default Operating *
* System. *
* A default Operating System is defined on the System Settings page *
* of Process Scheduler Manager. *
********************************************** *************************/
&RQST.RunLocation = "PSNT";
/********************************************* **************************
* OutDestTypes are None, File, Printer, Window, Email and Web. Window is
Supported for Run Location Client only. In this example, letting Process
Scheduler resolve the output directory at runtime. *
********************************************** *************************/
&RQST.OutDestType = "%OutputDirectory%";
&RQST.OutDestFormat = "SPF";
&RQST.OutDest = "C:\TEMP\";
/********************************************* **************************
* DateTime when the Process Request will be scheduled to Run
Also TimeZone
*
********************************************** *************************/
&RQST.RunDateTime = %Datetime;
&RQST.TimeZone = %ServerTimeZone;
/********************************************* **************************
* Schedules the process based on the object properties, setting the *
* ProcessInstance and Status properties. *
* Status of zero means Success. *
********************************************** *************************/
&RQST.Schedule();
&PRCSSTATUS = &RQST.Status;
If &RQST.Status = 0 then
/* Schedule succeeded. */
&PRCSINSTANCE = &RQST.ProcessInstance;
Else
/* Process (job) not scheduled, do error processing */
End-If;
an application engine. You would add the PeopleCode step to the application
engine. Below is some sample code to accomplish this task:
Local ProcessRequest &RQST;
/********************************************* **************************
* Construct a ProcessRequest Object. *
********************************************** *************************/
&RQST = CreateProcessRequest();
/********************************************* **************************
* RunControlID and ProcessType, ProcessName or JobName *
* are required properties. *
********************************************** *************************/
&RQST.ProcessType = "SQR Report";
&RQST.ProcessName = "XRFWIN";
&RQST.RunControlID = RUN_CNTL_ID;
/********************************************* **************************
* RunLocation can be Client, Server or a Process Scheduler Server *
* Name. If the Run Location is Server, the Process Request would be *
* scheduled on Process Scheduler server for the default Operating *
* System. *
* A default Operating System is defined on the System Settings page *
* of Process Scheduler Manager. *
********************************************** *************************/
&RQST.RunLocation = "PSNT";
/********************************************* **************************
* OutDestTypes are None, File, Printer, Window, Email and Web. Window is
Supported for Run Location Client only. In this example, letting Process
Scheduler resolve the output directory at runtime. *
********************************************** *************************/
&RQST.OutDestType = "%OutputDirectory%";
&RQST.OutDestFormat = "SPF";
&RQST.OutDest = "C:\TEMP\";
/********************************************* **************************
* DateTime when the Process Request will be scheduled to Run
Also TimeZone
*
********************************************** *************************/
&RQST.RunDateTime = %Datetime;
&RQST.TimeZone = %ServerTimeZone;
/********************************************* **************************
* Schedules the process based on the object properties, setting the *
* ProcessInstance and Status properties. *
* Status of zero means Success. *
********************************************** *************************/
&RQST.Schedule();
&PRCSSTATUS = &RQST.Status;
If &RQST.Status = 0 then
/* Schedule succeeded. */
&PRCSINSTANCE = &RQST.ProcessInstance;
Else
/* Process (job) not scheduled, do error processing */
End-If;
Demon only : app engine prog. type
Daemon Only, a type of program used as a daemon process.
Application Engine provides a daemon process, called PSDAEMON, that runs continuously when PeopleSoft Process Scheduler is running and is intended for recurring jobs. It polls the system, checking for certain conditions to occur. A predefined set of conditions is an event. When the conditions are true, PSDAEMON schedules a process to handle the event.
Application Engine provides a daemon process, called PSDAEMON, that runs continuously when PeopleSoft Process Scheduler is running and is intended for recurring jobs. It polls the system, checking for certain conditions to occur. A predefined set of conditions is an event. When the conditions are true, PSDAEMON schedules a process to handle the event.
Saturday, 18 January 2014
XML Publisher Passing Run Control values to PS Query as Data Source
XML Publisher.
Data Source: PS query
Below is the code to pass values from Application Engine State Record to PS Query prompt record.
Input values are FromDate and ThruDate.
The XML Publisher then runs the report based on input values and generates the output.
&rcdQryPrompts.GetField(1).Value = PS_PAYROLL_AET.FROM_DATE;
Data Source: PS query
Below is the code to pass values from Application Engine State Record to PS Query prompt record.
Input values are FromDate and ThruDate.
The XML Publisher then runs the report based on input values and generates the output.
import PSXP_RPTDEFNMANAGER:*;
local string &sRptDefn = ‘PAYROLL_RPTDFN’;
/* get report definition object */
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn (&sRptDefn);
&oRptDefn.Get();
/* fill query runtime prompt record */
&rcdQryPrompts = &oRptDefn.GetPSQueryPromptRecord();
&FieldName1 = &rcdQryPrompts.GetField(1).Name;
&FieldName2 = &rcdQryPrompts.GetField(2).Name;
&FieldName2 = &rcdQryPrompts.GetField(2).Name;
/* MessageBox(0, "", 0, 0, "The First field name is : " | &FieldName1); */
/* MessageBox(0, "", 0, 0, "The Second field name is : " | &FieldName2); */
&rcdQryPrompts.GetField(1).Value = PS_PAYROLL_AET.FROM_DATE;
&rcdQryPrompts.GetField(2).Value = PS_PAYROLL_AET.TO_DATE;
If Not &rcdQryPrompts = Null Then
&oRptDefn.SetPSQueryPromptRecord(&rcdQryPrompts);
End-If;
/*generate report*/
&oRptDefn.ProcessReport (&sTmpltID, &sLangCd, &AsOfDate, &sOutFormat);
/*publish report */
BI Publisher: Run Date and Run Time in the Output Report
In Reports, we generally place the Report Run Date and Run Time in the Output Report.
Lets see how this can be done in BI Publisher.
Open the BI Publisher Template (RTF), insert the Form field and in the options select the Field Type asCurrent date for Run Date and Current Time for Run Time.
Below are the snapshot for the same.
Now save the template and check the Output in the Preview. Below is the sample Output.
Lets see how this can be done in BI Publisher.
Open the BI Publisher Template (RTF), insert the Form field and in the options select the Field Type asCurrent date for Run Date and Current Time for Run Time.
Below are the snapshot for the same.
SET ID , BUSINESS UNIT , Transaction table and control table
Business Units
Business units are logical units that you create to track and report specific business information. Business units have no predetermined restrictions or requirements; they are a flexible structuring device that enable you to implement PeopleSoft HRMS based on how your business is organized.
You must define at least one business unit. The BUSINESS_UNIT field is included on all transaction tables.
Tablesets and SetIDs
Tablesets and setIDs are devices that enable you to share – or restrict – information across business units. For example, with tablesets and setIDs you can centralize redundant information such as country codes while keeping information such as departments and job codes decentralized. The overall goal of tablesets and setIDs is to minimize data redundancy, maintain data consistency, and reduce system maintenance tasks.
You must define at least one tableset/setID. The SETID key field is included on all control tables.
Control Tables
Control tables store information that is used to process and validate the day-to-day business activities (transactions) users perform with PeopleSoft HRMS applications.
The information stored in control tables is common and shared across an organization, for example, master lists of customers, vendors, applications, items, or charts of accounts. By storing this shared information in a central location, control tables help to reduce data redundancy, maintain data integrity, and ensure that users have access to the same basic information.
The information stored in control tables is generally static and is updated only when fundamental changes occur to business policies, organizational structures, or processing rules.
Note. Control tables are tables that include the SETID key field (setID). As you set up control tables, you’ll notice that it is the setID that enables control table information to be shared across business units.
Few control tables in ps hrms:PAY_PRIOR_ALL,PS_DEPT_TBL
Few control tables in ps hrms:PAY_PRIOR_ALL,PS_DEPT_TBL
Transaction Tables
Transaction tables store information about the day-to-day business activities (transactions) users perform with PeopleSoft HRMS applications.
The information stored in transaction tables often changes and is updated more frequently than the information stored in control tables.
Few Transaction tables in ps hrms: PS_HISTORY,PS_HUP_WORK
Few Transaction tables in ps hrms: PS_HISTORY,PS_HUP_WORK
Note. Transaction tables are tables that include the BUSINESS_UNIT field (which may or may not be used as a key field).
Friday, 17 January 2014
Difference between do-while, do-when, do-until and do-select in app engine.
The condition in an app engine DO-WHILE contruct is true if the associated SQLSELECT statement returns any rows. Any subsequent action executes until the SQL statement doesn't return any more rows.
In contrast, the DO-UNTIL construct executes the actions first and then runs the SQL. The condition is true if the SQL statement returns any row and terminates the loop.
DO-SELECT executes the actions for each row returned by the SQL statement. It is like a 'FOR LOOP'.
DO-WHEN is like an 'IF Statement'. If the SQL returns a row, then the actions are executed, otherwise they're skipped.
In contrast, the DO-UNTIL construct executes the actions first and then runs the SQL. The condition is true if the SQL statement returns any row and terminates the loop.
DO-SELECT executes the actions for each row returned by the SQL statement. It is like a 'FOR LOOP'.
DO-WHEN is like an 'IF Statement'. If the SQL returns a row, then the actions are executed, otherwise they're skipped.
Wednesday, 8 January 2014
peoplecode validation : How To Put Validation On Field To Accept Characters Only Using Peoplecode
Question : I have an employee information page in which there is employee name field I want to put a validation so that at run time on click save button. It shows a message to user that it will not accept any other value than characters. Please reply me soon.
Ans:You can use IsAlpha function.
If ?Not IsAlpha(MYRECORD.NAME.Value) Then
/* do error processing */
Error MsgGet(<MsgSet>, <MsgNum>, "default error message");
End-if;
Ans:You can use IsAlpha function.
If ?Not IsAlpha(MYRECORD.NAME.Value) Then
/* do error processing */
Error MsgGet(<MsgSet>, <MsgNum>, "default error message");
End-if;
IsAlpha:
Syntax
IsAlpha(String)
Description
Use the IsAlpha function to determine if String contains only textual characters, including alphabetic
characters
Returns:
A Boolean value: true if the string contains only alphabetic and textual characters, false if it contains any numbers, punctuation or spaces.
Subscribe to:
Posts (Atom)