Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
96 views56 pages

Collection

Uploaded by

kanchi.deepa1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views56 pages

Collection

Uploaded by

kanchi.deepa1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 56

APPLICATION ENGINE

1.How many types of Application Engine programs are there?


Ans: There are five types of Application Engine programs, one of which you specify on the
Program Properties dialog box for your program definition.
 Standard, which is a normal entry-point program.
 Upgrade only, which is used in PeopleSoft Upgrade utilities.
 Import only, which is used by PeopleSoft Import utilities.
 Daemon Only, a special type of program used as a daemon.
 Transform Only, another special program type used to support XSLT.
2.What is an Application Engine Program?
In PeopleSoft Application Engine, a program is a set of SQL statements, PeopleCode, and
program control actions (that enable looping and conditional logic) defined in PeopleSoft
Application Designer that performs a business process.
You can use PeopleSoft Application Engine for straight, row-by-row processing, but the most
efficient Application Engine programs are written to perform set-based processing.
3.What is the use of an Application Engine?
PeopleSoft Application Engine is designed for batch processing where you have a large amount
of data that must be processed without user intervention—for example, calculating the salaries in
payroll processing (not printing the checks).
Another example might be converting data (money) from one currency to another.
4.What are the Application Engine Program Elements?
A PeopleSoft Application Engine program is made up of several key elements:
1.Program
2.Sections
3.Steps
4.Actions
5.Do Actions
The four types of Do actions are:
 Do While
 Do When
 Do Select
 Do Until
6. SQL
Most SQL actions are comprised of a single SQL statement. These statements can perform the
following types of SQL statements:
 UPDATE
 DELETE

1
 INSERT
 SELECT
7. PeopleCode
8. Log Message
9. Call Section
10. State Record
7.What is a State Record? What is the necessity of it for an Application Engine Program?
A PeopleSoft record that must be created and maintained by the Application Engine developer.
This record defines the fields a program uses to pass values from one action to another.
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.
You assign variables for your Application Engine program through state records, while sections,
steps, and actions pass values to subsequent program steps through state records.
Think of the fields of the Application Engine state record as the working storage for your
Application Engine program.
An Application Engine state record can be either a physical record or a work record, and any
number of state records can be associated with a program. Physical state records must be keyed
by process instance.
8.Can we have more than one State Record for one Application Engine Program?
You can have any number of state records associated with a particular Application Engine
program. However, only one record can be the default state record.
9.Can we use a derived record as a state record ?
You can specify both work (derived) and "physical" (SQL table) records to be used as state
records.
10.What is the difference between using a derived record as a state record to using a SQL
Table?
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.
if you want preserve any state record field values across commits in your program, then you
should store those values in a state record with a Record Type of SQL Table.

11.What is the advantage of using PeopleCode in Application Engine Program?


Application Engine PeopleCode provides
a) an excellent way to build dynamic SQL,
b) perform simple IF/ELSE edits, set defaults,
c) and other operations that don't require a trip to the database.
It also enables you to reference and change active Application Engine state records.
12. Should the "called" section be in the same program as the calling section?

2
The "called" section can be in the same program as the calling section, or it can be in an external
program.
13.What is the use of calling a section?
If a section already exists in one program, rather than copying it into another program, just call it.
14.What is one of the advantages of Application Engine over COBOL/SQR?
PeopleSoft Application Engine supports long fields unlike COBOL or SQR. However, it allows
only one long field per state record.
PeopleSoft Application Engine also supports image fields and long text fields.
15.How do you set values in the state record?
To set values in the state record, you use the %SELECT construct in a SQL statement or write
PeopleCode that references the state field with the standard "record.field" notation.
16.How do you refer fields in the state record?
To reference fields in the state record, use the %BIND construct.
To reference variables that exist within a state record, use the following:
%BIND (fieldname)
17.What is the advantage of using Temporary Tables in an Application Engine Program?
Because Application Engine programs run in batch mode, multiple instances of the same
program often execute in parallel. When this happens, there is a significant risk of data contention
and deadlocks on tables. To avoid this PeopleSoft PeopleTools has a feature that enables you to
dedicate specific instances of temporary tables for each program run.
You can also use temporary tables to improve performance.

18.What is the main purpose of Temporary Tables in Application Engine programs?

Temporary Tables can be a very important asset for many of Application Engine
programs. Typically, temporary tables store transient or "intermediate results" during a
program run.
19.Can multiple Programs share the State Records?
State records can be used by multiple sections and by multiple programs.
When you call a section in another program, any additional state records defined for that program
(as in state records that are not already in use by the calling program) are initialized, even if the
program has been called previously during the run.
20. How do you refer fields in a state record other than the default?
%BIND (recordname.fieldname).
21.How many types of Actions are there within a step?

There are eight types of Actions that you can include within a Step, and a Step can
contain multiple Actions.

22. What is the restriction in using Actions within a single Step?

3
The only mutually exclusive Actions within a single Step are Call Section and SQL
Statement; in other words, you can’t add a Call Section Action to a Step that already
contains a SQL Statement Action and visa versa. Furthermore, you can only include one
of each Action type within a single Step. Since there are eight types of Actions, and two
are mutually exclusive, the maximum number of Actions a single Step can contain is
seven.

23.What are the types of Application Engine Actions, which comes under the
category of Program Flow Actions?

There are four types of Application Engine Actions that, although distinct from the
others, can be grouped together under the category of Program Flow Actions. This
category includes the Actions, which appear in the following list:
 Do When
 Do While
 Do Select
 Do Until

24.When do you use a DO When Action?


The DO When Action is a SELECT statement that allows subsequent actions to be executed if
any rows of data are returned.
25.What does a DO Select Action?
The DO Select Action is a SELECT statement that executes subsequent Actions once for every
row of data that the Do Select returns.
25.What does a DO Until Action?
A Do Until Action is a SELECT statement that runs after each Action when a Step completes. If
the SELECT returns any rows of data, the Step terminates.
26.List the different ways to execute Application Engine programs.
1.You can initiate Application Engine programs from pages with push buttons set for
synchronous or asynchronous execution.
2.You can execute an Application Engine Program with a Windows Command Script.
27.How does an Application Engine remember what Steps have already completed and
which Steps have not?
The ability for Application Engine to remember what Steps have already completed and which
have not is attributed to an important record called AERUNCONTROL-keyed by Process
Instance.
When a program runs, each time Application Engine issues a Commit it also saves all of the
information required for a program restart in the AERUNCONTROL record.
28.By default, does the Application Engine perform a COMMIT?

4
By default, Application Engine doesn’t perform a COMMIT until an entire program successfully
completes. It’s up to the Developer to design and set any individual Commits where appropriate.
29.What are the ways you can Disable Restart?
There are three ways that you can Disable Restart. They are:
a. Checkbox on the Program Properties dialog.
b. Checkbox on the Configuration Manager.
c. Command line flag to the Application Engine executable (PSAE.EXE).
-DR <Y/N>
If in any of these three places you’ve disabled restart, then restart is disabled.
30. What is Set Processing?
Set Processing uses SQL to process groups, or sets, of rows at one time rather than processing
each row individually.
31.What are the Advantages of Set Processing?
a. Improved Performance. Set Processing performs significantly better than its row-by-
row counterpart for reasonable batch processing volumes.
b. Minimized (PeopleTools) SQL Overhead.
c. Easy Maintenance.
d. Leveraging the RDBMS.

1.What are the three major sets of tables a database for a PeopleTools application
contains?

A database for a PeopleTools application contains three major sets of tables:


 System Catalog Tables store physical attributes of tables and views, which your database
management system uses to optimize performance.
 PeopleTools Tables contain information that you define using PeopleTools.
 Application Data Tables house the actual data your users will enter and access through
PeopleSoft application windows and Pages.

2.State the Types of Record Definitions in PS8?


You can create the following types of record definitions within the Application Designer:
 SQL Tables
 SQL Views

5
 Dynamic Views
 Derived/Work Records
 Subrecords
 Query Views
 Temporary Tables
What is a subrecord?
A subrecord enables you to add a group of fields that are commonly used in multiple record
definitions. A subrecord must be defined before it can be inserted into a record definition.

What is a Dynamic View? In what cases do you go for it?


It’s one of the record definitions 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.

What is a 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.
 No other fields relate to this field.
Do we need to enter the values for a Translate field if the values are only ‘YES’ and ‘NO’?
If the only values for a field are Y (yes) and N (no), you don't need to enter them in the Translate
Table. The Translate Table comes with a field for Y and N named PSYESNO. When you select
the Yes/No Table Edit, the system automatically points to the PSYESNO field in the Translate
Table.

3.Explain with an example when to go for a Translate Table?


Example of When to Use the Translate Table:
Consider the relative attributes of a Department ID field and a Gender field in a company
database. In the following table, Department ID is not a good case for using the Translate Table,
because it requires its own prompt table. However, the Gender field is a good case for using the
Translate Table.

Characteristic Department ID Gender


Field Type Character Character

6
Field Length Longer than 3 characters 1 character
Field Values Could be many values, 20 or more 2 possible values
Other related fields Related to other fields, like department manager Not related to other fields
Requires maintenance Yes, users might have to add departments No, gender is a static value

Translate Table Attributes


The system maintains the structure of the Translate Table and you supply the data. This table
contains the following fields.

Field Name Description


FIELDNAME Field name, such as ABSENCE_TYPE
LANGUAGE_CD Language code
FIELDVALUE Value for the field
EFFDT Effective date
VERSION Internal version number (system-maintained)
EFF_STATUS Status—active or inactive
XLATLONGNAME 30-character description; used as a label on pages and reports
XLATSHORTNAME 10-character description; used as a label on pages and reports
LASTUPDDTTM DateTime field showing the last time that a field was updated
LASTUPDOPRID User ID of the user who most recently updated the field

What is a Duplicate Order Key?


It is to indicate that duplicate values can occur. The order in which you place duplicate order keys
in a field list determines the order in which duplicate keys are retrieved.

When will you go for Alter tab


in the Build Settings?
Alter Settings

The Alter tab in the Build Settings dialog box handles the most common types of data conversions,
including:
 Increasing the length of Character fields.
 Changing a Character (CHAR) field to a Long Character (LONG VARCHAR) field.
 Increasing the size of Number or Character fields.
 Reducing the decimal positions in Number fields. If any column of the table has data that
will be lost when truncating, the system action is determined by the Change Column
Length options.
 Changing integer-only Number fields to Character fields, where the Character field is
formatted with leading zeros. If any column of the table has a number that does not fit in
the new Character field, system action is determined by the Change Column Length
options. This prevents data from being lost.
 Adding columns to SQL tables.
 Dropping columns from SQL tables.

7
 Renaming columns in SQL tables.
 Renaming SQL tables.
 Moving tables to a new tablespace.
When to Alter Tables?
The following record definition changes affect synchronization with the application table and
require an Alter process:
 Add or delete a field on the record.
 Modify the length of a field.
 Change the required status of a field that is Date, Time, DateTime, or Long.

The Alter Table process is similar to the Create Table process, except that it does not drop
existing application data tables and the data that they contain.

What is a Record field property- -“Required “


Required is selected if you don't want users to skip a field or leave it blank. Users will not be able
to save their work until they complete all of the required fields on a page.

KEYS
What is a Key?
It is to identify the field as the search criteria that uniquely identify each row. You cannot have
duplicate values for primary keys.
For example, EMPLID is the only key to the PERSONAL_DATA record definition. Therefore,
EMPLID must be a unique value for each employee and there can be only one
PERSONAL_DATA row per employee.
Can we have Records without keys?
Some record definitions, such as INSTALLATION, don't require keys because only one row of
data exists in the table. Whereas a table normally has keys to help distinguish between multiple
occurrences of data, in this case there's only one row of data, so there's no need to distinguish
one row from another. Another primary use for keys is to build database indexes to rows—
because there's only one row for each table, the record doesn't need indexes.
What is a Duplicate Order key?

Records with Duplicate Order Keys


