Wednesday, May 26, 2010

PeopleCode Interview Questions and faq's

Where can u write the peoplecode?
________________________________________
RE: Where can u write the peoplecode?
________________________________________
PeopleCode may be placed on Record Field Page Componet Menu Item Component Interface Meassage and Message Channel and Application Engine
________________________________________
RE: Where can u write the peoplecode?
________________________________________
Component processor alllocates temporary bufffers on the application server to hold the application data for a component.It retrives all the data need for the entire component up front
RE: Where can u write the peoplecode?
________________________________________
Can be wirtten at record field level page level component level component record level Menu level Application Packages.

RE: Where can u write the peoplecode?
________________________________________
Can be wirtten at record field level page level component level component record level component record field level Menu level Application Engine Application package Messages
RE: Where can u write the peoplecode?
________________________________________
PeopleCode can be write in PeopleCode Editor That may be on Record field pages Components and Menus.It can be used in Application Engine also.

Where can u write the peoplecode?
________________________________________
PeopleCode is written in PeopleCode coding sheet We can write PeopleCode with associative Record Fields Pages Components Menus and Application Engine. Where we need extra validations according the fuctionality.

Where can u write the peoplecode?
________________________________________
PeopleCode is written in PeopleCode coding sheet We can write PeopleCode with associative Record Fields Pages Components Menus and Application Engine. Where we need extra validations according the fuctionality.

RE: Where can u write the peoplecode?
________________________________________
hi
u can write people code in 7 objects
1. record field level
2.component field level
3.page
4.menu
5.application engine
6.component interface
7.messages


Component and Record level PeopleCode are executed when the control is passed to the associated Component and Component containing the record respectively. Since a single record might be associated with several different Components, It is posiible to trigger the same Record PeopleCode from several components while the component level code is associated with a unique component.
Tell me few peoplecode functions u worked with?

component Buffer consists of rows of buffer fields that hold data for the reocrds associated with the page including primary scrolls, derived work records etc.
RE: Tell me few peoplecode functions u worked with?
________________________________________
Component Buffer consists of rows of buffer fields that hold data for the reocrds associated with the page including primary scrolls derived work records etc.

RE: Tell me few peoplecode functions u worked with?
________________________________________
very nice

RE: Tell me few peoplecode functions u worked with?
________________________________________
Get Record
Get Field
Delete Record
Delete Row etc
RE: Tell me few peoplecode functions u worked with?
________________________________________
people Code functions are
setdefault
NOne
hide
unhide
insertimage
delimage
Getfield etc..
RE: Tell me few peoplecode functions u worked with?
________________________________________
People code supports these types of functions:

1.Build in

2.Internal

3.External people code

4.External non-people code
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?
Can be done from Menu Item Properties, where there an option of specifying search record which will have precedence over the one specified in the component properties.
RE: If there is same Component X in two different menus, menu1 and menu2 and if u want to assign a diffe...
________________________________________
I think You can write code in Menu- ItemSelected Event. I need to cross-check.
RE: If there is same Component X in two different menus, menu1 and menu2 and if u want to assign a diffe...
________________________________________
Can be done from Menu Item Properties where there an option of specifying search record which will have precedence over the one specified in the component properties.
RE: If there is same Component X in two different menus, menu1 and menu2 and if u want to assign a diffe...
________________________________________
Can be written in the component prebuild event. PeopleCode can be written to get the current Menuname and based on that chenge the Search Record

RE: If there is same Component X in two different menu...
________________________________________
Hi
None of the solutions seems to be working for me.....
Parvaty: could you send me a sample Peoplecode for ur solution...
I would appreciate if reply is asap.
RE: If there is same Component X in two different menu...
________________________________________
Hi u can do it by clicking checkbox override in menu item properties u have to specify search record after clicking override this way u can Override the component search record.

