You are on page 1of 14

1. What is SQLEXEC and CreateSql?

Ans. The main Difference Between SqlExec and CreateSql is:



1. SqlExec directly interactive with data base

SQLExec can only Select a single row of data.

If you want to delete, insert, or update a single record, use the SQLExec along with corresponding
PeopleCode record object method.

1. Createsql not directly interactive with the data base

CreateSql can fetch all the rows.

If you want to delete, insert, or update a series of records, all of the same type, use the CreateSQL.



2. What are Roles and Permission Lists?
Ans. Roles are intermediate objects that link user profiles to permission lists.

Permission lists are list of authorizations that can be assigned to roles and user profiles.


3. How to bypass a PeopleSoft search Record?
Ans. Set the INSTALLATION table as the search record
If you set the INSTALLATION table as the search record:
The component processor will not show the search record.
The component processor will load level zero with the first row returned by the database for
any tables and views.
The component will load any grids or scroll areas that are set to auto-select, will pull all rows
back from the database.
A common scenario when using this method is to actually disable the auto-select on all the grids
and scroll areas. This tells the component to not automatically perform SQLbased on the search
record row used. Instead you are basically telling the component: Do not do any magic.
PeopleCode is going to run which will load the data.

Set any record with no search keys as the search record
If you use any search record that does not have any search keys defined on the record definition,
then it will work exactly as the INSTALLATION table example above.
Set and Disable Search Keys with PeopleCode
You can also bypass the search record by setting the search key values in code, then making the
search fields in-visible (FIELD.VISIBLE=FALSE). This is done in SearchInit PeopleCode. You
will also need to call this peoplecode function in the searchInit: SetSearchDialogBehavior(0);

4. How to call section dynamically?
Ans. Call sections can be dynamic. To use a dynamic call section:
1. Add the fields AE_APPLID and AE_SECTION to your state record
2. In a PeopleCode step, set the value of AE_APPLID to the application engine program
name that you are calling. If it is a section in the same application engine program, you
can leave this blank and it will default to the current running application engine program
3. In a PeopleCode step, set the value of AE_SECTION to the section of the application
engine program you are calling
if condition then
AE_APPLID = "AE_ABC_TEST";
AE_SECTION = "SEC_STATE";
else
AE_APPLID = "AE_ABC_TEST";
AE_SECTION = "SEC_CITY";
end-if;
4. Set the dynamic flag check box on the call section step
5. Use call section action.

6. What is the difference between Do When and Do While?
Ans.






7. What is the difference between %Select and %SelectInit?
Ans. When your select statement is retrieving any row of
data,there wont be any difference between % select and %
select init,But when select statement is not retrieving any
row of data in % select the previous value in the state
record will remain same/unchange,Where as coming to %
select init the previous value in the state record will be
intialized to null values.

8. What is the difference between Application Engine and SQR?
Ans. SQR: - Can generate Reports in SQR.
- No Restart Logic.
AE: Can use Application packages, thus bringing in encapsulation and other object oriented
programming concepts.

App Eng: - Can't generate Reports in AE.
- Built-in Restart Logic.
SQR: Code is not encapsulated, we will not be able to use App Packages but SQCs serve the
purpose to an extent.

Reporting:
AE: Later versions of people tools enable AE to create reports with help of XMLP
SQR: Easy Report Creation with enhanced printing



Meta Data:
AE:Has Meta SQL like %selectinit , %updatestats
SQR:Lacks Meta SQL support



Use of Message Catalog
AE:Can use Message Catalogs which can be passed on easily through log messages action.
SQR:Cannot use Message Catalogs, it only has to access the message catalog meta table to fetch
messages



9. What are set processing and parallel processing?
Ans. Parallel or concurrent processing allows multiple instances of an Application Engine program
to execute against the same tables while drastically reducing the risk for table contention.
Parallel processing is a means of completing a huge task fast by splitting it into multiple parts and
then doing many of them simultaneously. PeopleSoft application engine supports parallel
processing. This can be achieved by use of temporary tables.
One possible way to implement this is partition the data on key fields. Run the AE process for
parameters which will access only one or set of partitions. In such cases each AE instance
processes its own set of data using a dedicated temporary table instance.