Occasionally, you might encounter situations in which a unique identifier for each row does not
exist. Duplicate order keys are a way of ordering data in the table when duplicate values are
allowed.
For example, in the EDUCATN Table, PeopleSoft anticipated that an employee can receive two
degrees of the same type on the same date. For example, though rare, Simon Schumaker could
receive two honorary degrees in computer science on the same day.
Because there is no unique identifier—the employee ID, date earned, and degree are all the
same—the user must maintain the data differently. The key, instead of defining a unique row,

8
defines a group of rows. In that group, you must determine the order in which you want to display
information.
In the EDUCATN record definition, there are three keys that together determine how information
is stored and retrieved. EMPLID identifies the group of rows; the placement of the duplicate order
keys, DT_EARNED and DEGREE, instruct the system to order rows in the group first by date,
then by degree.

EMPLID DT_EARNED DEGREE


8001 June 1, 1992 HON
June 1, 1992 HON

The system concatenates or joins keys when it checks for uniqueness. In this case, the system
accepts duplicate entries in the DEGREE and DT_EARNED fields because they are part of a set
that is identified by EMPLID.
What is an Alternate Search Key?
It is 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.
What Ordering of Keys is to be followed?

Ordering Keys
The position of keys relative to one another is critical in a record definition—always list them in
order of importance.
The primary key must be the first field in the record, followed by the next most important key, and
so on. Key fields are followed by duplicate order keys, in order of importance, then by fields that
are not keys. You can scatter alternate key fields anywhere among regular fields, in any order.
They don't need to be grouped.
Key, Duplicate Order Key, and Alternate Search Key are mutually exclusive.
Is there any restriction in using Alternate Search Keys?
Each alternate search key that you establish creates a database index when you SQL Create the
table. While database indexes are important, they consume disk space and, when the system
must support the alternate key, processing time. Therefore, don't add alternate search keys
unless you really need them.

What are Descending Keys?


It is to identify the field as a Descending Key if you want rows of data to be retrieved in
reverse alphanumeric order (for example 3-2-1 or C-B-A order). If you leave this option
turned off, the key is an ascending key—meaning that rows are stored and retrieved in 1-
2-3 or A-B-C order. This option applies only to a field specified as a key, duplicate order
key, or alternate search key. The default order is ascending. We use descending order
primarily for Effective Date fields. Most Character keys are ascending.

What is a “From Search Field and Through Search Field” option for Use Property?

9
Neha - Select for fields that are used as search records. If you select From Search Field,
the displayed list contains rows in which the field value is greater than or equal to a value
that the user enters. If you select Through Search Field, the displayed list contains rows
in which the field value is less than or equal to a value that the user enters.
If you do not want these fields to be in a search list box, clear the List Box Item
check box, even if the field is an alternate search key.

What are the Processing Modes in which PeopleSoft applications can run?
PeopleSoft applications can run in two different processing modes: interactive and deferred.
What is an Interactive Mode?

Interactive Mode
In interactive mode (formerly called standard), when the user exits a field that has a field-level
event (for example, FieldChange, FieldEdit, RowInsert PeopleCode, prompt validation, related
display, and so on):
1. A transmission to the application server is performed to run that field-level event.
2. The page is redisplayed.

What is Deferred Mode?


Deferred mode enables you to defer many of the conditions that need server processing until
running them on the application server is required or requested. For example, when a user exits a
field that has a field-level event (like FieldChange or FieldEdit PeopleCode, prompt validation,
related display, and so on) that event is not run until the next transmission to the application
server. When the next transmission to the server occurs, PeopleTools determines which fields
have changed since the last transmission. Logic on the application server runs the appropriate
system edits and PeopleCode events (in field layout order).
You can select deferred mode processing at the field, page, and component levels. For a field in
the component to run in deferred mode, you must select deferred mode at each of those levels.
Deferred processing is the default mode at the field, page, and component levels.
How a secondary page is different from that of a primary page?
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.

What are the ways to associate a secondary page with a primary page?
 Insert a push button or link and associate it with your secondary page.
 Insert a secondary page control

10
What does a DoModal function?

Neha-The DoModal function displays a secondary page.

What is a DoModal Syntax?


DoModal(PAGE.pagename, title, xpos, ypos, [level,[RECORD.level1_recname,
level1_row, [RECORD.level2_recname, level2_row, ]] RECORD.target_recname,
target_row])

What is the meaning of Modal?


Secondary pages are modal, meaning that the user must dismiss the secondary page before
continuing work in the page from which the secondary page was called.
Mention the restrictions on use in PeopleCode Events in a Secondary page.
Control does not return to the line after DoModal until after the user has dismissed the secondary
page. This interruption of processing makes DoModal a "think-time" function, which means that it
shouldn't be used in any of the following PeopleCode events:
 SavePreChange.
 SavePostChange.
 Workflow.
 RowSelect.
 Any PeopleCode event that fires as a result of a
ScrollSelect, ScrollSelectNew, RowScrollSelect or RowScrollSelectNew function call.
In addition, you can't use this function in SearchInit.

Fields of what record the fields in a subpage must be associated with?

All of the fields in a subpage must be associated with fields of a subrecord in the
specified record definition.
What is ‘ No Auto Select’ in Grid Properties-data options?
Suppresses the system from retrieving data from the database automatically.
(Select to populate the grid or scroll area with data using the ScrollSelect PeopleCode
functions.)

What is effective Date and what for it is used ?


In order to keep a history for each person or data row in the database, PeopleSoft uses effective
dates (FIELDNAME: EFFDT). For the tables that require history tracking, each row of information
has an effective date associated with it.

PeopleSoft determines the current row of information by finding the row of information that is
closest to today's date without being beyond it. Any row with an effective date that is older than
the current row is historical information. Any row that has a date beyond today's date is future
information. In addition to the Effective Date, PeopleSoft also uses the Effective Status
(FIELDNAME: EFF_STATUS) to indicate whether the row is Active or Inactive.

11
1.What is an Application Messaging?
Application Messaging, based on the “publish-and-subscribe” model, allows PeopleSoft
applications to integrate with each other and with third party applications.
This model provides integration that is close to real-time, which means that the publisher
need not be connected to the subscriber when publishing the data (similar to how email
works). On one end, a message is created and published and on the other end, the
message is delivered to any number of subscribers.

2.What are the benefits of Application Messaging over previous solutions for system
integration?
Application Messaging provides many benefits over previous solutions for system
integration. However, the three key benefits are as follows:
 Synchronization of data. Application Messaging helps synchronize data stored in
different systems.
 System-to-system workflow. PeopleSoft workflow is based on business events—
conditions that trigger the need for a follow-up activity. Business events can direct
work from person to person and also from system to person. While Application
Messaging is not based on the existing architecture of PeopleSoft workflow, it does
enable system-to-system workflow by eliminating the need to programmatically
invoke each step of a business process spanning different systems. Instead of creating
a custom program to drive the workflow, the delivery of an application message to a
subscriber initiates the execution of the next step through the use of a subscription
process.
 Internet integration. Application messages flow through the Internet using XML and HTTP.
This open technology supports business-to-business integration, allowing PeopleSoft
applications to communicate with any other systems, anywhere in the world.
 Simplifies Integration. Application Messaging simplifies the task of integrating PeopleSoft
applications with third-party applications and legacy systems. Because it provides an
automated and efficient method of sending and receiving data between systems, it alleviates
the need for customized batch processes.
3.Mention the key components and of Application Messaging? State what each one
does?
Component What it does…
Message Designers Used for designing messages and related objects (message nodes and message
channels) with Application Designer.
Message Server Coordinates message nodes, channels, queues, and publish-and-subscribe
events at runtime.
Message Monitor Used for checking delivery status of messages at runtime; similar to Process
Scheduler’s Process Monitor.

You use Application Designer to define three types of objects related to application
messaging:
 Message nodes
 Message channels

12
 Message definitions

What is a Message Node?


A Message Node is an object that represents a publishing or subscribing system on the
messaging network. A message node will often relate to an application server or
database name.
What is a Message Channel? Why Channels are used?
Channels are a logical grouping of messages. Each message must belong to one and only
one Message Channel. Channels are used for the following:
 Ordering of messages
 Routing of messages to specific message nodes
 Increasing throughput when using channel partitioning
 Security
 Easier maintenance of messages with common configuration properties
 Defining the processing attributes for timeout parameters, error thresholds, and delivery type
(Guaranteed or Best Effort Delivery)

1.What is a Component Interface? What is the use of it?

A component interface is a PeopleTool to enable exposure of a PeopleSoft component (a


set of pages grouped together for a business purpose) for synchronous access from
another application (PeopleCode, Java, C/C++, COM, or XML).
Component interfaces can be viewed as "black boxes" that encapsulate PeopleSoft data
and business processes, and hide the details of the structure and implementation of the
underlying page and data.
Component interfaces can be used to integrate PeopleSoft with another PeopleSoft
application or with external systems.

2.What are the main attributes of a component interface?


Every component interface has the following main attributes:
 Component interface name.
 Keys (get keys, create keys, and find keys).
 Properties and collections (fields and records).
 Methods.

1.What is a Component Interface?


1.A component interface is a PeopleTool to enable exposure of a PeopleSoft component for
synchronous access from another application (PeopleCode, Java, C/C++, COM, or XML).
2.Component interfaces can be used to integrate PeopleSoft with another PeopleSoft application
or with external systems.
2.Explain briefly what a component interface does?

13
1.A component interface maps to one, and only one, PeopleSoft component.
2.A component interface is created in the PeopleSoft Application Designer by selecting the
PeopleSoft component.
3. Record fields on the PeopleSoft component are mapped to the keys and properties of the
Component Interface.
4. Methods are used to find, create, modify or delete data.
3.Define Component, Component Interface and Component Interface API
Component: One or more pages performing a business transaction.
Component Interface : It is an exposed aspect of a component.
Component interfaces are readily accessible by internal (PeopleCode) and external (Java, C/C+
+, or COM) applications.
Component Interface API :Application programming interfaces for PeopleSoft applications
(PeopleCode) and external applications (Java, C/C++, or COM.)
4.What are the main attributes of a component interface?
Every component interface has the following main attributes:
 Component interface name.
 Keys (get keys, create keys, and find keys).
 Properties and collections (fields and records).
 Methods
5.What are Keys in a component interface?
Keys are special properties containing values that retrieve an instance (get keys) or a list of
instances (find keys) of the component interface.
6.How the Keys are created in a component interface?
When you create a new component interface, get and find keys are created based on the search
record definition for the underlying component.
However, you can add, remove, or change keys in PeopleSoft Application Designer.
7.What are Properties in a component interface?
Properties provide access to component data and component interface settings and status when
they're exposed through component interface. Component interfaces include two types of
properties:
 Standard properties (InteractiveMode, GetHistoryItems, and EditHistoryItems) are
assigned automatically when a component interface is created.
Standard properties can be set to true or false. These properties are not displayed in the
PeopleSoft Application Designer.
 User-Defined Properties map to record fields on the PeopleSoft component. These
properties are displayed in the PeopleSoft Application Designer. A property can
correspond to a field or a scroll (collection).
8.What are Collections in a component interface?

14
A component interface collection is a special type of property that corresponds to a scroll.
It contains fields and subordinate scrolls as defined in its underlying component.
By default, each collection uses the name of the primary record for the underlying scroll.
9.What are Methods in a component interface?
A method is a function that performs a specific task on a component interface at runtime.
Like component interface properties, there are two main types of methods:
 Standard methods are those that are available for all component interfaces.
The Find, Get, Save, and Cancel methods are automatically generated by PeopleSoft
Application Designer when a new component interface is created. The Create method
gets created for components that have the "Add" action enabled.
 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.

10.How many types of keys a component interface can have and what are they?
A component interface can have three types of keys.
1.Get keys
2.Find keys
3.Create keys.
11.What are Get keys?
These keys automatically map to search key fields in the search record for the underlying
component. You must change Get keys only if you modify the keys of the component after you
create a component interface.
12.What are Find keys?
These map to both search key fields and alternate search key fields in the search record for the
underlying component. You may remove any Find keys based on alternate search key fields that
you don't want to make available for searching.
13.What are Create keys?
If the underlying component allows the Add action, then Create keys are generated for the
component interface automatically.
They map to fields marked as Srch (search) in the search record for the component (or the add
search record, if one is specified).