RE: If there is same Component X in two different menu...
________________________________________
If u want to override search recond mention it in menu item properties
________________________________________
RE: If there is same Component X in two different menu...
________________________________________
In menu item properties (i.e where u tie the component to the menu) there u have an option to override the present component. specify the new component name that u want to attach for that menu.
hope it works and should work
Tell me about component Buffer?
________________________________________RE: Tell me about component Buffer?
________________________________________
Component Buffer consists of rows of buffer fields that hold data for the reocrds associated with the page including primary scrolls derived work records etc.
________________________________________RE: Tell me about component Buffer?
________________________________________
Component Buffer is the area in memory that stores data for the currently active component.
RE: Tell me about component Buffer?
________________________________________
When you open any page in a component the system retrieves all of the data records for the entire component and stores them in one set of record buffers organized by scroll level and then by page level. This component buffer consists of rows of buffer fields that hold data for the various records that are associated with page controls including the primary records; related display records derived work records and translate table records.
PeopleCode frequently must refer to data in the Component Buffer that is the area in memory that stores data for the currently active component.
There are two methods of specifying a piece of data in the Component Buffer from within PeopleCode:
-------- Contextual references which refer to data relative to the location of the currently executing PeopleCode program.
-------- References using scroll path syntax which provide a complete or absolute path through the Component Buffer to the referenced component.
RE: Tell me about component Buffer?
________________________________________
Component stores all page related information in one set of record buffers organized by scroll level and then by page level. This component buffer consists of rows of buffer fields that hold data for the various records that are associated with page controls including the primary records related display records derived work records and translate table records.


Where PeopleCode get stored?
Option: 1. Application Server
Option: 2. Database Server
Option: 3. Client Machine.
Option: 4. File Server.
Option: 5. Batch Server.
ANs;2. Database server
How to send email to the all employers from the peoplesoft application when a certain event is true?What is the event used to trigger?
RE: How to send email to the all employeee from the pe...
________________________________________
Create a workflow. In the workflow use a query with active employess and their email ids as inputs. On the successfull occurence of the event trigger this workflow using TriggerBusinessEvent
RE: How to send email to the all employers from the pe...
________________________________________

Could you please post the code for this solution.


SMTP send Mail failed error during testing of HRMS upgrade to 8.9 (8.46.09 tools).How to solve this Problem?
RE: SMTP sendMail failed error during testing of HRMS ...
________________________________________
Solution 1:Ask your DBA to UP SMTP server.
Solution 2:make sure that you have filled all the feilds in the page or attach specified files if any.
These are the only reasons of above error.
________________________________________
RE: SMTP sendMail failed error during testing of HRMS ...
________________________________________
Check in Appserver config file name of SMTP server is correct and whether it is routing outbound emails

What is the difference between SQL Object and SQLExec?
________________________________________
RE: What is the difference between SQl Object and SQl ...
________________________________________
Sql Objects are the objects in the sql server and sqlexec is the built in function in peoplecode
RE: What is the difference between SQl Object and SQl ...
________________________________________
SQL Object is a peopletool definition which can be created using app designer as well as using peoplecode command CREATESQL( ) it is mainly used for reuseablility of the sql statements. so whenever this statement is required no need to hard code just create an sql object of the same and use where ever it is required.
sqlexec is a peoplesoft delivered function used to retrive only one row and u can update multiple rows of data. It directly interacts with the database.
RE: What is the difference between SQl Object and SQl ...
________________________________________
SQLExec should ideally be used for looping through data while SQLExecs (if used with select) should be used while returning a single row.
RE: What is the difference between SQl Object and SQl ...
________________________________________
SQL object is used for reusability in the sense once instantiated the data retrieved out of it can be used for further caculations logically. Physically at a database level it takes a trip to the database server only once. SQL Exec takes a trip to the database server evertime its used.

What is Component Processor?
The Component Processor Controls the Peoplesoft Applications from Initial data retrival through updating the database.
RE: What is Component Processor?
________________________________________
The Component Processor is the PeopleTools runtime engine that controls processing of an application from the time that a user requests a component from an application menu until the database is updated and processing of the component is complete.