Set Processing uses SQL to process groups or sets of rows at one time rather than processing each
row individually. With row by row processing you following a repetitive loop that selects a row,
determines if it meets a given criteria, if so, apply rule x to row Update row, commit. With set
processing, you only select those rows that meet the filtering criteria and then run the rule once again
all the affected rows.

10. What difference is between translate table and prompt table?
11. 1. Translate tables have a max length of 4 char for each element. But prompt table elements
have no such limitation.
12.
13. 2. There can be only 30 entries in a translate table. where as prompt table can have n
number of entries.
14.
15. Translate table: These values are stored on a people tools table called XLATTABLE. The
field type should be character, length should be < or = 4, field values should be static. We
can give more than one value for a particular field.
16.
17. Prompt table: Is used to provide users with validate values from other tables. Prompt table
with edit, prompt table with no edit.


The Prompt table with edit the user can 't edit the values eg :
the country_tbl is promt table with edit then the user cannot enter new value into
country field user
if user enter the new values into field then the field goes to red and display the select
only list of values
select only list of values(from country_tbl)
the Prompt table with no edit
the user can edit the values eg:
country_tbl is prompt with no edit then user can enter the new country into country_tbl
ans also user select list values.


9. Why SQL and Call Section are mutually exclusive?
Ans. SQL and Call Section are mutually exclusive Actions; we can't use both at same step.

Example:

The Step1 having 'SQL' action. Suppose if you use callsection action in the step1 it calls the another
'Section2',the Section2 contains the 'step2' and step contains 'Actions' in this step2 have 'SQL' Action .

At this situations system didn't find to process the 'SQL' Actions means which 'SQL' action goes to first for
processing. Thats why deadlock will occur if we use 'SQL' and 'Call Section' in the same Step.

When a SQL is run, there is a lock on the table by the database until that section is completed. If
during that time there runs some other process which will use the same table locked by our section
using call section, this process will fail


10. You get a request that size of a field needs to be changed, how do you analyse its impact?
Ans. You have to do FIND DEFINITION REFERENCES of the changed field.Re build all the record and
view.If you are inserting values in record using Peoplecode (where field has being changed )make sure
correct value( with size) is being inserted into the record.Same goes for SQR.

10. How will you call component interface program from application engine program?
Ans. It is same as calling Component Interface from Peoplecode. Include the Component Interface code
in Action : Peoplecode in your application engine and use is normally (Keep in mind Think time function
wont be called in component events). To get the Component Interface code drag and drop the
Component in Peoplecode Action.

11. If there is same Component X in two different menus, menu1 and menu2 and if
u want to assign a different search record for each menu, then which peoplecode
function do u use and where do u write the code?
Ans. You can use the menu override option to specify your search record for the respective menu.

12. Table PS_EMPL_TBL has the following structure
EMPLID as Key field.
EMPLNAME
SALARY

Table PS_DEPT_TBL has
DEPTID as key field
DEPTNAME
MGRID

I need prompt for EMPLID in PS_EMPL_TBL as MGRID in PS_DEPT_TBL .

How do I achieve this.
Ans. i) Go To Record Field Properties of the DEPT_TBL for MGRID and give PS_EMPL_TBL as the prompt
table.
ii) Build a view with a query:
join the two tables:
select E.EMPLID
from PS_EMPL_TBL E
, PS_DEPT_TBL D
where D.MGRID = E.EMPLID
Go To Record Field Properties of the DEPT_TBL for MGRID and give view as the prompt table.


13. What is the difference between component level peoplecode and record level
peoplecode?
Ans. Record level peoplecode is associated with number of component.
It is possible to trigger the same Record PeopleCode from several components
Component level peoplecode is associated with the unique component.
The record level peoplecode will be fire first then component level peoplecode.

14. sending email with workflow
Ans.
A. You can send emails in PeopleSoft using function SendMail().
There are arguments for the function

SendMail(&n_MailFlags_l, &s_MailTo_l, &s_MailCC_l, &s_MailBCC_l, &s_MailSubject_l,
&s_MailContent_l, &MailFiles, &s_MailTitles_l, &s_MailSender_l);