14.What is InteractiveMode property of component property?

Controls whether to apply values and run business rules immediately, or whether items are
queued and business rules are run later, in a single step. Interactive mode is recommended for

15
most cases where you use a component interface to establish "real-time" integration with another
interactive application.
Note. If you're using a component interface as part of a batch process in which thousands of rows
are to be inserted, running in interactive mode may reduce performance so much on some Unix
servers that the application times out with a connection failure. You can prevent this by setting
InteractiveMode to False. It is also recommended that InteractiveMode be set to False in a
production environment because of performance considerations.
The default value is False.

What is the need of hidden Pages?

The hidden (invisible to the user) pages are used for PeopleCode calculations.
Pages are usually hidden when used in work groups, or associated with derived/work
records. The page’s information needs to be loaded into the buffer in order for
PeopleCode to perform calculations, but the user does not need to see it.

1.What is Configuration Manager?


The Configuration Manager is a PeopleTool designed to simplify workstation
administration by providing a way to adjust the PeopleSoft registry settings from one
central location.
With the Configuration Manager you can set up one workstation to reflect the
environment at your site, and then you can export the configuration file, which can be
shared among all the workstations at your site.
The Configuration Manager contains a variety of setting controls that allow you to set up
your workstations for connecting to the database, using workflow, and so on.
It enables you to define separate "profiles" for connecting to different PeopleSoft
databases.
2.What options the Trace tab allows you to select?
The Trace tab allows you to select the tracing options for various parts of the
PeopleTools system, such as SQL statements, PeopleCode, and Application Engine.
If you are involved with tuning your PeopleSoft system and improving the online
performance, you will want to make yourself familiar with this tab.
Keep in mind that when you change the settings and options in the Configuration
Manager, the new settings will only take effect the next time you launch PeopleTools

3.What happens when a Disable Restart is selected?


Select this check box to disable the Application Engine restart feature, which enables you to restart an
abnormally terminated Application Engine program. With Disable Restart selected, Application Engine
programs start from the beginning.

The Disable Restart option is useful during debugging. It should not be selected in a production
environment.

1 .Using Data Mover what are all the tasks can be performed?

16
Data Mover is a PeopleTool that provides a convenient way to perform the following
tasks:
 Transfer application data between PeopleSoft databases.
 Move PeopleSoft databases across operating systems and database platforms.
 Execute SQL statements against any PeopleSoft database, regardless of the underlying
operating system or database platform.
 Control database security and access.
You use Data Mover to create, edit, and run scripts. These scripts may include any
combination of SQL commands and Data Mover commands for exporting and importing
database contents, among other things

1.Explain File Layout?


A File Layout is a definition (or mapping) of a file to be processed. It identifies where in
a file data fields are located. Once a File Layout has been created, you can write
PeopleCode programs that use the file object, which in turn use the File Layout, to either
read data from or write data to a file.

2.What are the different types of File Layout Formats?

Fixed Positional Each field has a starting position and a length which is
their descriptive location.

Sequence Positional (CSV) Fields are separated and the order of appearance is their
descriptive location.

Tagged (XML) Each field has predefined tags (or identifiers) surrounding
it.

3. Mention the formats that are supported by File Layout definitions.

The following formats are supported by File Layout definitions.


 Fixed Format Positional File (FIXED) (this is the default)
 Variable Format Delimited File (CSV)
 Tagged Hierarchical Data File (XML)
Each File Layout only has one format type associated with it.

4.What is the difference between a record and a segment?

When you insert a record into a File Layout, all the fields are inserted, along with
additional information. A segment is the exact same as a record, only it contains no
information. You have to add all the information yourself. After you add the information
to a segment, you can treat it just like any other file record.

17
1.Explain the types of Queries?

PeopleSoft Query provides the following different types of queries:


 User queries.
Create and run queries to retrieve data from the database directly from Windows-based
Query Designer, or the web-based Query Manager/Query Viewer applications.
 Reporting queries.
Reporting queries are essentially the same as user queries, except that they are designed
to be used by another reporting tool. Reporting queries can be used as data sources for ad
hoc queries, scheduled queries, Crystal Reports, PS/nVision, or Cube Manager.
 Process queries.
Write queries that are intended to run periodically by batch processes, most likely using
PeopleSoft Application Engine and the Query API (application programming interface).
 Role queries.
Write queries that PeopleSoft Workflow uses to determine to whom to send emails,
forms, or worklist entries.

2.Explain Role Queries?


PeopleSoft Workflow uses role queries to determine to whom to send a work item to. A role
query needs to return one or more role ID based on the data that's been saved on the page
triggering the routing.
Because a role query returns a list of role users, the record definition you want is either
PSROLEUSER (which lists role users and the roles to which they are assigned) or
ROLEXLATOPR (which lists role users and their IDs).
The only field you'll select in your query is ROLEUSER. Of course, you'll use other fields and
join to other record definitions to specify the criteria role users can select. But no matter how
complex the query is—how many joins or selection criteria it has—it must return ROLEUSER
and nothing more.
Define a role as a query because you want to route items differently based on the context of the
transaction the users are performing. Thus, every role query contains at least one bind variable
whose value gets set at run time. The bind variable or variables correspond to the data on which
you want to base the routing decision. At run time, the system sets the values of the bind
variables based on data from the page that triggers the event.
Save your role queries using names that begin with [ROLE] so that you can identify them as role
queries.
3.Explain Process Query
Process queries are queries that you intend to run periodically using a batch process. Create these
automated batch processes using PeopleSoft Application Engine and the Query API. For
example, you could write a query that returns any overdue receivables and schedule a batch
process to run the query once a week.

18
4.What are the points to be taken care of while creating Process Queries/ role queries?
Process and role queries override the automatic row-level query security logic that is applied to
all other types of queries. For this reason, you should restrict access to creating these types of
queries to administrative roles and not include any sensitive data columns in the select list for
these types of queries. You can restrict access to creating/modifying these queries based on Query
Profile settings assigned to a Permission List.
Questions:
1. What is a Component Record? If a “Component” is same as “PanelGroup”, then
is Component Record Similar to Search Record?
2. What is the difference between SavePostChange / SavePreChange, at the
Component Peoplecode Level and Record Peoplecode Level? And how do I
figure out where to write which code.
3. Can a Secondary Page be made Modal? If “Yes” then what would be the impact if
the user clicks the “Back” button of the Browser.
4. In the deferred mode PeopleSoft recommends to keep the Page display static as
the user enters the data and moves between the fields. Why?
5. What is the difference between a Sub-Page and a Secondary Page?
6. What is a Pagelet?
7. Is the Component buffer available if TransferPage and Transfer functions are
used?
8. Can I freeze the Grid columns dynamically through Peoplecode?
9. Can I hide an entire GRID dynamically through Peoplecode?
10. I have assigned the same RECORD.FIELD to two radio-buttons on a page still
they do not act as radio group. Why?
11. I have defaulted the edit box (numeric) to “0”, still the page at run-time does not
show “0”, but shows the field as blank. Why?
12. Will the Interactive mode at the Page field level; override the Deferred Mode at
the Component level?
Application Engine Questionare

1) Order of execution (Steps) in App Engine.


2) How many ways are there to run App Engine.
3) How can we run a App Engine by PeopleCode?
4) How does the App Engine gets refreshed while working with App Engine
Interface?
5) How can we run an App Engine in our custom page?
6) Justify when u can have a SQL table/Derived record for the State Record.
7) What is the use of Temp tables in App Engine?
8) How can u set File Layout object for an App Engine?
9) What is Restart logic in App Engine?
10) How can u do bulk insert thru App Engine?
11) How can I make a database commit for every 100 rows?
12) What is App Engine library?
13) Can I write Database (DB2/Informix) specific code in App Engines Justify

19
14) How will u make dynamic calls for Sections within the same App Engine?
15) How can we know the temporary table usage by the batch process?
COVANSYS Paper

PeopleSoft 8.0 Queries

PeopleSoft Internet Architecture:

1. What is exactly meant by the components JOLT and Tuxedo in the


PIA? What are their roles?
2. How does one configure PS say for a particular type of database?
3. Can we use any Web Server with PeopleSoft or is it mandatory to use
Web Logic alone?
4. Explain in detail the different components in PIA.
5. How are changes made to any page in the development environment,
immediately made available in the portal, that is, how does PS go
about publishing the pages into the web server, who controls this or
how is this is automated?

PeopleTools

1. What is the difference between debugger and trace?


2. Record field properties contain two options, System Maintained and
Auto update. What are they used for?
3. What is the difference between Derived work record and a global
variable?
4. What is a Maintenance Project in project properties dialog box? When
is it used?
A maintenance project is a new PeopleSoft object to be used when you
are copying a maintenance release database to a target database. In
addition to simplifying the software upgrade, maintenance projects
support the Tracking of applied software fixes in a log and Handling of
dependency incidents.

5. What is the difference in using different message severity? (ex Cancel,


Error, Message and Warning)
6. What is the option reasonable date in effective date used for?
7. What is Dynamic view? How do we use it in a project? Explain with
example
8. What is Table set sharing? Explain giving an example
9. Explain the diagram in the people tools book page no 22-29 with an
example
10. What is the use of 'Set control Field' in Record field properties?
11. What is the use of other components like Activity, Approval Rule set,
Message channel, message mode, Style sheets

20
Activity A workflow map showing the individual steps, events, and
routings that comprise a complete activity within a business process.
Approval Rule Set Workflow maps that provide a visual representation
of approval rules. Virtual Approver and GetApprovers both read Approval
Rule Sets to determine who needs to approve particular transactions.
Message Channel These correspond to groups of message definitions,
and help order messages properly, enhance scalability, and provide a
simple way to define processing characteristics of many similar
messages as a single group.
Message Node The physical systems (application servers or databases)
connected to the messaging network.
Style Sheets A collection of styles that can be used by Internet
Architecture application pages.

12. If there are more than one table involved in a grid, how does one
access the values using scroll or Rowset methods?
13. If a field’s processing mode is set to Deferred or Interactive which one
will take precedence?
14. How to implement a Modal Component?
DoModalComponent launches a modal component. The modal component launches
from within an originating component. Once the modal component displays, the user
can't proceed with changes to the originating component until either accepting or
canceling the modal component.
Modal components can be displayed in any of the following action modes: Add,
Update/Display, Update/Display All, Correction. A modal component can be launched
from any component, including another modal component. You can use
DoModalComponent from a secondary page.
The syntax follows:
DoModalComponent(MENUNAME.menuname, BARNAME.barname,
ITEMNAME.menuitem_name,
COMPONENT.component_item_name, action, RECORD.shared_record_name [,
keylist])
where keylist is a list of field references in the form:
[recordname.]field1 [,
[recordname.]field2]...

Or
&RecordObject1 [, &RecordObject2]. . .

The originating component and the modal component share data, including search keys,
via a Shared Work Record or the values in the fieldlist parameter. If valid search keys
are provided in the shared work record and populated with valid values before launching
the modal component, the search is conducted using the provided search key values. If
the fieldlist parameter isn't use and no search keys are provided, or if search key fields
contain invalid values, the user accesses the modal component via a search dialog.

15. How to delete an object from the database permanently through


application designer in PeopleSoft?
16. How are constraints, rules and checks implemented in PeopleSoft?

21
17. What are incident lists in Project Properties?
Maintenance projects contain special properties called Incident IDs and
Dependencies. Incident IDs and Dependencies, which are just Incident
IDs that are dependent on other incidents, track the incidents and
dependent incidents that have been included in the project. A
maintenance project is a new PeopleSoft object to be used when you are
copying a maintenance release database to a target database. In addition
to simplifying the software upgrade, maintenance projects support the
Tracking of applied software fixes in a log and Handling of dependency
incidents.
PeopleSoft uses the incident tab to specify incidents related to the
maintenance project.
If you are tracking your own incidents, enter the names of the fixes, or the
incident IDs fixed in this project. The system logs them to the
PS_MAINTENANCE_LOG file and they will be included when the project
is copied.
We recommend that if you enter an incident or update ID, use a character prefix.
PeopleSoft fixes use numeric IDs; for example, 0000000000012345.
Click the Add or Delete button. Click OK when finished adding or
deleting incidents