RE: What is Component Processor?
________________________________________
The component processor manages the flow of data processing as users enter information on pages.Issues INSERT DELETE and UPDATE statements to maintain data in the database and SELECT statements to retrieve data.

Sequence of events fire when you click save button?
SaveEdit
SavePreChange
Workflow
SavePostChange
RE: sequence of events fire when you click save button...
________________________________________
SaveEdit
SavePreChange
Workflow
SavePostChange
RE: sequence of events fire when you click save button...
________________________________________
NEED GOOD MATERIAL IN a/p ar.inventory purchasing gl if possible.
RE: Sequence of events fire when you click save button?
________________________________________
1.SaveEdit Event
2.Save Prechange
3.Workflow
4.SavePost change

SaveEdit is intiated when a component is saved.It is used to validate the consistency of the data in the component fields.It is used when more than one component field is to be validated.

Saveprechange is intiated before the component is updated in the database.

Workflow: It executes immediately after Saveprechange event and before the database updates preceeds the Savepostchange event.

SavePostchange is intiated after the component is updated in the database.After the updation is done sucessfully it automatically issues commit statement.

RE: Sequence of events fire when you click save button?
________________________________________
To add to all this if deferred processing is started then if any pending FieldEdits/FieldChange are also executed before SaveEdit starts.

What is the diffrence between SQLExec and CreateSQL?
Sqlexec is used to select, insert, update or delete a single record using a sql statement. Sqlexec executes the sql comand from within pcode bypassing the component processor and interacts dorectly with database server.
If you want to select, insert, update or delete a series of record then use getsql or createsql and then execute sql class method.
RE: What is the diffrence between SQLExec and CreateSQ...
________________________________________
Hello
According to me
CreateSQL is used to describe a query like &sql1 CreateSQl( ur query );
and SQLExec is used to execute that query like SQLExec(&sql1);
I am not so sure abt this.
RE: What is the diffrence between SQLExec and CreateSQ...
________________________________________
SqlExec means it byepasses the component buffer and its directly contacts database to retrieve data. But it retrieves the data row by row and not possible for bulk insert.
But in the case of Create SQL we can able insert the data in bulk.
RE: What is the diffrence between SQLExec and CreateSQ...
________________________________________
Sqlexec is used to select insert update or delete a single record using a sql statement. Sqlexec executes the sql comand from within pcode bypassing the component processor and interacts dorectly with database server.
If you want to select insert update or delete a series of record then use getsql or createsql and then execute sql class method.
What is the diffrence between SQLExec and CreateSQ...
________________________________________
Ans:- SQLExec UPDATEs INSERTs and DELETEs go directly to the database server not to the Component Processor. CreateSQL only retrive the data.
RE: What is the diffrence between SQLExec and CreateSQ...
________________________________________
Perhaps surprising to some...SQLExec EXECUTES the SQL you pass as a parameter right then and there: SQLExec( Update table set fieldA valA where fieldB valB );CreateSql CREATES an SQL object think Object Oriented Programming 'cause that's all it is. This object has properties and methods you can then execute such as execute(): Local SQL &sql CreateSQL( Select field from table where fieldA :1 x ); While &sql.fetch(&variable) ... do stuff with &variable end-While;
RE: What is the diffrence between SQLExec and CreateSQ...
________________________________________
There are two basic differences:
1st : If you want to delete insert or update a single record use the SQLExec along with 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 not the Execute SQL class method.
2nd : 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. If you need to SELECT multiple rows of data use the CreateSQL or GetSQL functions and the Fetch SQL class method.
RE: What is the diffrence between SQLExec and CreateSQL?
________________________________________
Create SQL is a people tool definition which can be created using application designer as well as using people code command create sql(). It is mainly used for reusability of the sql statemetns.

