Search This Blog

Monday, April 1, 2013

App Engine: Do-Select with Re-Select option

Few pointers on using Do-Select with Re-Select option

For each iteration of the loop, Application Engine opens a cursor and fetches the
first row.

Your program processes the first row returned from the Select statement.
The cursor is reopened for each iteration of the loop.

With this type of Fetch statement, you typically want some aspect of the loop to
eventually cause the Select statement to return no rows.

Otherwise, there is no mechanism in place by which to exit the loop. This type of

Do Select is restartable.

For new Application Engine programs that you develop, by default, the commit
values at the section and the step level are turned off.

No commits occur during the program run, except for the implicit commit that occurs after the successful completion of the program.

For row-based processing, commit after every N iterations of the main fetch loop
that drives the process.

One technique for accomplishing this is to have a processed flag that you check
in the Where clause of the Do Select action,and you perform an update inside the loop (and before the commit) to set the flag to Y on each row that you fetch.

Wednesday, March 20, 2013

SQLs useful for developers / testers


1. SQL to find the list of roles attached to a page.

select rc.rolename, rd.descr , a.classid, c.classdefndesc
from psauthitem a, psclassdefn c, psroleclass rc, psroledefn rd
where a.pnlitemname = --Enter the page Name Here
and a.baritemname= -- Enter the component name/bar_name
and a.classid = c.classid
and a.classid = rc.classid
and rc.rolename = rd.rolename
Order by rc.rolename;


2. select distinct r.recname from pspnlgroup pg,pspnlfield p,psrecdefn r where
pg.pnlgrpname ='JOB_DATA'
and pg.pnlname = p.pnlname
and p.recname = r.recname
and r.rectype = '0'
and p.recname like '%'; 

Tuesday, March 12, 2013

Relation between Job Actions and Effective Date

Peoplesoft HCM Relation between Job Actions and Effective Date.

Personnel actions that begin new stages of employment (hire, promotion, reassignment, transfer, disciplinary action, and pay rate changes) are effective
at the beginning of the business day.

Example: Employee gets promoted as of 15-Jan-2012. That means effective 15-Jan-2012, employee enters his new role.

Personnel actions such as removal and termination are effective at the end of the business day.

Example: Employee gets terminated as of 12-Aug-2012. That means employee last working day is 11-Aug-2012 and from 12-Aug he is no more with the company.


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.


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;

/* 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 */

Tuesday, February 26, 2013

Dynamic Prompt


Dynamic Prompt Tables:

Nothing but getting list of values from a at runtime.
The angular brackets mentions that the record from which values are fetched is substituted runtime.

This is achieved using %EDITTABLE as the Edit table in the Record Field properties of the field which should show values.
%EDITTABLE is replaced with actual record at runtime.

Lets see some scenarios in which we can use Dynamic prompt.
1)  Depending on the type of User, say Employee should see data from one record and if it is manager, he should see the data from another record.
2) In a grid/page , where depending on the value of one field , the prompt values in another field changes.

Demonstration in next post.

Tuesday, February 19, 2013

XML Publisher Migration objects

The following definition types can be added to projects in Application Designer:
  • XMLP Data Src Defn.
  • XMLP File Defn.
  • XMLP Report Defn.
  • XMLP Template Defn.
If the data source for the XMLP report is PS Query or Connected Query, then the query or connected query definition should also be included in the project.

Source: Peopletools 8.50

XML Publisher named as BI publisher in 8.52
 Definition types
BIP DataSource Definitions
BIP File Definitions
BIP Report Definitions
BIP Template Definitions.

Source: Peopletools 8.52

Sunday, February 3, 2013

Calendar integration using ics file in PeopleSoft

To do this , you should have a basic knowledge of iscripts.

Steps to create an icalendar.

Create an HTMLobject which contains icalendar script. The icalendar file (extension: .ics) is accepted most of the calendar programs like outlook etc. It helps us to send the schedules/appointments/meetings/anniversaries etc.

The icalendar script is placed in an HTML object.
After that create an iscript which uses the HTML object to render icalendar functionality.

Below are the snapshots.
 

Below is the ics file output in outlook.

Once the event is saved , we can see the same in outlook calendar as shown below.
This completes the basic icalendar example. We can also modify the ical script to add alarms to alert us on the particular event etc.