18. Where are data validations performed? At the application level or the
Database level.
19. What is an Image reference field? Where can it be used?
An Image Reference Field is used to change an image dynamically at
runtime using PeopleCode
After you create an image definition in Application Designer, if you want
to associate it with a field at runtime, the field has to be of type
ImageReference. An example of this is referencing a red, yellow, or
green light on a page, depending on the context.
To change the image value of a ImageReference field
1. Create a field of type ImageReference.
2. Create the images you want to use. These images must be saved in
Application Designer, as Image definitions.
3. Add the field to a record that will be accessed by the page.
4. Add an image control to the page and associate the image control
with the ImageReference field.
5. Assign the field value.
Use the keyword Image to assign a value to the field. For example:
Local Record &MyRec;
Global Number &MyResult;
&MyRec = GetRecord();
If &MyResult Then
&MyRec.MyImageField.Value = Image.THUMBSUP;
Else
&MyRec.MyImageField.Value = Image.THUMBSDOWN;
End-If;

22
20. What is the difference between “Alter in place” and “Alter by table
Rename”?
21. What is the significance of multiple currency field in page field
properties?
A multiple currency field identifies the control as associated with multi-currency
processing. This causes the field to be shown at runtime only if the Multi-Currency
switch on the People Tools Options page is selected.

22. What is the difference between a secondary panel and a sub panel?
23. What difference does it make when a component is saved at the client
level or Application level?
None
24. What difference does it make when a component is built at the client
level or Application level?
None
25. What is the difference between search record and Add search record?
26. When you go to a Popup menu from a field (by right clicking &
choosing), does the fieldchange event get triggered?
No.

27. What is the major difference between a image object and Image
reference object?
An Image Field is used for storing images in a user defined format, such
as bitmap (BMP) or Postscript (EPS). Image fields cannot be changed at
runtime.
An Image Reference Field is used to change an image dynamically at
runtime using PeopleCode

28. What is the principal use of having Multiple labels to the same field?
29. In case of Custom Field Format, is there a possibility of adding our
own Custom format, if so, How?
No.
30. What does the Display Option for a field property do?
31. What is the Family Option for a field property?

PeopleCode

1. What is the difference between object-based programming and object


oriented programming?
2. What are the different data types that can be used in people code?
3. What is set processing? How does it help?
4. What are the different classes available in PeopleSoft? Explain the
important ones with their Methods and Functions.
5. How do you handle errors in PeopleSoft apart from using Message
severity?
6. What is deferred Processing? At what levels can this option be
chosen? What is the difference?

23
7. What is meant by Built in SQLExec functions? How to use input
parameters, bind variables and output variables in them? Explain
giving examples?
8. When is a peoplecode written in search save event?
9. Explain the flow of related events in peoplecode and what people code
is best written in which event?
10. How to debug a PeopleCode Program
11. How to pass multiple parameters to a function in peoplecode?
12. What are the different built in functions available in peoplecode?
13. Can one create new Class?
14. PeopleSoft has its own Java object libraries. For example it has in built
Java objects like Rowset, Record, Field etc. Can you define your own
Java object? If so how do we define and access the methods of
object?
15. Data Buffer Classes - usage of Rowset, Record, Row and Field.
16. What is set Processing? Explain the concept behind set processing.
17. In case of a fetch, if the record is empty where the cursor will point or
what value it returns?
18. How is external peoplecode function declared?
19. Rowlevel, Object Level Security etc.
20. What is the significance of Itemselected event usage on popup menu?
ItemSelected processing occurs when a end-user chooses a menu item from a pop-up
menu. This fires the ItemSelected PeopleCode event, which is a menu PeopleCode
event.

21. Is there a way to find out the last accessed ID and time for a
PeopleCode?
%UserId returns an uppercase character string containing the user currently logged on.
This is typically used to restrict access to records or fields to specific users.
%DateTime returns the current server date and time as a Datetime value.
Using these system variables the system can be customized to get hold of
the values asked for.

Application Engine

1. What is dynamic call in application engine? How is it useful, explain


with an example
2. How do we create multiple state record for an application engine
program? give an example
3. How is the buffer space allocated and filled?
4. What are META SQL? Why are they used. What is their advantage?
5. What is an XML File Layout?
6. How to debug an Application Engine Program?
7. Under "Do Select" action one can select "Bulk Insert" option. Why
there is an insert option for an action that is basically for selecting
data?
By buffering rows to be inserted, some databases can get a considerable performance
boost. Application Engine offers this non-standard SQL enhancement on the following

24
databases: Oracle, Microsoft SQLServer and DB2. We call this feature Bulk Insert. For
those database platforms that do not support bulk insert, this flag is ignored.
You should only consider using this feature when the INSERT SQL is called multiple
times in the absence of intervening COMMITs.
Application Engine ignores the Bulk Insert setting in the following situations:
 SQL is not an INSERT.
 SQL is other than an INSERT/VALUES statement that inserts one row at a time. For
instance, the following statements would be ignored: INSERT/SELECT, UPDATE, or
DELETE.
 SQL does not have a VALUES CLAUSE.
 SQL does not have a field list before the VALUES clause.
In the previous situations, Application Engine still executes the SQL; it just doesn't take
advantage of the performance boost associated with Bulk Insert.
If you want to re-prepare or flush a Bulk Insert statement because one of the static binds
has changed and the SQL has to reflect that, use %ClearCursor. A flush also occurs
automatically before each commit.

8. How to use a File Object to put flat file to the database?


9. What is the usage of Application Engine Libraries?
10. When to use Temporary tables and when to use State tables?
11. Which Meta Database the system variables are stored? (Like
%DATE)?
12. Explain SQL Class and the related built in functions?
13. How to make use of XML file tags to populate the table?
14. We can have more than One State records. But only one will be
selected by default at a time. At runtime if we want to take the other
state record how to take it?
15. Usage of PS_AEONLINEINST (Online Temporary table allocation).
16. How to access legacy codes like COBOL programs when in process
scheduler?
17. How to view a query built using a META SQL from the database?
18. Is PTPEMAIN the main COBOL process that processes all the actions
in 8.0 or any other process does these? Elaborate on the components
that process all the actions and how these are executed?
19. Why doesn't the 'SQL' action appear under a 'Call Section' Action?
‘Call Section’ action is only meant for calling another section and can
include a section name only.

Component Buffer

1. Explain the different OCCURS levels with an example?


2. Explain with an example how to traverse the data buffer with a multiple
scroll level?
3. Explain the diagrams in the People code Book page 13-2 and 13-3
with examples?
4. How can we view data in a component buffer? If yes can we have a
demo on that?
5. What are standalone Rowsets? Where and why are they used?

25
Standalone Rowsets are like regular Rowsets except they aren't tied to a Component or
Page. Use them when you need to work on data that isn't tied to a component or page
buffer.
Just like any PeopleTools object the scope of standalone rowsets can be Local, Global or
Component. Consider the following code:
Local Rowset &MYRS;

&MYRS = CreateRowset(RECORD.SOMEREC);

This creates a Rowset with SOMEREC as the Level 0 record. The Rowset is
unpopulated. Functionally it is the same as an array of records.
To populate the standalone Rowsets you can use the Fill rowset method, the CopyTo
rowset method or the record methods.

6. What are the different methods of the different data buffer classes?
7. Component Processor Flow - Explain the diagram on Page 3-7 in the
peoplecode book.
8. Flow of search processing in Add mode, Component Build processing
in Add Mode,
9. How long will the local and component variables last in a session?
10. How does component processor allocates buffer to hold data at run
time if a structure is defined?
11. Should I do a flush before the data is selected or will it flush
automatically? Is it mandatory to follow?
12. Is there a maximum limit of data that a buffer can hold? Can it be
specified explicitly?
13. Can you have two different search records to be used in two different
situations? Can this requirement be handled in PeopleCode?
14. What are component record fields? How are they different from Field
and record fields?
15. How can a component record field peoplecode be accessed?

PEOPLE CODE

1. Display HTML object using PeopleCode?


2. Display Image on Page Programmatically?
3. Programmatically change the Style Sheet to Pages & Classes to Page Controls?
4. Reading Component Buffer using Object Oriented PeopleCode?
5. Hide- Fields, Scrolls, Pages, Components (Menu Items) Programmatically?
6. Generate Charts using Chart controls by getting data from Database?
7. Reading Data from one Grid to another Grid?
8. Without Using Secondary Page Button to access Secondary Page?
9. Menu item (PeopleCode) fromPop-up Menu?
10. Work on SavePostChange Practically?
11. Change Text on Search Page?
12. to Display one Message if you are adding a value and another message if you are
searching a value?
13. Study ‘DoModal’ function

26
14. Study ‘%subrec’ Meta-SQL
15. Update other tables using SavePostChange
16. Study RowInit PeopleCode
17. Auto generate numbers
18. Study Integration PeopleCode
19. Study Scroll Buffer Functions
20. Study how to populate default values from Default Hierarchy?
21. Study how to Populate default values from Usert Preferance
VP1 – Particular Business Unit as Default
VP2 – Another Business Unit as Default
22. Study SearchSave PeopleCode & SearchInit PeopleCode
23. Use Tab Separator with PeopleCode in Grid (Study Sales Order form)
24. Dyanmic prompt using PeopleCode
25. Schedule Process fromPeopleCode
26. Study Department Component
27. Write validations against Array/Rowset
28. Programatically change Label for control?
29. Programatically select the page from Drop Dowm List represented from Translate
value of the Field?(Depending on page select or display Translate Values)
30. Read Data from Component Buffer to File?
31. Programatically chane the Field Label Based on input?

SQR

1. Flat File to Database for Parent/Child Relationship


2. Database to File for Parent/Child Relationship
3. How to Handle Problems for forgetting Rows while Reading?
4. Study BEN007.SQR
Interview Questions
1. Difference bet. SQR process and SQR report?
2. Difference bet. SQR and Crystal Report?
3. How do you reference global variable in local procedure?
4. What validations you will write in save post change?
5. How do you retrieve data from database in peoplecode?
6. Difference between field change and field edit?
7. What are the steps and actions in AE?
8. What event fires when you active and inactive radio button and check box?
9. Retrieve the max. rows from JOB table?(emplid, empl_rcd, effdate, effseq)
10. What is effective date?
11. What are the actions in application designer?
12. What is effective sequence?
13. Suppose I have 100 rows in table A and 3 rows in table B. Retrieve the rows from
the both tables where 2 rows are same?
14. What is inner join, outer join and equijoin?

27
15. PIA-Jolt is a protocol or server?
16. About Multiple reports?
17. What are heading SQC’s?
18. HRMS Business Process
19. What is significance of emplid?
20. If A and B field values are changed, C should be changed which is a derived work
record. In which event you will write the code & on which filed?
21. What is prior value function? In which events you will write this function?
22. What is –Bnn?
23. Difference between ps_employee and ps_employment?
24. Diff. between job code and emplid?
25. How do you create database in crystal reports?
26. How do you stop the AE process in the middle if the process aborts or error
occurred? How you will restart from the beginning?
27. What is error and the warning?
28. Retrieve the data from job table and display birthdate?
29. Can we open .doc,.txt files in SQR?
30. What the difference is between ask and input commands?
31. What are the two stages in SQR program?
32. Difference between show and display commands?
33. How do you create a prompt query?
1. SQR - How to create multiple records in SQR

2.What is the difference between DataMover and Import Manager.

3.What are the SQC's that mostly used in SQR.

4.What is peopleSoft Internet Architecture.

5.What is Effective Date, Current Row, History Row and Feature Dayed
Row.

6.Recruitment WorkForce -- what is the process?


How to hire an employee through peoplesoft.

7.What is the difference report process in SQR?

8.Upgrade Over All high level 7.5 to 8

9.Import Manager -- what people code events fine & don't fine

10.Application Engine -- Advantages over SQR.