SQL Exec is a built-in function in people code. It is used to retrieve one row and can update multiple rows of data. It directly interact with the database.
RE: What is the diffrence between SQLExec and CreateSQL?
________________________________________
The main Difference Between SqlExec and CreateSql is SqlExec directly interactive with
data base but Createsql not directly interactive with the data base

What is sequence of events triggered in peoplecode?
searchinit peoplecode performs before the search dialogue box displays.search save peoplecode performs after the operator clicks ok in the search record dialogue box. Row select peoplecode is used to filterout rows of data.Prebuild is often used to hide and unhide the pages. Field default attempts to set defaults for fields without a value. Field formula performs, after field default completes successfully. Rowinit is used to initialise the rows.Postbuild peoplecode performs after all the component build events have performed. Activate event is fired everytime the page is activated.
RE: What is sequence of events triggered in peoplecode...
________________________________________
searchinit peoplecode performs before the search dialogue box displays.search save peoplecode performs after the operator clicks ok in the search record dialogue box. Row select peoplecode is used to filterout rows of data.Prebuild is often used to hide and unhide the pages. Field default attempts to set defaults for fields without a value. Field formula performs after field default completes successfully. Rowinit is used to initialise the rows.Postbuild peoplecode performs after all the component build events have performed. Activate event is fired everytime the page is activated.
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.
________________________________________
RE: Table PS_EMPL_TBL has the following structure
________________________________________
Go To Record Field Properties of the DEPT_TBL for MGRID and give PS_EMPL_TBL as the prompt table.
RE: Table PS_EMPL_TBL has the following structureEMPLID as Key field. EMPLNAMESALARYTable PS_DEPT_TBL has DEPTID as key fieldDEPTNAMEMGRIDI need prompt for EMPLID in PS_EMPL_TBL as MGRID in PS_DEPT_TBL .How do I achieve this.
________________________________________
You need to link two tables where MGRID EMPLID
what is the sequence of events fired when a page is saved.
Firstly, its SaveEdit
followed by SavePreChange
and finally SavepostChange
The SaveEdit event is initiated whenever a user attempts to save the component. You can use SaveEdit PeopleCode to validate the consistency of data in component fields. Whenever a validation involves more than one component field, you should use SaveEdit PeopleCode. If a validation involves only one page field, use FieldEdit PeopleCode.
The SavePreChange event is initiated after SaveEdit completes without errors. SavePreChange PeopleCode provides one final opportunity to manipulate data before the system updates the database.
After the Component Processor updates the database, it initiates the SavePostChange event. An error or warning in SavePostChange PeopleCode causes a runtime error. Avoid errors and warnings in this event. The system issues a SQL Commit statement after SavePostChange PeopleCode completes successfully.
RE: what is the sequence of events fired when a page i...
________________________________________
Firstly its SaveEdit

followed by SavePreChange

and finally SavepostChange

The SaveEdit event is initiated whenever a user attempts to save the
component. You can use SaveEdit PeopleCode to validate the consistency of data
in component fields. Whenever a validation involves more than one component
field you should use SaveEdit PeopleCode. If a validation involves only one
page field use FieldEdit PeopleCode.

The SavePreChange event is initiated after SaveEdit completes without errors.
SavePreChange PeopleCode provides one final opportunity to manipulate data
before the system updates the database.

After the Component Processor updates the database it initiates the
SavePostChange event. An error or warning in SavePostChange PeopleCode causes a
runtime error. Avoid errors and warnings in this event. The system issues a SQL
Commit statement after SavePostChange PeopleCode completes successfully.
RE: what is the sequence of events fired when a page is saved.
________________________________________
For the discussions already made I would add one more event when a page is saved i.e. workflow. So Now series will be
SaveEdit
SavePreChange
Workflow
SavePostChange