You need to pass these arguments. It function will return the status of email. If 0 then your mail
has been sent successfully else not.
B. If you want to send mails through Workflows, then you need to use the objects Business Process.
Under a business process, you define an activity.
Within an activity, you need to define steps, events and email definition.
Using this email definition, you can send across mails through workflow.


15. Where PeopleCode get stored?
Ans. Database server

16. what is the sequence of events fired when a page or a component is saved.
Ans. SaveEdit,
SavePreChange,
Workflow,
SavePostChange

18. Whats the advantage and disadvantage of Sqlexe in peoplecode?
Ans. Advantages: By using SQLExec function we can do the manipulation to the database. we can write
insert,update,delete.

Diadvantages:
1)While selecting the data using sqlexec, it will return only one at a time.
2) If the name of the records changed, then you have to make the changes in the code as the query will
in the quotes inside sqlexec



19. What are the peoplecode events that can be used in Application Engine program?
Ans. we can use the on-execute event.

20. While pressing Save Button how many times Save Pre Change and Save
Post Change triggers and when does the commit occur?
Ans. It depends on which level (record level ,record field level or component
level) you are placing you peoplecode.
For example:

A page has a scroll area or a grid which contains some fields inside.

Now if you have people code in your save prechange event of the record level or
record field level, then it will get executed for all the active rows of your
scroll area. similarly save post change. the commit will happen after each save
prechange.

If you have got 4 active rows in your scroll and you have written same prechange
peoplecode in record level, it will be executed 4 times.

To avoid this you have to write this in a component level. Then it will get
executed only once




21. what is a query view and dynamic view ?
Ans. Dynamic View:This is selected to define a record definition that can be used like a view in pages
and PeopleCode,but is not actually stored as a SQL view in the database. Instead, the system uses the
view text as a base for the SQL Select that is performed at runtime.

Query View:This is Selected to define the record definition as a view that is constructed using
thePeopleSoft Query tool. Before you can create the view, PeopleSoft Application Designer prompts you
to save the definition.


22. What is the difference between Prebuild & Postbuild events?
Ans.
PreBuild:
i) Prebuid can be used to validate your search data, discarding rows.
ii) The PreBuild event is initiated before the rest of the component build events.
iii) This event is often used to hide or unhide pages.
iv) It is also used to set component variables.
PostBuild:
i) Postbuild can be used to play with the pages (hide, unhide), filling up scrolls.
ii) The PostBuild event is initiated after all the other component build events have been
initiated.
iii) This event is often used to hide or unhide pages.
iv) It is also used to set component variables.

23. What is the difference between Saveprechange & SavePostchange?
Ans. Saveprechange is the last event where you can validate and correct ur data before updating
thedatabase . Once it is done, database will get updated.
Savepostchange will be used to play with tables which are not present in ur component buffer.

24. Is there any function exist in peoplecode which stops the processing of
whole component?
Ans. Error function in FieldEdit or SaveEdit PeopleCode to stop whole processing and display an error
message.
"Cancel" method of CI, that can be used to completely stop the processing of Component.
Thinktime functions will stop further processing of the peoplecode. Following are Think time functions:
DoCancel
DoModal
DoModalComponent
Exec (only when Synchronous)
File attach functions
Prompt
RemoteCall
RevalidatePassword
WinExec(only when Synchronous)
WinMessage and WinMessageBox


25. How do you bring the component buffer into App Eng?
Ans. You can assign a record which is used in component buffer to a state record of Application
engine.



26. What is the Mandatory property of App.engine?
Ans. 1. Main is the required section in Application Engine.

2. There can be multiple steps in single application engine, but atleast one step should be part of AE.

3. Similarly you can have multiple actions in AE but you should have minimum 1 action part of step.

4. Save as AE

27. How do you bring advanced search page before normal search page ?
Ans. There is a setting available in Component properties to make either the Normal Search Page or the
Advanced search page to appear first.

29. What is the use of set control field in record field properties?
Ans. If we specify one field as a set control field then we will retrieve data based on this when we are
using prompt table. Based on this field only we can have valid prompt list at the time of prompt button
clicking.