1. Question is not clear i didnt get what exactly


Using Begin - Sql inside that we give Insert Statement and specific
record.

2. a. Datamove is to Import or Export Data Between the Same Version of


Peoplsoft eg 7.51 only.
b. introduces you to Data Mover—a PeopleTool that enables you to
import and export data across multiple database platforms.

28
a.where as Import Manager we can do data transfer between diff
version od Peoplesoft
b.enables you to import one data into your database, validating
field values against field edits and PeopleCode.

3.SQCs are nothing but Include files or header files which have some
statndard routines
setenv.sqc ------Set environment
setup01.sqc' ---- !Printer and page-size initialization
setup01.sqc
'curdttim.sqc'
'datetime.sqc'
'number.sqc'
'datemath.sqc'
stdapi etc

4.It is an 3 tier Architecture.it represents a move to 100% internet.in


short PIA.
Client
webserver
Appserver
Database server

Advantages : Easy Access,P/f Independent,Look and Feel,Low bandwith


Access,

Where u will have windows and web client.

5.effdt is which it mains the History/Current/Future of a row of data.

6.In Recruit Workforce where Requisitions for openings and searching


for Candidates having Required skill then conduct intervies etc.

Hiring Process -- It is done Throu Adminster Workforce -use.

1.Advertisement
2.Receiving Applicatio
3.Screening
4.History Checking
5.Check for Previous Job Exp
6.Interview
7.Pre Emplyment Checking --Probation Period in India
8.Substance Abuse for Checking Alchohol & Drugs.

I am not about this.

7.Repot is which u will get an Output in a readable and table like


structured manner.
where Processs will execute some COBOL or SQR Process so that it will
update some tables.

8.Plan Upgrade
Prepare copy of Production
Installing New Release

29
Upgrading People Tools
Running and Reviewing Compare Reports
Applying Application Changes
Completing Copy of Production
Moving to Production

9.PeopleCode that Executes During ImportsField Edit

Field Formula
Row Init
Save PreChg Process
Save PostChg
Save Edit
Workflow

PeopleCode that Does Not Execute During ImportsField Change

Field Defaults
Row Select
Row Insert
Row Delete

10.Application Engine is the PeopleTool that you use to develop batch


or online programs that are effective alternatives to COBOL or SQR
programs (for non-report processing).
Using Application Engine, you can create programs that perform
high-volume, background processing against your data.

Where as we use SQRs for Reports generation.

APPLICATION ENGINE
What is Application Engine?
Application engine is tool used for mass update purpose.
What is Section / Step / Action ?
Section is a set of ordered steps that gets executed as part of program.
Step is logical grouping of statements to be executed in program.
Action is self explanatory.
What is Built In Restart Logic ? What settings are required for the same?
If there is an abnormal termination or failure on a step in the program, the end user can
restart the request from the last successful checkpoint. The user can restart the program
from the process scheduler request page.
The settings required are
One state record has to be Physical
The disable restart option in AE properties should be unchecked.
If DO-Select action is selected then the Select Type has to be either Reselect or
Restartable.
In the Section properties the Section type should be Critical Update.
What are the properties of Section / Step and Action ?
The Properties of Section are :
Effective Date
Section Type – Proper Only / Critical Update

30
Access – Public
Auto Commit
The properties of Step are :
Commit After – Default / After Step / Later
Frequency – Will get activated if there is action DO-Select or SQL
On Error – Abort / Ignore / Suppress
The properties of Action are depending on the action selected. The most important
actions are DO-SELECT, Peoplecode, SQL, Call Section and Log Message.
What do you mean by Setting “Critical Update” property in Section ?
It means the program is restartable. The value of this property will be stored in
AERUNCNTRL table of peoplesoft.
At which places you can set the commit levels ?
You can set the commit level at Section / Step. In section there is property Auto Commit
and in Step it is Commit After.
Which actions and mutually exclusive ?
SQL and Call Section
How many actions you can have in one Step ?
8
What is Set processing ?
Set processing is used to process the group of records at a time. For example if you want
to insert some group of records based on certain condition, then check the condition on
entire group of records and stored the satisfied records in Temporary table. Then insert all
records in Table from Temp Table by SQL action

What is State record and Temporary record and their functionality?


The state record is used to pass variables between different steps. The state record should
be either Physical or Temporary records.
What is meta SQL and their purpose in AE ? Explain some functions.
Meta SQL is the repetitive used SQL. The used meta SQL in AE are %Select and %Bind.
What is %Select and %Bind ?
The % Select is used to update the State Record variables.
The %Bind variables are used to retrieve data from the State record variables.
What are the advantages of AE over SQR ?
Following are the advantage of AE over SQR
Built in Restart Logic
Platform Flexibility
Good Graphical User Interface
Enhanced use of SQL and Meta SQL
Code completely stored in Database which will help in further up gradation.
What is the key field in State record ?
Process_Instance
How do you import data through AE?
You can import data through AE with the help of Flat File Layout. In Flat File Layout
there is option in Edit Menu to Generate Import AE program. The same option is

31
available only if you attach some sample test file to Flat File Layout in the properties of
Flat File Layout.
What is Flat File layout ?
The Flat File Layout is used while preparing the Import and Export data for third party
applications. The Flat File Layout is the exact replica of the external files received from
third party.
From where you can test the AE?
The AE can be tested from Followings
In Application Designer there is option of Test AE in Right Click menu or in Tools menu
of main menu.
Command Line Prompt.
Request AE page in Peopletools / Application Engine
Peoplecode with the help of CallAppEngine()
How do you debug AE ? What is the location of Trace File ?
The debugging of AE is possible only if you set option as Debug in Configuration
manager / Profile (Default) / Process Scheduler / Application Engine. The debugging is
mostly done with the help of Trace File. Trace file shows the entire log depending on the
parameters you set in the Trace Tab of Configuration manager. The Options available in
Trace are for Step / SQL / Dedicated Temporary Table / Statement Timings of SQL /
How do you do performance tuning of SQR?
The performance tuning of SQR is analyzed with the help of Trace File SQL statement
time executions.
What are the steps required before start coding of AE Program ?
The steps required are
Gather the Requirements of Program
Design the State and Temporary records
Design the Fields of State and Temporary records.
Prepare SQL statements and test the same with some dummy data.
Where you can set the effective date of Application Engine?
In Properties of Section.
What is Do-Select ? What are do select Types and explain them in detail ?
Do-Select is used to select the group of records based on certain conditions. The do select
Types are
Select / Fetch : In this the buffer is prepared for the entire group of records and AE fetch
each record from the buffer. Here the AE does not create any checkpoint for this section
type.
Reselect : The Cursor is prepared for every new row fetched from database.The
checkpoint is prepared for every row fetched from database.
Restartable : The restartable is like Select and Fetch but the difference is only that
checkpoints are created for every row. This settings plays very important role in Built In
Restart Logic.
What is Reuse property of SQL and Do-Select ?
The Reuse property is used for Compilation Purpose. The options available in Reuse
Property are Bulk Insert / No / Yes. Yes means compile the code for every execution of
SQL used in Action.
When frequency property of Step is enabled and what is the use of it ?

32
The Frequency property of Step is enabled only if the Step contains either SQL or DO-
SELECT action. You can enter numeric in this setting and it means that records gets
commited after number of records (which was defined in Frequency parameter)
processed.
What is the checkpoint in AE and when it is going to be used ?
The Checkpoint in AE is to keep track record of executed section / step and action. The
executed Section, Step and Action is stored in AERUNCNTRL record.
What is Disable Restart property of AE ?
The disable restart property is used to restart the Restarting of Terminated AE program.
How do you export data from Peoplesoft in File with AE ?

What is the execution sequence of AE program ? Can you change the name of Main
Section ?
The execution sequence of AE is Main Section / Step and Action. The Main section
executed first and later the sections called from the different steps.
What is Log Message and its usage in Application Engine Program ?
The Log Message is used in AE program to know the successful execution of AE
program.
What is the return parameter from Peoplecode Action? Is it Numeric or
Character ?
The return parameter from Peoplecode indicates the successful execution of Action. It is
numeric and is 1 and 0. 1 means successful execution and 0 means with some errors. You
can refer True or False in the Program.
What Application Engines you have worked on ?
The Application engines worked on are United Gateway / Metlife / Vanguard.

CallAppEngine()

To call a particular Application Engine program from a page using PeopleCode, you must
use the CallAppEngine() function in your SavePreChange or SavePostChange
PeopleCode

Use CallAppEngine when you have a complex, SQL intensive business process that must
run in batch and online or the process requires the use of dedicated temporary tables

SQLExec
The SQLExec function executes a SQL command from within a PeopleCode program by passing
a SQL command string. The SQL command bypasses the Component Processor and interacts
with the database server directly. If you want to delete, insert, or update a single record, use the
corresponding PeopleCode record object method.
If you want to delete, insert, or update a series of records, all of the same type, use the
CreateSQL or GetSQL functions then the Execute SQL object method.

Limitation of SQLExec SELECT Statement


SQLExec can only SELECT a single row of data. If your SQL statement (or your SQL.sqlname
statement) retrieves more than one row of data, SQLExec sends only the first row to its output
variables. Any subsequent rows are discarded. This means if you want to fetch only a single row,

33
SQLExec can perform better than the other SQL functions, because only a single row is fetched.
If you need to SELECT multiple rows of data, use the CreateSQL or GetSQL functions and the
Fetch method. You can also use ScrollSelect or one of the Select methods on a rowset object to
read rows into a (usually hidden) work scroll.

PEOPLECODE

What are events in Peoplesoft Version 8.x ?


The events in Peoplesoft are –
Field – Field Change / Field Default / Field Edit / Field Formula
Record – Row Insert / Row Delete / Row Select / Row Init
Page – Activate
Components – Search Init / Search Save / Pre Build / Post Build / WorkFlow /
Prepopup / Save Edit / Save Pre change / Save Post change
Menu – ItemSelect

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.
Field Default : The FieldDefault PeopleCode event enables you to programmatically set
fields to default values when they are initially displayed. This event is fired on all page
fields as part of many different processes.
Field Edit : 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 Formula :
ItemSelected : The ItemSelected event fires whenever the end-user selects a menu item
from a pop-up menu.
Pre Build : 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
Post Build :
How many total events are there?
19
What is the difference between Field Edit and Save Edit? What’s their
functionality?
The Field edit is used for validate the data in Field and Save edit is used to validate the
data in the Field residing on Page. You can use Error and Warnings field in these events
only.
What are types of Function in Peoplecode?
The types of Functions in peoplecode are –
Built In Functions
External
Internal
What is the purpose of Field Formula ?
The Purpose of Field Formula is now used for storage of functions executed on that field.
It has become like Library for functions.

34
What is the sequence of Firing of Events in Add Mode / Update Mode ?
The Sequence of Firing of Events in Add Mode are –
Add Mode Update Mode
Search Init Search Init
Search Save Search Save
Pre Build Row Select
Field Default Pre Build
Field Formula Field Default
Row Init Field Formula
Post Build Row Init
Activate Post Build
Field Change Activate
Row Insert Field Change
Row Delete Row Insert
Save Edit Row Delete
Save Pre Change Save Edit
WorkFlow Save Pre Change
Save Post Change WorkFlow
Save Post Change

What is Add Mode / Update Display / Update Display All and Correction ?
Add Mode – User can create the row for current effective date.
Update Display – In Update Display user can update the current row as per the current
effective dated row.
Update Display All – User is allowed to modify the current and future dated rows.
Correct – All rows i.e History and Future is allowed to modify for user.
What are the Data Buffer classes ?
The data buffer classes are RowSet / Row / Record / Field
How do you refer field in Scroll Level 3 for any calculation ? Explain the steps.
You can refer the field in Scroll Level 3 with the help of following code –
&RSLevelo = Getlevel0()
&Row0 = &RSLevelo.Getrow(1)
&RSLevel1 = &Row0.GetRowset(Scroll.Scroll1)
&Row1 = &RSLevel1.Getrow(Currentrownum())
&Record1 = &Row1.GetRecord(Record.RecordName)
&Field = &Record1.GetField()
Which are system variables ?
The System variables are inbuilt variables in Peoplesoft. The System variables are
indicated by % in Peoplesoft.
At which places you can add the Peoplecode ?
You can add the peoplecode in Field Level / Record Level and component Level.
What are the changes you did in peoplecode of Current project ?
1. Change the references of objects like fields & records as per data mapping.
2. Follow the data buffer classes standards of people Tools 8.43 for new
development.
3. Use MetaSQL instead SQLexec due to the recommendation of Peoplesoft.

