PeopleSoft HRMS 1 For PeopleSoft 8 Version 1.0
PeopleSoft HRMS
QUESTIONS
PeopleCode Statements
Navigation
Understanding PeopleCode Events
Component Processor Flow
PeopleCode Language
Objects and Classes in PeopleCode
Methods And Built-In Functions
Referencing Data In Component Buffer And Data Buffer
PeopleCode Related to Internet Architecture
PeopleCode Built-In Functions And Classes
Miscellaneous Functions
PeopleSoft HRMS
3 Chapter 1: PeopleCode Statements
1. What are the various definitions (places) where you can attach PeopleCode programs?
Record field, page,
component,
component record,
component record field, menu
2. What are the various places from where you can access Record Field PeopleCode?
3. How many PeopleCode events are associated with a Record Field?
15 events
4. What are the various events associated with Component Record Field?
FieldChange
FieldDefault FieldEdit PrePopup
5. What are the various events associated with Component?
PreBuild PostBuild SavePreChg Workflow SavePostChg
6. How do you access events associated with a Component?
Open component ->Go to Sturcture tab ->Right click on Component name->View peoplecode
7. If the parent is a component for which the PeopleCode editor is opened then what are the child definitions where you can attach PeopleCode?
PeopleSoft HRMS
Page peoplecode.
8. What is the restriction for attaching PeopleCode to menu items?
9. What is the PeopleCode event associated with a Page?
Page Activate event
10. When can you attach PeopleCode with a push button? What are the events that are triggered with a push button action?
Fieldchang,Fieldedit
11. What are the different types of Component Record Event – sets?
FieldChange
FieldDefault FieldEdit PrePopup
12. Can you attach Page PeopleCode to Secondary Page and Sub-Page?
We can attach peoplecode to secondary page,but not to sub page.
13. What are the events associated with Menu Item attached to a page?
PeopleSoft HRMS
5 Chapter 2: Navigation And PeopleCode Editor
1. If a Record contains 7 fields, then how many PeopleCode editor windows can be opened for the various fields?
Only one
2. When working inside the PeopleCode editor how would you know what all events for that particular child, have PeopleCode associated (written) with them?
In appliaction designer PeopleCode Display mode contains a column for each PeopleCode program type and specifies whether a program exists
3. How many PeopleCode editors can be opened in object workspace?
Only one
4. How do you format your program in PeopleCode editor?
by clicking the Validate syntax button on toolbar or by saving the same program
5. PeopleCode statements are case insensitive. True/False. If true then how do you make them case sensitive?
Not case sensitive
6. Can two Editor windows for the same parent or for any two of its child definitions be opened simultaneously?
NO
7. How can you validate the whole project?
Go to Application Designer Select Tools ---> Validate Project.
8. What is the benefit of dragging and dropping an object definition from Project Workspace into Object Workspace?
PeopleSoft HRMS
Chapter 3: Understanding PeopleCode Events 1. When does Page activate event fire?
When page loads
2. When you attach a WinMessage(“hello “ | “ Hi”); to a sub-page in its activate event what will happen? Can this WinMessage work?
No,bcz peoplecode does not work at sub page activate.
3. What are the various places a FieldChange event can be triggered for a particular field?
Record field
4. When a default is set for a field in the record field properties and a default is given programmatically in the field default event then which one will take precedence and why?
Ofcourse,default set in the record field properties,because at the time of page loads default value gets assigned and after that peoplecode gets executed.
5. What are the events that get triggered when a field is changed?
a.Fieldedit,fieldchenge,saveedit,saveprechange,workflow,savepostchange
6. Which event is triggered when a popup menu is accessed?
ItemSelected
7. A menu has 2 PeopleCode events associated with it. Which are they?
1.Itemselected,PreoPopup
8. If a popup menu is attached to a page then how do you control it in the pre-popup event?
Using peoplecode functions CheckMenuItem, DisableMenuItem,
EnableMenuItem, HideMenuItem, and UncheckMenuItem etc.
9. When does a RowInit event fire?
•Triggered the first time the Component Processor encounters a row of data,ie, it occurs during Component Build Processing and RowInsert Processing.
PeopleSoft HRMS
7 10. When does RowInit event not fire?
in some cases, the record can be initialized entirely from the keys for the
component. When this happens, RowInit PeopleCode is not run
11. When does a row insert event fire?
12. If you insert a row and save the page without making any changes then what happens at the backend?
Newly inserted row gets deleted.
13. When you insert 2 rows and without entering any values in the fields of the first row and entering some values for the second row, if you save the changes what happens at the backend?
First empty row will get deleted .
14. What is the basic difference between SaveEdit and FieldEdit?
SaveEdit is used to cross validates page fields ,checking consistency among page field values.
FieldEdit is used to validate page fields and SaveEdit is used to validate component fields.
15. What is the last event where PeopleCode can be used to change the data of the fields on the page before updating takes place on the database?
SavePrechange
16. When does SearchInit event fire? Where should you attach the code for this event?
SearchInit PeopleCode is performed before the search record dialog box is displayed. It provides a way to control processing before an operator enters values in the search key & alternate search key fields.
17. When does SearchSave event fire? Where should you attach the code for this event?
SearchSave PeopleCode is performed after the operator selects the OK button in the search record dialog box. The most common use of this PeopleCode event is to force the operator to input at least one field into the dialog box.
PeopleSoft HRMS
18. Search for the backup of your PeopleCode program and indicate where the copy is saved. When is the automatic backup file created?
The file is saved to your temp directory (as specified in your environment), in a file with the following name:
PPCMMDDYY_HHMMSS.txt
where MMDDYY represents the month, date, and year, respectively, of the checkpoint, and HHMMSS represents the hour, minute, and second, respectively
19. How do you copy PeopleCode programs?
20. What is the basic difference between FieldChange and FieldEdit?
21. If code is written in Record Field FieldChange and
Component Record Field FieldChange of a field then what will be the order of firing of these two events?
PeopleSoft HRMS
9 Chapter 4: Component Processor Flow
1. If a code is written in Record Field FieldChange and Component Record FieldChange, what will the end user see?
Record Field Change
2. If a field has a default value set in its record field property and if a code is written to set the default values which of the two values do you think will appear in the field?
3. A page has a record A at level 0 (parent level) and a record b at level 1 (scroll area and child level), if SaveEdit event of a field in both record has PeopleCode program written in them, also component record has PeopleCode written for both the records then what will be the order of the events firing?
4. FieldDefault event will always fire. True/False.
This is true if there is no default specified, if a null value is specified, or if a 0 is specified for a numeric field
PeopleSoft HRMS
Chapter 5: PeopleCode Language
1. What are the different conventional data types?
Any,Boolean,date,datetime,float,integer,number,string,time
2. What are the different user-defined declaration types and what are their life spans?
3. What is the data type of the variable, which is not declared?
4. If an undeclared variable is assigned a string value and subsequently assigned a numeric value then what is the error that occurs?
It will save numeric value.
5. If a variable is defined as a string data type and if you try to assign it a numeric value then will it work?
No,it will give error left side string data type not match with right side numeric data type.
6. If you have a Boolean variable and want to make it true then which one should generally be used?
Local Boolean &bool; &bool = “True”;
OR
&bool = “True”;
2nd one.because at first one as we defined &bool as Boolean, we r assigning it string value.So, it will not work
7. How do you differentiate between system variables and user-defined variables?
8. If you have a component level variable and you want to use it in different records in the same page then where all would you have to define them?
9. Global variables should not be used generally. What other thing can you use to suffice the functionality of the global variable?
We can use component variable.
PeopleSoft HRMS
11 10. What is the basic disadvantage of using global variables? Use global variables rarely, because they are difficult to maintain.
Global variables are not available to a portal or applications on separate databases 11. What is the maximum length of a field definition? 254
12. What is the data type of a date and integer addition?
date
13. How would you subtract days from a given date?
Date1-date2
14. How would you check whether the date field is blank or not? 15. What is the use of @ operator?
@operator converts string into defintion reference.
Chapter 6: Objects And Classes in PeopleCode
1. How can you instantiate an object? What is the difference between GET and Create?
2. Can you pass PeopleCode objects as function parameters? 3. Can you use ObjectGetProperty in all events?
4. Which one of the following is proper (REC – Record, FLD-Field):
FLD1 = REC.GetField(Field.FLD); o &Value = FLD1.Value;
&Value = REC. GetField(Field.FLD).Value; &Value = REC.FLD.Value;
5. What will be the result:
Local array of number &ARR1; Local array of string &ARR2; &ARR1[1] = 10;
&ARR1[2] = 20; &ARR2 = &ARR1;
PeopleSoft HRMS
13 Chapter 7: Methods And Built-In Functions
1. What are Think Time Functions? They should not be used in which events and why?
"Think-time" functions suspend processing either until the user has taken some
action (such as clicking a button in a message box), or until an external process
has run to completion (for example, a remote process).
Think-time functions should be avoided in any of the following PeopleCode
events:
· SavePreChange
· Workflow
· RowSelect
· SavePostChange
Violation of this rule can result in application failure.
2. How can you use WinMessage in SavePreChange?
3. What happens when you try to access a field that is not in the data buffer?
4. Where Can You Attach DoSave?
FieldEdit, FieldChange, or MenuItemSelected
5. Which is the earliest event in which you can use GetGrid? Why?
PageActivate event. Peoplesoft builds the page grid one row at a time. For
that,Gird class is used to build the complete grid.We can not attach peoplecode
which uses Grid class before grid is build.So,earliest event use for getgrid is Page
Activate event
.
PeopleSoft HRMS
6. Which is the earliest event in which you can use GetPage?
GetPage
Syntax
GetPage(PAGE.pagename)
Description
Use the GetPage function to return a reference to a page object. Generally, page objects are used to hide or unhide pages in a component.
Note. The page object shouldn’t be used until after the Component Processor has loaded the
page: that is, don’t instantiate this object in RowInit PeopleCode, use it in PostBuild or Activate instead
PeopleSoft HRMS
15 Chapter 8: Referencing Data In Component Buffer
And Data Buffer
1. What are the two Ways Of Referring to data in Component Buffer?
2. What is a Rowset? What is a Row?
3. If there is Level 0, Level 1and Level 2 in a page then what is the processing order in contextual reference?
4. What is the difference between GetRowset()(1) and GetRowset().GetRow(1).
5. Consider the code
&Var = &Row.GetRecord();
What will be the content of &Var?
6. Write a code to access DELIVERY ID that is in level 3 of TRG_DELIVERY_TBL page.
7. Write a code to access all the PRODUCT_ID in TRG_ORDER_TBL page. Hint – use loop.
PeopleSoft HRMS
Chapter 9: PeopleCode Related to Internet Architecture 1. Why should you use deferred processing mode?
2. Why should you avoid FieldEdit and FieldChange event if your application is to be designed for Internet?
3. What happens when Internet Architecture application calls a client-only PeopleCode function at runtime?
PeopleSoft HRMS
17 Chapter 10: PeopleCode Built-In Functions And Classes
1. What type of array is declared by the definition Local Array &ARR1;
2. How will you declare a three dimensional array of numbers? 3. How can you read values from an array?
4. Suppose there is a following binary code in which 0 is used as separator. How will you separate this code into elements?
Code: 1101111010101011
5. How will you print all the elements of an array?
6. Will ComponentChanged fire if there are no changes in the current page and a new page is called using DoModal/TransferPage?
7. If a parent record is deleted then its child record is also deleted. Is vice versa also true?
8. In which event is PriorValue function generally used?
9. Will this code set the required cursor position? Give reason? &Num = TRG_QUANTITY; &Cost = &NUM * 10; If &Cost > 100 then Error(“TRANSACTION FAILED”); SetCursorPos(); End-If;
10. On which types of fields can you use SetDisplayFormat function?
11. What is the difference between GetLevel0() and GetRowset(). 12. Can you add dynamic tree control on Level 2 of a page?
13. Consider the following code:(level0 – Record0, Level1- Record1)
&TREENODE = GetSelectedTreeNode(Record. Record0); &PARENT_NODE = GetTreeNodeParent(&TREENODE); &Value = GetTreeNodeValue(&PARENT_NODE,
TRG_ORDERS.TRG_ORDER_ID); What will be value of &Value?
14. What is the difference between DoSave() and DoSaveNow()? 15. How will you implement (When statement1 And Statement2) in
Evaluate Statements?
16. How can you create a new URL identifier?
17. What happens when SetDefault is used and Default values are not provided in that field?
PeopleSoft HRMS
18. Can one modal component call another modal component? 19. What is the difference between Transfer and TransferPage? 20. Can you enable a field that is disabled through Page Field
Properties of that field?
21. In which event can we write ClearSearchDefault?
22. In which events you can attach SQL statements that cause database updates?
23. Suppose your functions demands that the user should re-enter the password. How can you attain this?
PeopleSoft HRMS
19 Chapter 11: Miscellaneous Functions
1. What are the System variables available for current date and time?
2. What are the different %mode options?
PeopleSoft HRMS
Chapter 12: Debugger
1. How many application designer sessions can be simultaneously
run?
2. How many Debugger sessions can be run?
3. How many components can be debugged in a given session? Is
there any limitation?
4. What are break points and how do you set them? 5. How do you remove the break points?
6. How would you keep a break point inside a comment?
7. If the break points are set at the start of programs, then how many windows will be opened for the Debugger session?
8. If you lose the current execution location of the PeopleCode Program then how would you search where the PeopleCode is currently running?
9. What is the basic difference between the Step and Step Over options available with Debugger?
10. How do you jump from one break point to another?
11. When you abort the PeopleCode debugger session then what happen to the programs?
What is the error that you get?
12. What are the various variable panes available in PeopleCode?
13. Suppose you want to know where all you have written WinMessage command, then how do you do it?
PeopleSoft HRMS
21
1 What are the events associated with Menu Item attached to a page? ItemSelected and PrePopup PeopleCode
2. What are the various places a FieldChange event can be triggered for a particular field? Record Field FieldChange and Component Record Field FieldChange
3. What are the events that get triggered when a field is changed?
a. Fieldedit,fieldchenge,saveedit,saveprechange,workflow,savepostchange 4. Which event is triggered when a popup menu is accessed?
ItemSelected
5. A menu has 2 PeopleCode events associated with it. Which are they?
6. If a popup menu is attached to a page then how do you control it in the pre-popup event? Using peoplecode functions CheckMenuItem, DisableMenuItem, EnableMenuItem,
HideMenuItem, and UncheckMenuItem etc. 7. When does a RowInit event fire?
•Triggered the first time the Component Processor encounters a row of data,ie, it occurs during Component Build Processing and RowInsert Processing.
•RowInit is often paired with FieldChange peoplecode 8. When does a RowInit event not fire?
in some cases, the record can be initialized entirely from the keys for the component. When this happens, RowInit PeopleCode is not run
9. Search for the backup of your PeopleCode program and indicate where the copy is saved. When is the automatic backup file created?
The file is saved to your temp directory (as specified in your environment), in a file with the following name:
PPCMMDDYY_HHMMSS.txt
where MMDDYY represents the month, date, and year, respectively, of the checkpoint, and HHMMSS represents the hour, minute, and second, respectively
10. How do you copy PeopleCode programs? simple
11. If code is written in Record Field FieldChange and Component Record Field FieldChange of a field then what will be the order of firing of these two events? Record Field FieldChange then Component Record Field FieldChange
12. If a code is written in Record Field FieldChange and Component Record FieldChange, what will the end user see?
PeopleSoft HRMS
13. FieldDefault event will always fire. True/False.
This event is initiated on all page fields as part of many different processes; however, it triggers PeopleCode programs only when the following conditions are all true:
The page field is still blank after applying any default value specified in the record field properties. This is true if there is no default specified, if a null value is specified, or if a 0 is specified for a numeric field.
The field has a FieldDefault PeopleCode program
14. What is the data type of the variable, which is not declared? auto-declared
15. If you have a component level variable and you want to use it in different records in the same page then where all would you have to define them?
PeopleSoft HRMS
23 01. What is the purpose of temperory record and state record?
1a. Temp.record does not have a physical existence whereas state record has.
Temporary Records store the Transient or intermediate results during a program run.
In a state record only a unique line is stored for a process instance. 02. What the events of components and when /why are they used? 2a. SaveEdit, save postchg, prebuild, workflow
Saveedit is used while saving the component. This event is used for validating the consistency of the data in Component fields.
Any post save related updations are carried out in savepost chg event. i.e. for all those records which requires an updation but not present in the component.
The PreBuild event fires before the rest of the component build events. This event is often used to hide or unhide pages. It’s also used to set component variables.
The main purpose of Workflow event is to segregate peoplecode related to workflow from rest of the applications peoplecode 03. Why use work records when we have variables?
3a. work record is by default declared globally and can be attached to any field,
whereas a variable is a temporary memory allocation and scope of the same can be Local or global.
04. What does session object signify in the CI?
4a. it connects to a session on peoplesoft application server. 05. What are the common sqc's? why are they used?
5A. CURDTTIM.SQC, DATETIME.SQC, PRCSAPI.SQC, PRCSDEF.SQC, READXLAT.SQC, GETSELCT.SQC, TRANCTRL.SQC, EOJ.SQC
06. What is the difference between Do Select & a Do When?
6A. DO select action can be reselected and restartable whereas do when does not have such options.
07. What is Component Buffer?
7a. the area in memory that stores data for the currently active component.
PeopleSoft HRMS
08. What are the frequently used SQC? 8a.
#INCLUDE 'SETENV.SQC' - SET ENVIRONMENT PROCEDURE #INCLUDE 'SETUP02.SQC' - PRINTER AND PAGE-SIZE INITIALIZATION
#INCLUDE 'SQRTRANS.SQC' - SET TRANSLATION PARAMETERS
#INCLUDE 'BILASER.SQC' - PRINTER DEFINITION (HP LASER OR LINEPRINTER)
#INCLUDE 'PRCSDEF.SQC' - DEFINE-PRCS-VARS PROCEDURE #INCLUDE 'PRCSAPI.SQC' - GET-RUN-CONTROL-PARMS
PROCEDURE
#INCLUDE 'RESET.SQC' - RESET PROCEDURE
#INCLUDE 'CURDTTIM.SQC' - GET-CURRENT-DATETIME PROCEDURE
#INCLUDE 'NUMBER.SQC' - ROUTINES TO FORMAT NUMBERS
#INCLUDE 'DATETIME.SQC' - INIT-DATETIME PROCEDURE #INCLUDE 'EOJ.SQC'
09. Use of SQLExec?
9a. It creates an sql command within the peoplecode program that bypasses component processor and directly interacts with the dtbase to Insert Update or delete.
10. What is dynamic view?
10a. dynamic view is a normal sql view consisting of Meta-Sql constructs.
11. What is the difference between fieldchange and fieldedit?
11a. FieldChange PeopleCode is used to recalculate page field values, perform other processing
that results from a field change other than data validation. Also validates the contents of the field.
FieldEdit PeopleCode is used to validate the contents of a field, supplementing the standard system edits.
12. What is Page Activate Event?
12a. It's an event which fires everytime when the page gets activated. 13. Actions in Application engine. Different types of application
PeopleSoft HRMS
25 14. Name the joins used in sql.
14a. Equi-join, Outer-Join, Inner-Join.
15. How to open a secondary page through the peoplecode? and how do refer the fields in the secondary page?
15a. Using the Do Modal Function we can open the Secondary Page thru PeopleCode.
16. Sequence of execution of events in peoplecode?
16a. Record.Field Edit ---> Component.Record.Field Edit --->
Record.Field Change ---> Component.Record.Field Change ---> 17. Field Length of Translate value.
17A. Character 1 to Character 4
18. Difference between prompt table and translate table.
18a. A Translate Table stores Field values which consists of a relatively small,
static set of values that are not maintained by the user whereas in case of Prompt Table the data dictionary is maintained by the user. 19. Use of effective date.
19a. A method of dating information in PeopleSoft applications. You can predate information to add historical data to your system, or postdate information in order to enter it before it actually goes into effect.
By using effective dates, you don't delete values; you enter a new value
with a current effective date.
20. Type of tables are allowed as a state records in AE.
20a. Derived work records or Physical records can be used as State Records in AE.
21. Which fields will be loaded into component buffer if a component is opened?
i.e. if there are 10 fields in a record and only 3 fields are placed on the page.
then all the remaining fields will be available in the component buffer or only those fields
which are placed on the component?
PeopleSoft HRMS
22. How do retrieve/assign a record field which is not placed in the component.
22a.By Creating an Object of the same. 23. Types of sql objects used in peoplecode.
23a. Normal/Application engine and Record View
01. What are the various definitions (places) where you can attach PeopleCode programs?
1a. All record/ Message/ Page/Menu related events.
02. What are the various places from where you can access Record Field PeopleCode?
2a. we can access the same from any event provided the event people code is declared accordingly.
03. How many PeopleCode events are associated with a Record Field? 3a. Fifteen events
04. What are the various events associated with Component Record Field?
4a. The various events associated with Component Record Field are Field Default, Field Edit, Field Change and Pre-Popup
09. What is the PeopleCode event associated with a Page? 9a. Page activate
10. When can you attach PeopleCode with a push button? What are the events that are triggered with a push button action?
10a. When a Push Button is tagged to a derived record peoplecode can be llinked to it.
recordfield field change event is triggered with a push button action. 13. What are the events associated with Menu Item attached to a page?
13a. ItemSelected event is associated with Menu Item attached to a page.
01. If a Record contains 7 fields, then how many PeopleCode editor windows can be opened for the various fields?
PeopleSoft HRMS
27 02. When working inside the PeopleCode editor how would you know what all events for that particular child, have PeopleCode associated (written) with them?
2a. In appliaction designer PeopleCode Display mode contains a column for each PeopleCode program type and specifies whether a program exists
03. How many PeopleCode editors can be opened in object workspace? 3a. Only one.
04. How do you format your program in PeopleCode editor?
4a. by clicking the Validate syntax button on toolbar or by saving the same program.
05. PeopleCode statements are case insensitive. True/False. If true then how do you make them case sensitive?
5a. Not case sensitive.
06. Can two Editor windows for the same parent or for any two of its child definitions be opened simultaneously?
6a. No
07. How can you validate the whole project?
7a. Go to Application Designer Select Tools ---> Validate Project. 08. What is the benefit of dragging and dropping an object definition from Project Workspace into Object Workspace?
8a. drag and drop from project window. 25. Name the objects used in peoplecode.
25a.The various objects used in peoplecode are Records, Fields, SQL, Components, Pages, Menu.
07. If the parent is a component for which the PeopleCode editor is opened then what are the child definitions where you can attach PeopleCode?
7a. PeopleCode can be attached to the related Pages and Records of that component.
11. What are the different types of Component Record Event – sets? 11a.The different types of Component Record Event-Sets are
RowDelete, RowInit, RowInsert, RowSelect, SaveEdit, SavePostChg, SavePreChg, SearchInit, SearchSave
PeopleSoft HRMS
12. Can you attach Page PeopleCode to Secondary Page and Sub-Page? 12a. yes
32. How many scrolls can there be on a page?
32a. Level0 (Non-Scrolling), Level1, Level2, Level3, Level4 36. How to refer a field value in Scroll level three?
36a. &FLD2 =
GetLevel0().GETROW(1).GetRowset(Scroll.PCS_BSS_LVL_R).GETROW( 1).GetRowset(Scroll.PCS_BSS_LVL_R1).GetRow(&I).GetRecord(Recor d.PCS_BSS_LVL_R1).GetField(Field.ADDRESS);
28. In a Do Select when using a Restartable AE what care shoud be taken by the programme while writting the code?
28a.Suppose the Do select Returns 10 rows and AE continues its
processing then program is aborted at 5th row. Next time when the AE is restarted care should be taken that it should start at Row no. 5 08. What is the restriction for attaching PeopleCode to menu items? 06. How do you access events associated with a Component?
27. What are the various append modes for a file? how will you append in the beginning?
29. Can work records be used in a Reselect?
31. Can we make use of work records and still make it restartable? 34. If you get an error in SQR log inspite of you getting the report output;what type of error is it & why?
PeopleSoft HRMS
29
SQR
1. What are the common SQC’s used in Report
#INCLUDE 'USEPRNTR.SQC'
#INCLUDE 'SQRTRANS.SQC' ! SET TRANSLATIONS #INCLUDE 'NUMBER.SQC' ! FORMATS NUMBERS
#INCLUDE 'CURDTTIM.SQC' ! GET-CURRENT-DATETIME PROCEDURE #INCLUDE 'DATETIME.SQC' ! ROUTINES FOR DATE AND TIME FORMATTING #INCLUDE 'PRCSAPI.SQC' ! UPDATE PROCESS REQUEST API
#INCLUDE 'PRCSDEF.SQC' ! UPDATE PROCESS REQUEST VARIABLE DECLARE
#INCLUDE 'GETSELCT.SQC' ! FORMAT INPUT VARIABLES #INCLUDE 'RESET.SQC' ! RESET PRINTER PROCEDURE #INCLUDE 'EOJ.SQC'
2. How many section are available in SQR
4 SECTIONS : Setup , Heading , Body and Footing
3. Which is the Required Section in SQR
Body Section
4. What is difference between Begin-Report and Begin- Program.
Both commands are technically Same and used at starting of body section. Begin-report is a command used in older version of SQR. In new version of SQR though it support begin-report command, it does not work well with sqr’s new functionality.
5. Can you write Select statement in Begin-SQL Section NO
Only non-SELECT (like UPDATE , INSERT ) statements can be used (except
SELECT INTO for SYBASE and
Microsoft SQL Server). Columns and variables can be referenced in the SQL statements.
6. How do you call the procedure in SQR
PeopleSoft HRMS
7. What is the difference between Display and Show command The DISPLAY command (One field on one line ) can be used to
display data to a terminal. If you wish to display more than one field on the same line, use NOLINE on each display except the last.
If you require more control over the display, use the SHOW command.
display ‘You owe ‘ noline display #taxes money noline display ‘ in back taxes.‘
Produces the following output:
You owe $123,456.78 in back taxes.
Show : Displays one or more variables or literals on the screen. show ‘You owe ‘ #taxes money ‘ in back taxes.‘
Produces the following output:
You owe $123,456.78 in back taxes.
8. Can you print the result on one line using Display command.
YES . Use Noline command
9. What are the parameters required to connect the database using SQR
-DBdatabase –Dbconnectionstring
( : Databasename, dsn name, userid, password )
( BEGIN-SQL -DBMANTHAN -DB' DSN=MANTHAN; UID=psinterface; PWD=interface'
!INSERT INTO INTERFACE_STATUS (PROCESS_ID,…. )
10. Can you tell us the SQR report execution flow using Process Scheduler.
PeopleSoft HRMS
31
( The PRINT command places text in memory, not on paper.SQR for
PeopleSoft always prepares a page in memory before printing it to paper, performing the body first, then the
HEADING and FOOTING sections )
11. What are the type of variable used in SQR G
Glloobbaall//LLooccaall VVaarriiaabbllees s
SQR procedures that contain variables which are visible throughout the
program are called global procedures. In contrast, procedures that takes arguments, such as the spell_number procedure in this chapter‘s check-printing sample code, are local procedures. In SQR, any procedure that
takes arguments is automatically considered local. We recommend that
you declare a procedure as local even if it does not take any arguments. Simply place the keyword LOCAL after the procedure name in the
BEGIN-PROCEDURE command.
To reference a global variable from a local procedure, insert an underscore between the prefix character (#, $, or &) and the variable name.
Variables in global procedures are visible throughout the program.
· Variables in local procedures are visible only within the procedure. · To reference a global variable from a local procedure, place an underscore between the prefix character #, $, or & and the variable name.
· To pass an argument back to its calling procedure, preface it with a colon.
12. What is the difference between LET and MOVE command Both are assignment stmts. Let allows you to build
Expressions like addition subtraction etc. Move does not allow that. MOVE is used when value of one variable is assigned to another variable and both variables are of different Datatype.
13. What is the use of ON-BREAK.
the ON-BREAK option of the PRINT command accomplishes two related
PeopleSoft HRMS
state only when its value changes. Note that ON-BREAK works as well for
implicit as for explicit PRINT commands,
14. What is the purpose of -F flag and –O flag
-O[file] Directs log messages to the specified file or to program.log if no file
is specified. By default, the file sqr.log is used in the current working directory.
15. What is the difference between ASK and INPUT command.
ASK command in the SETUP section prompts the user at compile time.
The value that the user enters is placed in a special kind of variable called a
substitution variable. This variable can be used to substitute any command,
argument, or part of a SQL statement at compile time.
The ASK command can only be used in the SETUP section. ASK commands
are always performed at compile time before program execution begins. Therefore, all ASK commands are performed before any INPUT command is performed.
INPUT is more flexible than ASK. You can use INPUT inside loops. You
can validate the length and type of data input and reprompt if it is not valid.
ASK can be more powerful. Substitution variables set in an ASK command
let you modify commands that are normally quite restrictive.
16. What is Load-Lookup
(Use LOAD-LOOKUP to simplify joins , for better performance )
With LOAD-LOOKUP, you can reduce the number of tables that are joined in one SELECT. This command is used in conjunction with one or more LOOKUP commands.
The LOAD-LOOKUP command defines an array containing a set of keys and values and loads it into memory. The LOOKUP command looks up a key in the array and returns the associated value. In some programs, this technique will perform better than a conventional table join.
PeopleSoft HRMS
33 LOAD-LOOKUP retrieves two fields from the database, the KEY field and the RETURN_VALUE field. Rows are ordered by KEY and stored in an array. The KEY field must be unique and contain no NULL values. When the LOOKUP
command is used, the array is searched (using a "binary" search) to find the
RETURN_VALUE field corresponding to the KEY referenced in the lookup.
e.g. begin-setup load-lookup name=prods table=products Key=product_code return_value=description end-setup ... begin-select order_num (+1,1) product_code
lookup prods &product_code $desc print $desc (,15)
from orderlines end-select
Which is faster, a database join or LOAD-LOOKUP?
It depends on your program. LOAD-LOOKUP improves performance in the following situations:
· When it is used with multiple SELECTS.
· When it keeps the number of tables being joined from exceeding three or four.
· When the number of entries in the LOAD-LOOKUP table is small compared to the number of rows in the SELECT, and they are used often.
· When most entries in the LOAD-LOOKUP table are used.
17. What is the relevance of –ZIF and –ZIV flags
-ZIF{file} Sets the full path and name of the SQR initialization file, SQR.INI. -ZIV Invokes the SPF Viewer after generating program.spf file. This flag
Implicitly invokes the -KEEP flag to create program.spf. In case of Multiple output files, only the first report file will be passed to the Viewer.
PeopleSoft HRMS
18. What prcsapi.sqc written
#INCLUDE 'PRCSAPI.SQC' ! UPDATE PROCESS REQUEST API
19. Can you override the setting in SQR
===============================
Application Designer
1. What is the difference between SQL view and Query view
SQL View
It is SQL table created in the database which includes fields from one or more SQL tables that are reorganized into a different sequence. This provides an alternate view of information that is stored in tables Query View
Select to define the record definition as a view that is constructed using the PeopleSoft Query tool. Before you can create the view, PeopleSoft
Application Designer prompts you to save the definition.This has nothing to do with PS query.
It makes available to the user a template by which he can construct script simply by dragging the fields and by adding the necessary criteria.
.
2. What is dynamic view
It is a record definition that can be used like a view in pages and PeopleCode, but is not actually stored as a SQL view in the database. Instead, the system uses the view text as a base for the SQL Select that is performed at runtime. Dynamic views can provide superior performance in some situations, such as search records and in PeopleCode Selects, because they are optimized more efficiently than normal SQL views
3. What is the difference between Search key and Alt search key Key Select to identify the field as the search criteria that uniquely
identifies each row. You cannot have duplicate values for primary keys.
PeopleSoft HRMS
35 Duplicate
Order Key Select to indicate that duplicate values can occur Alternate
Search Key Select to identify the field as a key that provides an alternate path into the table data. Duplicate values are allowed in an alternate search key field. If you define a field as an alternate search key in a search record, when you bring up a page, the system prompts you to enter a key or alternate search key values.
Descending
Key Select to identify the field as descending if you want rows of data to be retrieved in reverse alphanumeric order (for example, 3, 2, and 1)
Search Key Select to make the field available on the basic and advanced
search or lookup pages. A search key is valid only for keys and should be used only in search and prompt records. If you select this check box, the system automatically selects List Box Item
4. What is the use of List box item in record field properties
Select if you want the field to appear in the list box preceding a page. If a field has values in the translate table and you designate it as a list box item, the list box automatically shows the translated value instead of the code.
5. What is the length of translate value – 4
6. What is the different type of Record definition
SQL Table , SQL View , Dynamic View , Derived/Work , SubRecord , Query View, Temporary Table
7. What is the difference between Prompt table and Translate Table Prompt table :
Promt table is physical table that can be attached to certain field. Then we can select value for that field from that physical table.
Translate table :
The Translate Table is a prompt table, which is similar to an all-purpose data dictionary, to store values for fields that don't need individual prompt tables of their own. As a general rule, store field values in the Translate Table if the field meets the following criteria:
· Field type is Character.
· Field length is 1 to 4 characters.
· Field values consist of a relatively small, static set of values that are not maintained by the user.
PeopleSoft HRMS
· No other fields relate to this field.
8. What is the derived record and what is the use of it
It provides a temporary workspace to use during online page processing. A derived or work record is not stored in the database
9. What is the concept of parent-child record
If any record has Parent record then specify parent record at record property- use tab. The keys that you establish in a parent record definition determine which keys are required in child record definitions. The child must have the same keys as the parent, plus one or more keys that uniquely identify each row.
10. What is the use of Add Search Record in component properties
This is reqd if a different search record is reqd for add actions. For example, if you selected the auto-numbering option for employee IDs (EMPLID), don‘t include EMPLID in the search record. Likewise, you might want to create special security views for add actions that limit the rows that users can add, based on specific search criteria. The system default is the standard search record if you don‘t specify an add search record
11. What is the difference between Sub page and Secondary page
Subpages are a powerful means of factoring out commonly used page
functionality in your application. Rather than duplicating the same set of page fields on two or more pages, you can create a single subpage that contains those page fields and add it to any page. This makes it much easier to maintain the functionality these page fields represent. Subpages are even more effective when used with corresponding subrecords
While a secondary page is just another page to the user at runtime, they look and behave differently than the primary pages. For example: You can view a secondary page from its primary page only. A secondary page should have OK and Cancel buttons so that the user can dismiss the page (accepting or
canceling input) and return to the primary page. To offer the user alternative buttons to dismiss the page, disable the default OK and Cancel buttons in the Page Properties dialog box.
PeopleSoft HRMS
37 1. What is the use of state record
It is used to assign variables for Application Engine program. Also sections, steps, and actions pass values to subsequent program steps through state records.
One can have any number of state records associated with a particular
Application Engine program. However, only one record can be the default state record. You can specify both work (derived) and ―physical‖ (SQL table) records to be used as state records. The only difference is that derived state records cannot have their values saved to the database at commit time, and so the values would be lost during a restart. Therefore, PeopleSoft Application Engine erases the contents of derived state records at commit time if Restart is
enabled for the current process.A PeopleSoft Application Engine state record must have a process instance defined as the first field and the only key field and the state record name must end with _AET.
2. What is the use of Temporary record
Temporary tables are used for running PeopleSoft Application Engine batch processes. Temporary tables can store specific data to update without risking the main application table.
3. What are the actions available in app engine in PS 8.8
SQL
Do (When, While, Select, Until) PeopleCode
Call Section Log Message
XSLT (enabled for Transform Only program types)
4. What is the structure of an application engine program
Section , Step and Action
5. What is the difference between Do select and Do When
DO When
When using a Do When action, consider the following:
PeopleSoft HRMS
actions to be executed if any rows of data are returned.
This action is similar to a COBOL ―IF‖ statement. A Do When statement runs before any other actions in the step. If the Do When statement returns any rows, the next action is executed. If the Do When conditions are not met, the remaining actions within that step are not executed. Your program executes a DO When action only once when the owning step executes.
The only property that you can specify for the Do When action is the ReUse Statement property, which applies to all SQL-based actions.
Do While
The Do While action is a SELECT statement that, if present, runs before subsequent actions of the step. If the Do While does not return any rows of data, the action terminates. The Do While is identical to the COBOL ―WHILE‖ function. In other words, the subsequent actions within the step are executed in a loop as long as at least one row is returned by the SELECT statement for the DO While action. In short, if the Do While does not return any rows, the step is complete.
The only property that you can specify for the Do While action is the ReUse Statement property, which applies to all SQL-based actions.
Do Select
The Do Select action is a SELECT statement that executes subsequent actions once for every row of data that the Do Select returns. For instance, a Do Select can execute a SQL statement for each row returned from the SELECT
statement. The subsequent actions within the step are executed in a loop based on the results of the SELECT statement. The type of the Do Select determines the specific looping rules.
6. Can you use Call App Engine in App engine Program Peoplecode You can use the CallAppEngine function in a Peoplesoft Application Engine
program, either directly (in a PeopleCode action) or indirectly (using a Component Interface). This functionality must be used carefully, and you should only do this once you have a clear understanding of the following rules and restrictions.
Dedicated cursors are not supported inside a "nested application engine instance" (meaning an application engine program invoked using
PeopleSoft HRMS
39
As in any other type of PeopleCode event, no commits are performed within the called application engine program. This is an important consideration. If a batch application engine program called another program using CallAppEngine, and that child program updated many rows of data, the unit-of-work might become too large, resulting in contention with other processes. A batch application engine program should invoke such child programs using a Call Section action, not CallAppEngine.
Temp tables are not shared between a batch application engine program and child program invoked using CallAppEngine. Instead, the child
program is assigned an "online" temporary table instance, which is used for all temp tables in that program. In addition, if that child program invokes another program using CallAppEngine, that grandchild shares the online temp instance with the caller. In other words, only one online temp instance is allocated to a process at any one time, no matter how many nested CallAppEngine's there might be.
The lock on an online temp instance persists until the next commit. If the processing time of the called program is significant (greater than a few seconds), this would be unacceptable. As a general rule, application engine programs that make use of temp tables and have a significant processing time should be called from other application engine programs using a Call Section action, not CallAppEngine.
7. How do you Schedule the app Engine
8. what is the extension of state record. _AET
9. Different types of Application engine
Types - Standard, Upgrade, DEAMON, Transform, Import Only.
===============================
Peoplecode
1. give the sequence in which the events are fired in application processor flow
Record.Field Edit ---> Component.Record.Field Edit --->
PeopleSoft HRMS
2. What is the difference between Rowset and Standalone rowset Rowset : A rowset object is a data structure used to describe hierarchical
data. It is made up of a collection of rows. A component scroll is a rowset. You can also have a level 0 rowset
A level 0 rowset from a component buffer only contains one row, that is, the keys that the user specifies to initiate that component
One can use simple getrowset function.
Standalone Rowset : Standalone Rowsets are like regular Rowsets except
they aren't associated with a component or page. Use them when you need to work on data that isn't associated with a component or page buffer.
Standalone rowsets are not connected to the Page Processor, so there are no database updates when they are manipulated. Delete and insert activity on these types of rowsets aren't automatically applied at save time.
Use Createrowset to create standalone rowset
&MYRS = CreateRowset(RECORD.SOMEREC);
3. How many levels we can use on one page
Excluding level 0, there are 3 more levels (level 1, level 2, level3) that can be used on page .
4. What is component buffer
Whatever data is fetched from database while populating component will kept in temporary memory of application server i.e. called as
component buffer.
the area in memory that stores data temporarily for the currently active
component.
The Component Buffer consists of rows of buffer fields that hold data for the various records associated with page controls, including primary scroll records, related display records, derived/work records, and translate table records. PeopleCode can reference buffer fields associated with page controls and other buffer fields from the primary scroll record and related display records.
PeopleSoft HRMS
41
Workflow PeopleCode executes immediately after SavePreChange and before the database update that precedes SavePostChange. The main purpose of the Workflow event is to segregate PeopleCode related to Workflow from the rest of the application‘s PeopleCode. Only PeopleCode related to Workflow (such as
TriggerBusinessEvent) should be in Workflow programs. Your program
should deal with Workflow only after any SavePreChange processing is complete.
6. While creating the workflow what are the three objects used •Rules:
Rules are the company‘s business practices which can be captured in software. Rules determine what activities are required to process business data
•Roles
•Roles describe how people fit into the Workflow process. A role is a class of users who perform the same type of work such as managers etc.
•Roles direct the work to classes of people rather than to individuals. Identifying roles instead of individual users makes the workflow more flexible and easier to maintain.
•Roles remain stable even if individuals change jobs. •Routings
•Routings connect the activities in the workflow. They are the system‘s means of moving information from one place to another, from one step to the next.
•The network of routings creates a business process from what used to be isolated activities. They get the right information to the right people at the right time, enabling users to work together to accomplish the company‘s goals.
Routings can take the form of an e-mail message or a worklist entry 7. What is the use of sub record
A subrecord enables you to add a group of fields that are commonly used in multiple record definitions
It is used as Reusable component
8. What is the difference between Save prechange and save postchange event
SAVEEDIT:
The SaveEdit event fires whenever the end-user attempts to save the component. You can use SaveEdit PeopleCode to validate the
consistency of data in component fields. Whenever a validation involves more than one component field, you should use SaveEdit PeopleCode. If a validation involves only one page field, you should use FieldEdit PeopleCode.
An Error statement in SaveEdit PeopleCode displays a message and redisplays the component without saving data. A Warning enables the end-user to click
PeopleSoft HRMS
OK and save the data, or click Cancel and return to the component without saving.
SAVEPRECHANGE :
The SavePreChange event fires after SaveEdit completes without errors. SavePreChange PeopleCode provides one final opportunity to manipulate data before the system updates the database.
SAVEPOSTCHANGE :
After the Component Processor updates the database, it fires the SavePostChange event. You can use SavePostChange PeopleCode to update tables not in your component using the SQLExec built-in function.
An Error or Warning in SavePostChange PeopleCode causes a runtime error, forcing the end-user to cancel the component without saving changes. Avoid
Errors and Warnings in this event.
9. What is the difference between prebuild and postbuild event PREBUILD :
The PreBuild event fires before the rest of the component build events. This event is often used to hide or unhide pages. It’s also used to set component variables.
Note. If a PreBuild PeopleCode program issues an error or warning, the end-user is returned to the search page. If there is no search page, that is, the search record has no keys, a blank component page displays.
The PreBuild event is also used to validate data entered in the search dialog, after a prompt list is displayed. For example, after the end-user selects key values on the search, the PreBuild PeopleCode program fires, which catches the error condition and issues an error message. The end-user receives and acknowledges an error message. The component is cancelled (because of the error) and the end-user is returned to the Search dialog box. PreBuild
PeopleCode is only associated with components.
POSTBUILD:
The PostBuild event fires after all the other component build
events have fired. This event is often used to hide or unhide pages. It‘s also used to set component variables.
PostBuild PeopleCode is only associated with components. 10. What is page activate event does
PeopleSoft HRMS
43 11. Which event fire first Record field or Component record
Field
Record field
12. Name of the objects used in people code
The various objects used in peoplecode are SQL, Rowsets, Records,
Messages, Arrays
13. How do you open the secondary page using the peoplecode
Using DoModal Function. The syntax is specified below :
&RC= DoModal(Panel.PCS_PRJ_RES_PO_SBP, "Purchase Order Details", - 1, - 1);
where -1, -1 stands for center alignment. 14. What is the use of effective data 15. How many rows SQLEXEC return
One.
16. What does the Setcursorpos do
SetCursorPos places the focus in a specific field anywhere in the current
component.
17. Have u debug the Peoplecode?? Explain it
The PeopleCode Debugger is an integrated part of PeopleSoft Application Designer. The interface to the Debugger has a visual indicator of breakpoints, an arrow indicating the current line and the ability to step through code. You can inspect the value of a variable by ‗hovering‘ your cursor over it and reading the pop-up bubble help. The Debugger also provides variable inspection
windows for Globals, Locals, Function Parameters, and Component scoped variables. It also enables PeopleCode objects to be "expanded", so you can inspect their component parts.
Also the developer can save the trace file that is generated during execution provided the debugging parameters are set rightly.
18. What is the difference between Field change and Fieldedit event and which fire first
PeopleSoft HRMS
FieldEdit PeopleCode is used to validate the contents of a field, supplementing the standard system edits. If the data does not pass the validation, the
PeopleCode program should display a message using the Error statement, which redisplays the page, displaying an error message and turning the field red
Field Change
FieldChange PeopleCode is used to recalculate page field values, change the appearance of page controls, or perform other processing that results from a field change other than data validation. To validate the contents of the field, use the FieldEdit event
Field Edit fires first
List of Events : Field
Component
Record Field Component Record Component Page Menu
FieldChange FieldDefault FieldEdit FieldFormula PrePopup RowDelete RowInit RowInsert RowSelect SaveEdit SavePostChg SavePreChg SearchInit SearchSave Workflow FieldChange FieldDefault FieldEdit PrePopup RowDelete RowInit RowInsert RowSelect SaveEdit SavePostChg SavePreChg SearchInit SearchSave PostBuild PreBuild SavePostChg SavePreChg Workflow Activate
PeopleSoft HRMS
45
Recordwise Field wise FieldChgs and then Related Component Recordwise Fieldwise FieldChg
Recordwise Field wise SaveEdits and then Related Component Recordwise Fieldwise SaveEdits
Recordwise Field wise SavePreChg and then Related Component Recordwise Fieldwise SavePreChg
Recordwise Field wise Workflow and then Related Component Recordwise Fieldwise Workflow
Recordwise Field wise SavePostChg and then Related Component Recordwise Fieldwise SavePostChg
1. What is the use of component Interface
A component interface enables exposure of a PeopleSoft component (a set of pages grouped together for a business purpose) for synchronous access from another application (such as PeopleCode, Java, C/C++, COM, or XML).
A component interface maps to one, and only one, PeopleSoft component. A component interface is created in the PeopleSoft Application Designer. Record fields on the PeopleSoft component are mapped to the keys and properties of the component interface. Methods are used to find, create, modify or delete data.
2. What are the method available in CI
A method is a function that performs a specific task on a component
interface at runtime. There are two types of methods available as
Standard method : that are available for all component interfaces. They are as follows
Find, Get, Save, and Cancel method
User-defined methods : are created in PeopleSoft Application Designer to provide added functionality to the component interface. These methods are functions that are made accessible through the component interface. Each function maps to a user-defined method.
PeopleSoft HRMS
3. Can you define your own method
YES
4. How do you connect PS using CI 5. What do mean by session object 6. What is the collection
A collection is a property that points to a scroll, rather than a field, in the
underlying component for a component interface. A collection groups multiple fields in a scroll. All the fields in the scroll are mapped to a property. These properties are part of the collection.
You create collections the same way you create properties—drag the scroll from the component view into the component interface view. Consider these points when creating collections:
When dragging a scroll into the component interface view, all child scrolls come with it.
7. What is the difference between Runtime plugin and design time plugin
=============================
01. What difference is there in AE75 and AE84?
a. In 7.5 AE is the separate tool where in 8.4 it is a part of application designer i.e. Object.
b. In 8.4, you can associate peoplecode with Application engine.
c. In 8.4, you can access all application designer objects from Application Engine
02. What is the purpose of temporary record and state record?
Temporary record: Temporary tables are used for running PeopleSoft
Application Engine batch processes. Temporary tables can store specific data to update without risking the main application table.