Workflow: Only Peoplecode related to Workflow (e.g. Approval processes and Notification purposes) are written.
While pressing Save Button how many times Save Pre Change and Save Post Change triggers and when does the commit occur?
RE: While pressing Save Button how many times Save Pre...
________________________________________
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
RE: While pressing Save Button how many times Save Pre Change and Save Post Change triggers and when does the commit occur?
________________________________________
Hey i dont think it will get executed for all the active rows. It will always gets executed once.
RE: While pressing Save Button how many times Save Pre Change and Save Post Change triggers and when does the commit occur?
________________________________________
save prechange exicutes for all active rows but savepost change exicutes only once....

what is a query view and dynamic view ?
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.

RE: what is a query view and dynamic view ?
________________________________________
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 the PeopleSoft Query tool. Before you can create the view PeopleSoft Application Designer prompts you to save the definition.


Query View:This is Selected to define the record definition as a view that is constructed using the PeopleSoft Query tool. Before you can create the view, PeopleSoft Application Designer prompts you to save the definition.
PeopleCode Prebuild & Postbuild
What is the difference between Prebuild & Postbuild events and Saveprechange&SavePostchange?
Prebuid can be used to validate your search data, discarding rows. Postbuild can be used to play with the pages (hide, unhide).. filling up scrolls..
Saveprechange is the last event where you can validate and correct ur data before updating the database. Once it is done, database will get updated. Savepostchange will be used to play with tables which are not present in ur component buffer.
RE: PeopleCode Prebuild & Postbuild
________________________________________
Prebuid can be used to validate your search data discarding rows. Postbuild can be used to play with the pages (hide unhide).. filling up scrolls..
Saveprechange is the last event where you can validate and correct ur data before updating the database. Once it is done database will get updated. Savepostchange will be used to play with tables which are not present in ur component buffer.
RE: PeopleCode Prebuild & Postbuild
________________________________________
1. The PreBuild event is initiated before the rest of the component build events.
2. This event is often used to hide or unhide pages.
3. It
is also used to set component variables.

4. The PostBuild event is initiated after all the other component build events have been initiated.
5. This event is often used to hide or unhide pages.
6. It
is also used to set component variables.
RE: PeopleCode Prebuild & Postbuild
________________________________________
Record level Peoplecode perform for that perticuler record only.

Component level Peoplecode performs for all the records which are under that perticuler component.
People Code - Migration of SQL Reports
can we migrate sql reporting?if yes,how?
Role and Operator class
Differences between role and operator class

Peoplecode events used in AppEngine
What are the peoplecode events that can be used in Application Engine program?
sending email with workflow
Hello!
I'm beginner in peoplesoft.

I'm looking for sending emails with workflow in peoplesoft 8.45

Thx

Chakroun
RE: sending email with workflow
________________________________________
hi there

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 arguements. It function will return the status of email. If 0 then your mail has been sent successfully else not.

By the way the SMTP server needs to be configured for this functionality to work
PeopleCode PreBuild and PostBuild events
What is the main difference between Prebuild and Postbuild events where as both are used to hide or unhide the pages, why two events are needed for the same purpose? Which event is better to write people code to hide or unhide the pages and why?
PreBuild event is the foremost event which triggers at Component Level. If at all there is an error generated at prebuild then the component fails to load before the search itself. Where as PostBuild is triggers after Prebuild and Search of the component. So if at all a error is generated in PostBuild it will stop loading the component after the search of values. postBuild is the right event to use if we want to capture values rather than prebuild.

RE: PeopleCode PreBuild and PostBuild events
________________________________________
PreBuild event is the foremost event which triggers at Component Level. If at all there is an error generated at prebuild then the component fails to load before the search itself. Where as PostBuild is triggers after Prebuild and Search of the component. So if at all a error is generated in PostBuild it will stop loading the component after the search of values. postBuild is the right event to use if we want to capture values rather than prebuild.
Component Buffer
How do you bring the component buffer into App Eng?
RE: Component Buffer
________________________________________
You can assign a record which is used in component buffer to a state record of Application engine.
You can assign a record which is used in component buffer to a state record of Application engine.
Post a Comment

Receive All Free Updates Via Facebook.