35
4. Use Msgbox instead of WinMessage because the Msgbox uses the message
catelog from database. It will help in further up gradation.
5. Debugging of Peoplecode. Choose debug in Application designer has an
option to enable the debugger for peoplecode.
When commit is issued in Peoplecode program i.e. at which event ?
The commit is used in Peoplecode program after Save Post change only.
What is deferred processing ? and where can you set the same ?
When a component is running in deferred processing mode, trips to the server are
reduced. When deploying some pages in the browser, you may want the user to be able to
input data with minimal interruption or trips to the server. Each trip to the server results
in the page being refreshed on the browser, which may cause the display to flicker. It can
also slow down your application. By specifying a component as Deferred Processing
Mode, you can achieve better performance.
If you've specified Deferred Processing Mode for a component, you can then specify
whether a page within a component, or a field on a page, will also do their processing in
deferred mode. The default is for all pages and fields to allow deferred processing.
Specifying that a field or page allows deferred processing, then not setting the component
to Deferred Processing Mode, will not start deferred processing mode. You must set the
component first.
You can set the deferred processing in
1. Field Level
2. Page Level
3. Component Level

What is the scope of Variable in Peoplecode ?


The Scope of Variable in Peoplecode are
Global
Component
Local
How do you define Global / Component and Local Peoplecode Variable ?
You can define the Global and Component variable in the beginning of Peoplecode
program. The syntax for definition is
Explain Following commands in detail .
All : Checks to see if a field contains a value, or if all the fields in a list of fields contain
values. If any of the fields are Null, then All returns False.
None : None takes an arbitrary number of field names as parameters and tests for values.
None returns True if none of the specified fields contain a value. It returns False if any
one of the fields contains a value.
Fetch Value : FetchValue returns the value of a buffer field in a specific row of a scroll
level
Update Value : Update Value updates the value of a specified field with the value
provided. The value must be of a data type compatible with the field.
UpdateValue(RECORD.ASGN_CMP_EFFDT, &I, ITEM_SELECTED, "Y")

36
Do Modal : The DoModal function displays a secondary page. Secondary pages are
modal, meaning that the user must dismiss the secondary page before continuing work in
the page from which the secondary page was called.
If you call DoModal without specifying a level number or any record parameters, the
function uses the current context as the parent.
DoModal(PAGE.pagename, title, xpos, ypos,[level, scrollpath, target_row])
CallAppEngine :
CallAppEngine starts the PeopleSoft Application Engine program named applid. This is
how to start your Application Engine programs synchronously from a page. (Prior to
PeopleTools 8, you could do only this using RemoteCall.) Normally, you won't run
PeopleSoft Application Engine programs from PeopleCode in this manner. Rather, the
bulk of your Application Engine execution will be run using the Process Scheduler, and
the exception would be done using CallAppEngine.
The staterecord can be the hard-coded name of a record, but generally you use a record
object to pass in values to seed particular state fields. The record name must match the
state record name exactly.
The processinstance allows you to specify the process instance used by the Application
Engine runtime. In your PeopleCode program this parameter must be declared of type
integer since that is the only way the runtime can tell whether the last parameter is to be
interpreted as a process instance. For more details see the Application Engine
documentation.
CallAppEngine(applid [, statereclist, processinstance ]);

IsChanged

IsDeleted

Error MsgGet
The text of the error message (the str parameter), should always be stored in the Message
Catalog and retrieved using the MsgGet or MsgGetText function. This makes it much easier for
the text to be translated, and it also enables you to include more detailed Explain text about the
error.
When Error executes in a PeopleCode program, the program terminates immediately and no
statements after the Error are executed. In other respects behavior of Error differs, depending on
which PeopleCode event the function occurs in.

Error MsgGet(11100, 180, "Message not found.");

WinMessage
The WinMessage function displays a message in a message box.
WinMessage(message [, style] [, title])

Gray / Ungray
Hide / Unhide

Evaluate
Use the Evaluate statement to check multiple conditions. It takes an expression, left_term, and
compares it to compatible expressions (right_term) using the relational operators (relop) in a

37
sequence of When clauses. If relop is omitted, then = is assumed. If the result of the comparison
is True, it executes the statements in the When clause, then moves on to evaluate the
comparison in the following When clause. It executes the statements in all of the When clauses
for which the comparison evaluates to True. If and only if none of the When comparisons
evaluates to True, it executes the statement in the When-other clause (if one is provided).
To end the Evaluate after the execution of a When clause, you can add a Break statement at the
end of the clause.

%Dateout
%DateOut(dt), where dt is a date column, expands to a platform-specific SQL substring
representing dt in the SELECT clause of an SQL query

%DateIn
%DateIn(dt), where dt is either a Date value or a date literal in YYYY-MM-DD format, expands
into platform-specific SQL syntax for the date. %DateIn should be used whenever a date literal or
Date bind variable is used in a comparison in the WHERE clause of a SELECT or UPDATE
statement, or when a Date value is passed in an INSERT statement.

%Date
%Date returns a Date value equal to the current server date.

How do you declare a function in Peoplecode ?


Declare Function function_name PeopleCode record_name.field_name event_type
Declare Function function_name Library lib_name
[ALIAS module_name]
[paramlist]
[RETURNS ext_return_type [As pc_type]]

What are the data types of Peoplecode Variable ?

SQR
What is advantage of SQR over AE ?
Very good for Reporting.
Easy manipulation of data from third party Interface Files
Facility to edit the data as per the format required.
How do you use SQR for Exporting data from Peoplesoft to a Flat File?
Open the flat file with the total record size of File Record.
Read record by record from Flat File field by field or in complete one record.
Do the data manipulation based on the requirement and write it into a file.
If there is separator required then you can use the command String and Unstring.
How do you debug SQR ?
You can debug SQR with the command #Debug in SQRW.exe or with the command
SHOW and DISPLAY in SQR code.
What is the difference between Show and Display ?
The difference between command SHOW and DISPLAY is that Show is used for
multiple variables to see data where as DISPLAY is used to see data from single variable.

38
How do you display value on screen while debugging on same line using Show and
Display Command ?
You can use command NOLINE with show or display.
What is the difference between Ask and Input ? Where you can place Ask command
The difference between ASK and Input is that you can use ASK command in SETUP
section where as you can use INPUT command in any procedure. ASK is executed
during compilation of Program.
What are the command line Parameters ? Explain them in detail.
-S : Requests that the status of all cursors be displayed at end of report run. This
information can be used for debugging SQL statements and enhancing performance and
tuning.
-ZIV : Invokes the SPF Viewer.
-F : Overrides the default output file name report.lis.
-ZIF : Sets the full path and name of the SQR initialization file SQR.ini.
-ZMF : Specifies the absolute pathname of the error message file.
-RS : Saves the program in run time file. i.e. SQT
-T : Specifies that if you want to test the program for particular number of pages.
-I : Location for the SQC files used in program.
-C : Specifies cancel dialog box while program is running.
-O : Directs the log message to specified file or program.log
-NOLIS : Prevents creation of lis files instead of .SPF files are created.
-A : Caused output to be an appended to an existing output file of the same name.
-B : Indicates the number of rows to buffer each time data is retrieved from the database.

What is SQC?
It contains repeatative usage of SQR code. You can call this SQC in SQR program with
the help of #include command.
What is Compilation and Execution phase of SQR?
Compilation Phase :
1. Includes all SQC
2. Execute all LOAD-LOOKUP variables.
3. Execute ASK variables.
4. Execute substitution variables.
5. Check the Syntax.
Execution phase :
1. Begin Program
2. Begin Header
3. Begin Footing
4. Allocate page size accordingly.
What are the main sections of SQR?
The main sections of SQR are Setup / program / heading / Footing / Procedure
What is the use of EDIT command ?
Edit command is used to format the data.s
How do you tune the Performance of SQR?
You can use followings to tune the performance of SQR
1. Simplifying a complex SELECT statement

39
2. Using LOAD LOOKUP to simplify joins
3. Using Dynamic SQL
4. Examining Cursor Status
5. Using an array or Flat File instead of a Temporary database Table.
6. Writing Programs that create multiple reports
7. Tuning SQR numerics
8. Running compiled Programs with SQR execute.
9. Buffering fetched rows
10. Execute program on server.

What is the primary section in SQR?


The primary section of SQR is BEGIN-PROGRAM . BEGIN-REPORT END-REPORT
What are common SQC’s required in SQR ?
The common SQC’s required are STDAPI.SQC
What is the meaning of ON-BREAK and LEVEL in SQR ?
ON-BREAK performs special processing when value changes, such as
How ON-BREAK gets executed in SQR ?

What is the usage of SAVE parameter in On-BREAK ?

Why do you use BEGIN-SQL ?

What is #If and #EndIf used for ?

What is .SQT files ?

How do you Open / Read and Write File in SQR ? What are the options available in
Record parameter of READ command ?

What is Begin-Report and End-Report?

How do you change the font ini SQR for particular line and reset it to original font ?

How do you use multiple reports in SQR ? Explain in details the steps for the same?

How do you define local procedure in SQR and how do you refer local variables in
SQR?

How do you define procedure for return parameters ?

Where do you set the location of SQR in configuration manager ?

PROJECT MANAGEMENT INTERVIEW


What type of Project you are working on ? Explain in detail ?

40
What is the version of Peoplesoft Tools / Application / SQR / Unix / Oracle /
Mainframe ?
Mainframe – MVS Operating System ISPF 5.0 (Interactive System Productive Form)
PeopleTools – 8.43
Application – 8.8
Unix – AIX 5.0
Oracle – 9i
What is your role in project?
Senior Programmer working as Leadership role. Distribution of work to amongst team
members.
How do you manage the Onsite and Offshore projects ?
Get the requirements from Onsite coordinator.
What is the procedure to upgrade Peoplesoft from Ver 7.5 to Ver 8.3 ?
1. Freeze the copy of production. No changes made to people tools tables
2. Take a copy of 7.5 production database
3. Prepare copy of 8.8 demo database for compare
4. Upgrade the 7.5 production copy to the 8.43 tools with the help of project
UPGOPT. With this you will make the PeopleTools same version for both the
databases.
5. You can compare the Application database by two ways.
a. Install the Upgrade assistant on you server. The assistant has pre
defined steps to upgrade the 8.8 demo database as per the 7.5 database.
Note that all the processes gets executed on the 8.8 database base.
b. The second option is you have facility in Tools menu of Application
designer to compare the two database. It will give you output in
reports mentioning the clear difference in Application objects. The
business team will check the reports and take decision of migrating
objects.
6. Prepare a project as per the decision making for the objects to be migrated to
the development database.
How do you send your changes to Onsite team ? i.e. Setup related to Team
Development.
Migrate the objects to a middle level server. Onsite Database Administrator will update
the production server based on User Acceptance Testing. Upload the third party objects
on Unix server through FTP.
Do you have Quality control and if yes what is the procedure ?
Ans : Code Review and make the necessary changes based on standards and requirement.
Quality standard vary from client to client. Follwing clients standards.
How do you communicate with your client ?
Variopus methods email / Review Meeting / Phone / Net meeting with Concerned Person
(Designer).
How do you get the work from onsite team ?
Get the design document from the Ftp site as per the programs allocated to you. Defined
format of Specification document.
What is your primary skills other than Peoplesoft ?

41
Why do you want to leave IBM ?
Do you have any exposure to database administration type of work ?
How do you manage backup of your development work ?
Export the project into a file.
Zip the Third party objects twice in weekly basis.

PeopleCode

Record Field Component Component Component Page Menu


Record Field Record

FieldChange FieldChange RowDelete PostBuild Activate ItemSelected