30. What will be the output of an application engine if we use component
variables instead of state record ?
Ans. Component variables can be used to carry data from one section to another. The scope of
component variable remains throughout the program . They can be used in place of state record provided
you do not want a restart facility and dynamic section calls.
31. Explain all the Do Actions in Application Engine.
Ans. Do When: Do When is a loop entry criteria. This will always be executed once and only once as long
as the SQL statement fetches a row. Thus, with Do When, one row will be printed. This is pretty straight
forward.
Do While: Every time, the AE executes the SQL select statement in the Do While Action, if it returns a row
it will proceed to further actions, if it will not return a row the step will be terminated. What is to be
understood here is that, in the absence of a loop termination criteria (or in other words logic to discard
already selected rows) the Select statement inside a Do While will always fetch the same row. This will
mean that a query like the one we have written (select emplid from ps_job) will go into an infinite loop, as
there is no termination criterion for this SQL. Thus, this will go into an infinite loop and the same EMPLID
(the first Id returned by the query) will be printed in the file.

Do Until: It will execute until a row is returned by the query and this ensures that the step is executed
atleast once. As the query returns a row, the loop gets terminated after the first iteration itself.

Do Select: Do Select is the most commonly used Do action.
Do Select can be Select/Fetch and Reselect:
Select/Fetch hits the Db just once, fetches all the values of the Select statement and puts it in a cursor
and moves through the cursor during each iteration. This allows a sequential processing which is so
integral to row by row processing in an Application Engine.
While Reselect queries the DB for each iteration and picks up the first row returned by the select
statement and puts it in a cursor. Thus, at any given point of time there will be only one row in the cursor
of a Reselect type Do Select action. Moreover, Reselect will be slower than a Select/Fetch due to the DB
trips involved in the former.
32. How to access data at three level rowset?
Ans. Local Rowset &ROWSET_LEVEL2, &ROWSET_LEVEL0, &ROWSET_LEVEL1;

&ROWSET_LEVEL0 = GetLevel0();

&ROWSET_LEVEL1 = &ROWSET_LEVEL0.GetRow(1).GetRowset(SCROLL.LEVEL1_REC);

&ROWSET_LEVEL2 = &ROWSET_LEVEL1.GetRow(5).GetRowset(SCROLL.LEVEL2_REC);

33. Which one of the following tree types is not supported in the PeopleSoft tree
manager?
1. Query trees 2. Combination trees
Ans. Combination trees are not supported in the PeopleSoft tree manager.

34. In which one of the following views would you see the fields, criteria, and
other details associated with the current query?
Ans. Query View


35. Does SAVEEDIT saves first and then apply validations to all fields? OR does it
apply validations to all fields first and then SAVE?
Ans. SAVE EDIT FIRST VALIDATES ALL THE FIELDS ON THE COMPONENT AND THEN WHEN NO ERRORS
IT SAVES. IF WARNING MESSAGES POP UP YOU CAN STILL SAVE BUT IF ERROR MESSAGES COME
UP YOU TO CORREST ERRORS FIRST.


36. Peoplecode attached with Push Button can be associated with which of the
events?
Ans. Field Change event

37. In which PeopleCode event does ALL data validation take place?
Ans. Field Edit: validates specific field that has just changed
Save Edit: validates specific field or row of data of all fields on a page that has just changed.

38. In Call Section Action it is possible to leave the Program ID with blank Value
in certain cases?
Ans. If you leave blank and save the AE then Current Program ID will be defaulted.

39. What happens if you don't specify a Search Record for a Component?
Ans. If you dont specify a search record, you wont be able to save the component definition. Seacrh
record is always required for the component.

40. What is the difference between search record and add search record?
Ans. Search Record: Specify the search record for the component. The search record controls access to
rows of data in a table, and its keys and alternate search keys appear on the search page as criteria.

Add Search record: Specify if you want a different search record specifically for add actions.
Search Keys of the Add Search Record will show up at the Add mode, when Search Record is not Level 0
record.

41. What are the think time Variables ? Where you can use this variables ?
Ans. This function suspend processing either the user taken action or until an external process has run to
completion...
ex: winmessage()
warning("str");
Error("str");


Run Control Record: The ability for Application Engine to remember completed steps depends on a
record called AERUNCONTROL, which is 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

You might also like