Peoplecode Facts - Peoplecode information
Order of Execution of PeopleCode Programs
1. PeopleCode event.
2. Within an event, by level order-as determined by the buffer allocation order.
3. For a given field, first record PeopleCode, then component PeopleCode.
WinMessage
WinMessage should not be used in production. It works for browsers running in a Windows
environment, but it is Windows specific. Use it only during development, then remove or comment out the code before putting it into production. WinMessage is supported for compatibility with prior releases of PeopleTools. New application development should use the MessageBox function instead and is supported for
both Unix and Windows operating environments.
Trace Peoplecode
Here are five ways to start a trace:
• The Trace PeopleCode page - PeopleTools, Utilities, Debug, Trace PeopleCode
• Click the link to set a startup trace on your PeopleSoft sign on page.
• Use the Trace utility on Configuration Manager.
• Include the SetTracePC PeopleCode built-in function in a program.
• Append the trace flags in the process definition parameters to trace process running on the process scheduler.
Only two-tier or three-tier development environment applications (such as an Application Engine program being tested from Windows) can be traced using the Configuration Manager trace panel.
Commenting Peoplecode
Both the REM comments and the /* */ style of comments can span multiple lines. However, the
recommended method is to use the latter (/* ... */), since it can span multiple PeopleCode statements and is
therefore more flexible.
Commented text cannot exceed a maximum of 16383 characters.
As of PeopleSoft 8.4 you can use <* and *> to comment out a block of code that includes nested comments.
Use RowSelect to:
• Prevent a row from loading by using the DiscardRow function.
• Stop loading rows into the buffer by using the StopFetching function.
RowSelect PeopleCode is placed on a record field or component record.
Warnings and errors can be placed in RowSelect but will not be displayed to the user and are not used for that purpose in this event.
Points to remember in Scroll peoplecode
hierarchy of the component buffer/scrolls the way people code should navigate to
1)ROWSET
2)ROW
3)RECORD
4)FIELD
A rowset contains one or more rows
A row contains one or more records And zero or more child rowsets,
And a record contains one or more fields.
sample scroll people code.
First you need to define ROWSET objects:
Local Rowset &LEVEL_0;
Local Rowset &PERFORM;
So now you have to seed or instantiate the Rowset:
&LEVEL0 = GetLevel0();
&PERFORM = &LEVEL0(1).GetRowset(Scroll.SCROLL);
Step through your Rowset.
For &i = 1 To &PERFORM.ActiveRowCount
End-For;
Extract data.
&COMPETENCY =
&PERFORM(&i). SCROLL.COMPETENCY.Value;
Update the data on the grid:
&PERFORM(&i). SCROLL.N_RVW_ACCEPT.Value = “Y”;
Interview questions and answer for Peoplesoft HCM / HRMS
HRMS Fundamentals 9.0
1. What are all the components will have data permission security control access?
• Departtments
• Employee, Contingent Worker, and POI with Jobs.
• POI without jobs.
• Recruiting Federal People with jobs.
• Template based hires.
2. What are all the organisational relationships available while hiring an employee?
• Employee
• Contingent Worker
• Person of Interest (POI)
3. List down the people part of the POI?
• COBRA Participants
• Pension Payees
• Global Payroll Payees
• Stock non-HR Person
• Stock board members
• External Instructor
• Payroll Employees
• External Trainers
4. What are all the People Tools Security?
• Permission List
• Roles
• User Profiles
5. What are all the default programs you need to run after the creating the user profile?
• Refresh SJT CLASS ALL
• Refresh Trans. SJT tables
• Refresh SJT OPR CLS
6. What are all the default Permission List used while creating the User ID?
• Navigator Homepage Permission List
• Process Profile Permission List
• Primary Permission List
Apply Bundles and Patches in Peoplesoft
Following points that you need to know when applying bundles /patches to peoplesoft
- Source Status means the condition of the object from the Source DB perspective; the Source DB is your DEMO.
- Target Status means the condition of the object from the Target DB perspective; the Target DB is usually your DEV or TST environment.
- The status is determined by PS during the compare process by looking at the LASTUPDOPRID of each object type. If the LASTUPDOPRID = ‘PPLSOFT’ the object will have a status of either CHANGED or UNCHANGED. If the LASTUPDOPRID <> ‘PPLSOFT’ the object will have a status of *CHANGED or *UNCHANGED. The other status is ABSENT, meaning the object doesn’t exist in one DB or the other.
- The UPGRADE ACTION is what PS proposes to do with the object; DELETE the object from the Target DB, COPY the object from the Source to the Target DB or COPYPROP, copy properties of the object from the source to the target DB (Look at COPYPROP as the same as COPY).
- The Take action is simply a default action recommended by PS – Upgrade this object or do not Upgrade this object.
- The Copy Done flag simply indicates if the object has been copied, these values are reset when a project is copied from one DB to another.
- If the object has a source / target status of CHANGED / *CHANGED, 9 times out of 10 you should go with the PS object overwrite. This means a customization will be overwritten; however, you know your customizations better than you know the changes PS is making so it is usually much easier to reapply customizations rather than apply new PS changes to your customized object.
- If the object has a status combination of ABSENT / *CHANGED – unless you KNOW this is a bolt-on, in which case it would not be in the project to begin with, you should DELETE the object. If you do not delete objects that PS wants to delete, especially PeopleCode and RecFields, it can make the system very unstable, pages won’t pull up, error out, etc …
Integration Broker Domain List
These data are populated automatically each time when a new appserver domain connects to the same database which is represented by the correspondent PIA.
Just in case if you are interested to know where exactly those data reside at back end...
The Integration Broker Quick Configuration page where you see those domains the data come from the view named PSIBDOMSTAT3VW, and that that view in turn takes them from the table PSAPMSGDOMSTAT.
So ultimately PSAPMSGDOMSTAT is the table which holds these information.
Heap size for the Change Assistant
Sometimes when we import BIG package the default heap size for the Change Assistant will need to be increased in order to show the template (xml file).
Please follow the steps below to increase the heap size. This must be done before you open Change Assistant to apply the package:
1. Right click on the CA shortcut that you use to launch CA.
2. Choose Properties...
3. In the Target text box append -Xmx300m should look like "C:\Program Files\PeopleSoft\Change Assistant\changeassistant.exe" -Xmx300m
Application Class Navigation and Drilldown
A productivity issue of navigating from one method in one class to another method in another class while developing the code has always existed.
With the application class navigation and drilldown feature developers are just one click away from any application class program or method called within another line of PeopleCode.
Users has to wait for 8.50 to use this feature.
Peoplesoft - Connected Query
One of biggest disavantage of the PSQuery it cannot have the nested result set like a row set.
Which on makes in not good option for the complex reports especailly BI Publisher.
The new feature will make this happen
PeopleTools 8.50 includes a new feature that will allow users to connect or join multiple queries to produce a single output file. Joined queries can represent parent-child data relationship, nested data or even unrelated data. This feature will be useful to customers in a number of ways:
Prepare an XML output file that contains nested PeopleSoft data for use in an XML Publisher report. This will allow XML Publisher to produce complex reports from the PeopleSoft system through the use of a "sub-report" type of feature.
• Provide PeopleSoft data to external systems that represent nested data relationships.
• Connected Queries can be scheduled and are also PeopleSoft Managed Objects
Query Feeds
Reports in Feeds - The new way to access reports in peoplesoft.
As of PeopleTools 8.50, all PSQuery objects can be defined as the source of an RSS feed. This will allow users to define a feed from a particular set of PeopleSoft data. Once a feed is defined, the user can simply subscribe to the feed and gain access to the data through a standard feed reader – something like Microsoft Outlook, Mozilla Thunderbird or their browser.
Queries are probably the best mechanism for users, departments or entire organizations to create standard definitions of reusable PeopleSoft data. Combining this capability with the PeopleTools RSS Feed architecture enables our customers to provide their users access to system data without requiring them to actually login to the system directly.
Access to query data always requires user-level validation, so even when being read in a Feed Reader, customers know that their critical data is secure.
Web Profile Configuration - auditPWD
This page enables the use of web profile properties, for each property, you enter the property name, select its validation type, and provide the appropriate property value. The validation type ensures that the property value that you enter is the correct format.
One such Custom Property is...
This property enables certain debug and control settings...
# http://[server]/psp/[site]/?cmd=viewsprop&pwd=[password] — Displays session properties
Repeat header on each page doesn' work for RTF output
You are using "repeat as headline on each page" in a template
to generate the header on each page of a report.
However, with RTF output the header is not being generated on each page.
CauseBug <6270261> ER: RTF OUTPUT TO SUPPORT SET TABLE HEADER REPEAT, TABLE ROW KEEP-TOGETHER.
SolutionTo implement the solution, execute the following steps:1. Apply patch <7702372> plus any pre-requisite patches included in the readme file.2. Retest for the issue
XML Publisher code for XMLDoc Data source
import PSXP_XMLGEN:*;
import PSXP_RPTDEFNMANAGER:*;
Component string &FilePath;
Local Rowset &rsStg; /*Staging record rowset*/
Local PSXP_RPTDEFNMANAGER:ReportDefn &oRptDefn;
Local PSXP_XMLGEN:RowSetDS &oDS;
Local File &filXsdOutput, &filXmlOutput;
&filXmlInput = "//usr/local/psft/cny/dev/hc900/datafiles/" "Report_" CU_R239_FW_AET.PROCESS_INSTANCE ".xml";
/* Publish report */
&sReportname = "CU_R239_FW";
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&sReportname);
&oRptDefn.Get();
&oRptDefn.SetRuntimeDataXMLFile(&filXmlInput);
If CU_R239_FW_AET.CU_REPORT_TYP = "A" Then
&oRptDefn.ProcessReport("CU_R239_FW_4", "ENG", %Date, "PDF");
Else
If CU_R239_FW_AET.CU_REPORT_TYP = "B" Then
&oRptDefn.ProcessReport("CU_R239_FW_5", "ENG", %Date, "PDF");
Else
&oRptDefn.ProcessReport("CU_R239_FW_6", "ENG", %Date, "PDF");
End-If;
End-If;/* send output to destination */
&oRptDefn.Publish("", "", "", CU_R239_FW_AET.PROCESS_INSTANCE);
BI Publisher performance issues
BI Publisher performance dependent on the Data source that is selected.
1 ) XML File Data Source ( XML File)
2) XMLDoc Data Source ( Peoplecode string - XML file )
3) Rowset Data Source (XMLDoc - Peoplecode string - Xml file)
4) PSQuery Data Source (Rowset - XMLDoc - Peoplecode string - Xml file)
XML File data source has better performance and PSQuery being the least as it has more conversion steps.
Verify Node Password
Integration Broker - Node Password:
One method that i use to verify the Node Password.
1. Set the password to desired value for some un-used node.
2. Compare the encrypted value of the unused Node Password & the Node for which you want to check the password using the below SQL.
select IBPASSWORD from PSMSGNODEDEFN where MSGNODENAME='
Peoplecode to Create BI publisher XML and XSD Data source file.
import PSXP_RPTDEFNMANAGER:*;
import PSXP_XMLGEN:*;
&rs = create PSXP_XMLGEN:RowSetDS();
&rsStg = CreateRowset(Record.STAG_REC);
&rsStg.Fill();
/*Create Schema*/
&mySchema = &rs.GetXSDSchema(&rsStg);
&f1 = GetFile("STAG_XSD.xsd", "W", %FilePath_Relative);
&f1.WriteLine(&mySchema);
&f1.Close();
/*Create Sample XML File*/
&myXMLFile = &rs.GetXMLData(&rsStg, "CU_Add_XSD.xsd");
&f2 = GetFile("STAG_XML.xml", "W", %FilePath_Relative);
&f2.WriteLine(&myXMLFile);
&f2.Close();