FieldDefault FieldDefault RowInit PreBuild
FieldEdit FieldEdit RowInsert SavePostChg
FieldFormula PrePopup RowSelect SavePreChg
PrePopup SaveEdit Workflow
RowDelete SavePostChg
RowInit SavePreChg
RowInsert SearchInit
RowSelect SearchSave
SaveEdit
SavePostChg
SavePreChg
SearchInit
SearchSave
Workflow

Record Peoplecode

FieldChange:

Definition: 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
Example: Suppose you have a Derived/Work field called PRODUCT, the value of which
is always the product of page field A and page field B. When the component is initialized
you would use RowInit PeopleCode to initialize PRODUCT equal to A * B when the
component starts up or when a new row is inserted. You could then attach FieldChange
PeopleCode programs to both A and B which also set PRODUCT equal to A * B.
Whenever the end-user changes the value of either A or B, PRODUCT would be
recalculated.

42
Note: The FieldChange event fires on the specific field and row that just changed.
Important: Do not use Error or Warning statements in FieldChange PeopleCode: these
statements cause a runtime error that forces the end-user to cancel the page without
saving changes

FieldDefault:

Definition: The FieldDefault PeopleCode event allows you to programmatically set


fields to default values when they are initially displayed.
Note: This event is fired on all page fields as part of many different processes; however it
only triggers PeopleCode programs when the following conditions are all true:
 The page field is still blank after applying any default specified in the record field
properties. (This will be 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.
Important: If a field value is changed, whether through PeopleCode or by an end-user,
the IsChanged property for the row is set to True. The exception to this is when a change
is done in the FieldDefault or FieldFormula events, that is, if a value is set in FieldDefault
or FieldFormula, the row is not marked as changed.
Do not Use Think Time functions in this event. An Error or Warning issued from
FieldDefault PeopleCode will cause a runtime error and force cancellation of the
component.

FieldEdit:

Definition: 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, showing an error message and turning the field red.
Usage: The FieldEdit event fires on the specific field and row that just changed. Hence
generally used in cases of validations on that particular field.

FieldFormula:

Execution: This event is not used in recent applications.


Usage: As a matter of convention, FieldFormula is now often used in FUNCLIB_
(function library) record definitions to store shared functions. This is purely a matter of
convention, and in fact you can store shared functions in any PeopleCode event.
Note: Because FieldFormula PeopleCode fires in many different contexts and triggers
PeopleCode on every field on every row in the component buffer, it can seriously
degrade the performance of your application. In recent PeopleSoft applications, the
RowInit and FieldChange events are used rather than FieldFormula.

PrePopup:

Execution: The PrePopup event fires just before the display of a pop-up menu.

43
Usage: You can use PrePopup PeopleCode to control the appearance of the Pop-up
menu.
Note: This event, and all it's associated PeopleCode, will not fire if run from a
Component Interface.

RowDelete:

Execution: The RowDelete event fires whenever an end-user attempts to delete a row of
data from a page scroll.
Usage: You can use RowDelete PeopleCode to prevent the deletion of a row (using an
Error or Warning statement) or to perform any other processing contingent on row
deletion.
Example: You could have a page field TOTAL on scroll level zero whose value is the
sum of all the EXTENSION page fields on scroll level one. If the end-user deleted a row
on scroll level one you could use RowDelete PeopleCode to recalculate the value of
TOTAL.
Note: The RowDelete event triggers PeopleCode on any field on the row of data that is
being flagged as deleted.

RowInit:

Execution: The RowInit event fires the first time the Component Processor encounters a
row of data. RowInit is not field-specific: it triggers PeopleCode on all fields and on all
rows in the component buffer.
Do not Use Think Time functions in this event. An Error or Warning issued from
RowInit PeopleCode will cause a runtime error and force cancellation of the component.
Exception: In certain rare circumstances, the Component Processor doesn't run RowInit
PeopleCode for some record fields. The Component Processor runs RowInit PeopleCode
when it loads the record from the database. However, in some cases, the record can be
initialized entirely from the keys for the component. When this happens, RowInit
PeopleCode isn't run.
For RowInit to not run, the following must all be true. If any field of the record doesn't
meet these conditions, the record must be read from the database, and so RowInit
PeopleCode runs.
 The record is at level 0.
 Every record field that is present in the data buffers is also present in the keys for
the component.
 Every record field that is present in the data buffers is display-only.
The qualification "that is present in the data buffers" means that the Component
Processor determines the field is required by the component. In practice, this usually
means that the field is tied to a page field, possibly hidden, for some page of the
component. It could also mean that the field is referenced by some PeopleCode program
that is attached to an event on some other field of the component.

RowInsert:

44
Execution: When the end-user adds a row of data, the Component Processor generates a
RowInsert event
Usage: You should use RowInsert PeopleCode for processing specific to the insertion of
new rows
Important: Do not put PeopleCode in RowInsert that already exists in RowInit, because
a RowInit event always fires after the RowInsert event, which will cause your code to be
run twice.
Do not Use Think Time functions in this event. An Error or Warning issued from
RowInsert PeopleCode will cause a runtime error and force cancellation of the
component.

RowSelect:

Execution: The RowSelect event fires at the beginning of the Component Build process
in any of the Update action modes (Update, Update/Display All, Correction).
Usage: RowSelect PeopleCode is used to filter out rows of data as they are being read
into the component buffer. This event also occurs after a ScrollSelect or related function
is executed.
Note: A DiscardRow function in RowSelect PeopleCode causes the Component
Processor to skip the current row of data and continues to process other rows. A
StopFetching statement causes the Component Processor to accept the current row of
data, and then stop reading additional rows. If both statements are executed, the program
skips the current row of data, then stops reading additional rows.
Important: PeopleSoft applications rarely use RowSelect, because it's inefficient to filter
out rows of data after they've already been selected.

45
SaveEdit:

Execution: The SaveEdit event fires whenever the end-user attempts to save the
component.
Usage: 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.
Note: SaveEdit is not field-specific: it triggers associated PeopleCode on every row of
data in the component buffers, except rows flagged as deleted.
Useful Functions:
 Error Messages
 Warnings
 SetCursorPos

Tip: You can use the SetCursorPos function to set the cursor position to a specific page
field following a Warning or Error in SaveEdit, to show the end-user the specific field
(or at least one of the fields) that is causing the problem. Make sure to call SetCursorPos
before the Error or Warning (because these may terminate the PeopleCode program).

SavePostChg:

Execution: After the Component Processor updates the database, it fires the
SavePostChange event.
Usage: You can use SavePostChange PeopleCode to update tables not in your component
using the SQLExec built-in function.
Do not Use Think Time functions in this event. An Error or Warning issued from
SavePostChg PeopleCode will cause a runtime error and force cancellation of the
component.
Important: Never issue a SQL Commit or a Rollback manually from within a SQLExec
function. Let the Component Processor issue these SQL commands.
Note: If you are executing WorkFlow PeopleCode, bear in mind that if the WorkFlow
PeopleCode fails, SavePostChange PeopleCode will not be executed. If your component
has both WorkFlow and SavePostChange PeopleCode, consider moving the
SavePostChange PeopleCode to SavePreChange or WorkFlow.

SavePreChg:

Execution: The SavePreChange event fires after SaveEdit completes without errors.
Usage: SavePreChange PeopleCode gives you one last chance to manipulate data before
the system updates the database; for instance, you could use SavePreChange PeopleCode
to set sequential high-level keys. If SavePreChange runs successfully, a WorkFlow event
is generated, then the Component Processor issues appropriate INSERT, UPDATE,
and/or DELETE SQL commands.
Important: SavePreChange PeopleCode is not field-specific: it triggers PeopleCode on
all fields and on all rows of data in the component buffer.

46
SearchInit:

Execution: The SearchInit event is generated just before a search dialog, add dialog, or
data entry dialog is displayed. SearchInit triggers associated PeopleCode in the search
key fields of the search record.
Usage: This allows you to control processing before the end-user enters values for search
keys in the dialog. In some cases you wish to set the value of the search dialog fields
programmatically.
Example: the following program in SearchInit PeopleCode on the component search key
record field EMPLID sets the search key page field to the user's employee ID, grays out
the page field, and enables the user to modify the user's own data in the component:
EMPLID = %EmployeeId;
Gray (EMPLID);
AllowEmplIdChg(true);
Useful Functions:
 SetSeachDefault
 SetSearchEdit
 SetSeachDialogBehavior
Important:
Following Functions cannot be used in the SearchInit PeopleCode
 DoModal
 DoModalComponent
 Transfer
 TranferPage

SearchSave:

Execution: SearchSave PeopleCode is executed for all search key fields on a search
dialog; add dialog, or data entry dialog after the end-user clicks Search.
Usage: This allows you to control processing after search key values are entered, but
before the search based on these keys is executed.
Example: A typical use of this feature is to provide cross-field edits for selecting a
minimum set of key information. It is also used to force the user to enter a value in at
least one field, even if it's a partial value to help narrow a search for tables with many
rows.
Useful Functions:
 Error Messages
 Warnings
 SetCursorPos

Note: This event, and all it's associated PeopleCode, will not fire if run from a
Component Interface.

47
Workflow:

Execution: Workflow PeopleCode executes immediately after SavePreChange and


before the database update that precedes SavePostChange.
Usage: The main purpose of the Workflow event is to segregate PeopleCode related to
Workflow from the rest of your application's PeopleCode. Only PeopleCode related to
Workflow (such as TriggerBusinessEvent) should be in Workflow programs.
Important: Your program should deal with Workflow only after any SavePreChange
processing is complete.
Useful Functions:
 TriggerBusinessEvent
Note: Workflow PeopleCode is not field-specific: it triggers PeopleCode on all fields and
on all rows of data in the component buffer.

Page Peoplecode

Activate:
Execution: The Activate event is fired every time the page is activated. This means when
the page is first brought up by the end-user, or if an end-user tabs between different pages
in a component. Every page has its own Activate event.
Usage: The main purpose of the Activate event is to segregate the PeopleCode that is
related to a specific page from the rest of your application's PeopleCode. PeopleCode
related to page display or page processing, such as enabling a field or hiding a scroll, is
best put in this event. Also, you can use this event for security validation: if an user
doesn't have clearance to view a page in a component, you would put the code for hiding
it in this event.
Important: The Activate event isn't associated with a specific row and record at the
point of execution.
Following Functions cannot be used in the SearchInit PeopleCode
 GetRecord
 GetRow
Note: This event is only valid for pages that are defined as Standard or Secondary. This
event is not supported for subpages.

Component Peoplecode

PostBuild

Definition: The PostBuild event fires after all the other component build events have
fired. This event is often used to hide or unhide pages. PostBuild PeopleCode is only
associated with components.
Usage: It's also used to set component variables.

PreBuild

48
Definition: The PreBuild event fires before the rest of the component build events. This
event is often used to hide or unhide pages.
Usage: The PreBuild event is used to validate data entered in the search dialog, after a
prompt list is displayed. It's also used to set component variables.
Example: After the end-user selects key value(s) on the search, your 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.
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

SavePostChange

Definition: After the Component Processor updates the database SavePostChange event
is fired. The system issues a SQL commit after SavePostChange PeopleCode completes
successfully.
Usage: SavePostChange PeopleCode can be used for processing that needs to occur after
the database update, such as updates to other database tables not in the component buffer.
Note: If you are executing WorkFlow PeopleCode, bear in mind that if the WorkFlow
PeopleCode fails, SavePostChange PeopleCode will not be executed. If your component
has both WorkFlow and SavePostChange PeopleCode, consider moving the
SavePostChange PeopleCode to SavePreChange or WorkFlow.
Important: Avoid Errors and Warnings in this event. An Error or Warning in
SavePostChange PeopleCode will cause a runtime error, forcing the end-user to cancel
the component without saving changes.
Avoid using Think-Time Functions in this event.
Useful Functions:
 SQLExec

SavePreChange

Definition: The SavePreChange event fires after SaveEdit completes without errors.
SavePreChange PeopleCode gives you one last chance to process data and before the
system updates the database.
Usage: You could use SavePreChange PeopleCode to set sequential high-level keys.
Note: SavePreChange PeopleCode is not field-specific: it triggers PeopleCode on all
fields and on all rows of data in the component buffer.
Important: Avoid using Think-Time Functions in this event. Avoid Errors and Warnings
in this event.
Useful Functions:
 SQLExec

49
Workflow

Definition: Workflow PeopleCode executes immediately after SavePreChange and


before the database update that precedes SavePostChange.
Usage: The main purpose of the Workflow event is to segregate PeopleCode related to
Workflow from the rest of your application's PeopleCode.
Note: 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.
Important: Avoid using Think-Time Functions in this event. Avoid Errors and Warnings
in this event.
Useful Functions:
 TriggerBusinessEvent

Component Record Peoplecode

RowDelete

Definition: The RowDelete event fires whenever a end-user attempts to delete a row of
data from a page scroll.
Usage: You can use RowDelete PeopleCode to prevent the deletion of a row (using an
Error or Warning statement) or to perform any other processing contingent on row
deletion.
Example: You could have a page field TOTAL on scroll level zero whose value is the
sum of all the EXTENSION page fields on scroll level one. If the end-user deleted a row
on scroll level one you could use RowDelete PeopleCode to recalculate the value of
TOTAL.
Note: The RowDelete event triggers PeopleCode on any field on the row of data that is
being flagged as deleted.
Important: RowDelete does not trigger programs on Derived/Work records.

RowInit

Definition: The RowInit event fires the first time the Component Processor encounters a
row of data.
Usage: It is used for setting the initial state of page controls before they are displayed.
(RowInit allows you to set the values of non-blank fields programmatically.)
Example: Suppose you have a Derived/Work field called PRODUCT, the value of which
is always the product of page field A and page field B. When the component is initialized
you would use RowInit PeopleCode to initialize PRODUCT equal to A * B when the
component starts up or when a new row is inserted. You could then attach FieldChange
PeopleCode programs to both A and B which also set PRODUCT equal to A * B.

50
Whenever the end-user changes the value of either A or B, PRODUCT would be
recalculated.
Note: RowInit is not field-specific: it triggers PeopleCode on all fields and on all rows in
the component buffer.
Important: Do not use Error or Warning statements in RowInit PeopleCode: these cause
a runtime error and force the end-user to cancel the component without saving.

RowInsert

Definition: When the end-user adds a row of data, the Component Processor generates a
RowInsert event.
Usage: You should use RowInsert PeopleCode for processing specific to the insertion of
new rows.
Note: Do not put PeopleCode in RowInsert that already exists in RowInit, because a
RowInit event always fires after the RowInsert event, which will cause your code to be
run twice. The RowInsert triggers PeopleCode on any field on the inserted row of data.
RowInsert does not trigger PeopleCode on Derived/Work fields.
Important: Do not use a Warning or Error in RowInsert: this will cause a runtime error
and force cancellation of the component.

RowSelect

Definition: The RowSelect event fires at the beginning of the Component Build process
in any of the Update action modes (Update, Update/Display All, Correction).
Usage: RowSelect PeopleCode is used to filter out rows of data that have been retrieved
from the database server via a SQL select and before they are copied to the component
buffers.
Note: DiscardRow functions in RowSelect PeopleCode causes the Component Processor
to skip the current row of data and continue to process other rows. A StopFetching
statement causes the Component Processor to accept the current row of data, then stop
reading additional rows. If both statements are executed, the program skips the current
row of data, then stops reading additional rows.
In RowSelect PeopleCode, you can only refer to record fields on the record that is
currently being processed.
Important: Avoid using Think-Time Functions in this event.

SaveEdit

Definition: The SaveEdit event fires whenever the end-user attempts to save the
component.
Usage: 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

51
Note: SaveEdit is not field-specific: it triggers associated PeopleCode on every row of
data in the component buffers, except rows flagged as deleted.
Important: You can use the SetCursorPos function to set the cursor position to a specific
page field following a Warning or Error in SaveEdit, to show the end-user the specific
field (or at least one of the fields) that is causing the problem. Make sure to call
SetCursorPos before the Error or Warning (because these may terminate the PeopleCode
program).
Useful Functions:
 Error Messages
 Warnings
 SetCursorPos

SavePostChange

Definition: After the Component Processor updates the database SavePostChange event
is fired. The system issues a SQL commit after SavePostChange PeopleCode completes
successfully.
Usage: SavePostChange PeopleCode can be used for processing that needs to occur after
the database update, such as updates to other database tables not in the component buffer.
Note: If you are executing WorkFlow PeopleCode, bear in mind that if the WorkFlow
PeopleCode fails, SavePostChange PeopleCode will not be executed. If your component
has both WorkFlow and SavePostChange PeopleCode, consider moving the
SavePostChange PeopleCode to SavePreChange or WorkFlow.
Important: Avoid Errors and Warnings in this event. An Error or Warning in
SavePostChange PeopleCode will cause a runtime error, forcing the end-user to cancel
the component without saving changes.
Avoid using Think-Time Functions in this event.
Useful Functions:
 SQLExec

SavePreChange

Definition: The SavePreChange event fires after SaveEdit completes without errors.
SavePreChange PeopleCode gives you one last chance to process data and before the
system updates the database.
Usage: You could use SavePreChange PeopleCode to set sequential high-level keys.
Note: SavePreChange PeopleCode is not field-specific: it triggers PeopleCode on all
fields and on all rows of data in the component buffer.
Important: Avoid using Think-Time Functions in this event. Avoid Errors and Warnings
in this event.
Useful Functions:
 SQLExec

SearchInit (Associated only with Component Search Records)

52
Definition: The SearchInit event is generated just before a search dialog, add dialog, or
data entry dialog is displayed. SearchInit triggers associated PeopleCode in the search
key fields of the search record.
Usage: This can be used to control processing before the end-user enters values for
search keys in the dialog. In some cases you wish to set the value of the search dialog
fields programmatically.
Example: The following program in SearchInit PeopleCode on the component search
key record field EMPLID sets the search key page field to the user's employee ID, grays
out the page field, and enables the user to modify the user's own data in the component:
EMPLID = %EmployeeId;
Gray (EMPLID);
AllowEmplIdChg(true);
Note:
Useful Functions:
 SetSeachDefault
 SetSearchEdit
 SetSeachDialogBehavior
Important: You can't use the following functions in SearchInit PeopleCode:
 DoModal
 DoModalComponent
 Transfer
 TransferPage

SearchSave (Associated only with Component Search Records)

Definition: SearchSave PeopleCode is executed for all search key fields on a search
dialog; add dialog, or data entry dialog after the end-user clicks Search.
Usage: This can be used to control processing after search key values are entered, but
before the search based on these keys is executed.
Example: A typical use of this feature is to provide cross-field edits for selecting a
minimum set of key information. It is also used to force the user to enter a value in at
least one field, even if it's a partial value to help narrow a search for tables with many
rows.
Note: You can use Error and Warning statements in SearchSave PeopleCode to send the
end-user back to the search dialog if the end-user entry does not pass validations
implemented in your PeopleCode.
Important: SearchSave does not fire when values are selected from the search list. If you
need to validate data entered in the search dialog, use the Component PreBuild event to
do so.
Useful Functions:
 Error Messages
 Warnings
 SetCursorPos

53
Component Record Field Peoplecode

FieldChange

Definition: FieldChange peoplecode is used to perform processing that results from a


field change other than data validation.
Usage: FieldChange PeopleCode is used to recalculate page field values, change the
appearance of page controls.
Example: For example, suppose you have a Derived/Work field called PRODUCT, the
value of which is always the product of page field A and page field B. When the
component is initialized you would use RowInit PeopleCode to initialize PRODUCT
equal to A * B when the component starts up or when a new row is inserted. You could
then attach FieldChange PeopleCode programs to both A and B which also set
PRODUCT equal to A * B. Whenever the end-user changes the value of either A or B,
PRODUCT would be recalculated.
Note: The FieldChange event fires on the specific field and row that just changed.
Important: Do not use Error or Warning statements in FieldChange PeopleCode: these
statements cause a runtime error that forces the end-user to cancel the page without
saving changes.
Useful Functions:
 DoSave

FieldDefault

Definition: The FieldDefault PeopleCode event allows you to programmatically set


fields to default values when they are initially displayed.
Usage: FieldDefault peoplecode is used to set blank fields to their default values.
Example:
Note: FieldDefault PeopleCode normally defaults fields when new data is being added to
the component; that is, in Add mode and when a new row is inserted into a scroll.
Important: An Error or Warning issued from FieldDefault PeopleCode will cause a
runtime error and force cancellation of the component.

FieldEdit

Definition: 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 will display a message using the Error statement, which redisplays
the page, showing an error message and turning the field red.
Usage: To validate the contents of the field.
Note: The FieldEdit event fires on the specific field and row that just changed.
Important: If you wish to permit the field edit, but alert the end-user to a possible
problem, use a Warning statement instead of Error. A Warning statement displays a
warning dialog with OK and Explain buttons. It permits field contents to be changed and
continues processing as usual after the end-user clicks OK.

54
Useful Functions:
 DoSave

PrePopup

Definition: The PrePopup event fires just before the display of a pop-up menu.
Usage: You can use PrePopup PeopleCode to control the appearance of the Pop-up
menu.
Example:
Note:
Important:

Menu Peoplecode
ItemSelected:
Execution: The ItemSelected event fires whenever the end-user chooses menu item from
a pop-up menu. In pop-up menus ItemSelected PeopleCode executes in the context of the
page field from where the pop-up menu is attached, which means that you can freely
reference and change page fields, just as you could from a push button.
Note: ItemSelected PeopleCode is only associated with pop-up menu items.

Appendix:
Question: What is the difference between Field Change and Field Edit?
Answer: In particular, FieldEdit is used for validation purpose of that field. Whereas,
FieldChange is used to achieve some manipulations after the data in a particular field is
changed. FieldChange event is fired only after FieldEdit successfully executes.
Example: If you want to restrict the user to enter a number not greater than 10 in a
numeric field (say A), then this validation must be achieved through FieldEdit. But if you
want to enable a particular link only if the value is greater than 10 in field A, then the
code should be written in FieldChange event.

Question: What is an alternative to Row Select?


Answer: Effective usage of ScrollSelect function and RowInit event can replace
RowSelect.

Question: When should one use SaveEdit or FieldEdit?


Answer: If a validation involves only one page field, you should use FieldEdit
PeopleCode, else whenever the validation involves more than one field use SaveEdit.

Question: How Component Record Field PeopleCode is different from Record Field
PeopleCode?
Answer: A. Record Field and Component record field PeopleCode is associated with a
record field, but Component Record Field PeopleCode is associated only with respect to a
component and one of its events so it can be used to tailor your programs to a particular
component.

55
Sharing of State record
State records can be used by multiple sections and by multiple programs. When you call a
section in another program, any additional state records defined for that program (as in state
records that are not already in use by the calling program) are initialized, even if the program
has been called previously during the run. However, state records that are common to both
programs retain their current values.
To reference variables that exist within a state record, use the following:
%BIND(fieldname)
Unless a specific record name is specified preceding the fieldname, %BIND references the
default state record. To reference a state record other than the default, use the following:
%BIND(recordname.fieldname)
In the case of a called program or section, if the called program has its own default state record
defined, then Application Engine uses that default state record to resolve the
%BIND(fieldname). Otherwise, the called program inherits the default state record of the calling
program. In theory, the called program does not require a state record if all the fields it needs for
processing exist on the calling program’s state record.
For those state records that are shared between programs (during an external call section), any
changes made by the called program remain when control returns to the calling program. Any
subsequent actions in the calling program can access residual values left in the common state
records by the called program. This can be useful to return output values or status to the calling
program, yet it can also cause unforeseen errors.
Generally, a called program should not share state records with the caller unless you need to
pass parameters between them. Most programs have their own set of state records unless a
program calls another program that requires specific input or output variables. In that case, you
must include the state record of the called program into the calling program’s state record list,
and make sure to set the input values before issuing the call section

56

You might also like