Categories
PeopleSoft PeopleCode FAQ

PeopleSoft PeopleCode Frequently Asked Question

What is component processor?
The Component Processor is the PeopleTools runtime engine that controls processing of the application from the time the end-user requests a component from an application menu through the time that the database is updated and processing of the component is complete.
How does the component processor allocate buffers to hold data?
The component processor starts allocating buffers at occurs level 0 and then works its way down. It uses the page and record definitions to determine the data it needs. Generally, if there is one field from the record definition on the page, the entire row will be brought into the buffers. The exceptions are fields that are in the search dialog box, derived work fields, and related display fields.
How to access the Peoplecode Debugger?
Peoplecode debugger can be used through Application designer. Open the program. Choose Debug, Enter Debug mode. The local variables watch window opens.
Choose, Debug, View Component buffers. The component buffer pane opens. We can view visible current line of execution, visible breakpoints. We can also place the cursor on the fields to see their current value.
What is Win-message built in function?
The Win-message built in function can also be used for debugging. It is used to display an information message to the user without performing error and warning processing.
What is people code trace?
Peoplecode Trace can also be used for debugging. To turn on the trace, go to PeopleTools, Utilities, Debug, Trace Peoplecode. We can see number of check boxes to set the detail level of the trace. As we select a combination of check boxes and click on Save, the system starts creating the trace file. Add &Trace=y to your browser’s URL. All the trace setting options will appear on login page. Using the Configuration Manager select the check boxes and select Apply. Then log off Peoplesoft and log back to start the trace.
How many data types we have in people code?
The conventional data types available in previous releases are the core of PeopleCode functionality. The object data types are used to instantiate objects from the PeopleTools classes. The appropriate use of each data type is demonstrated where the documentation discusses PeopleCode that uses that data type.
PeopleSoft recommends that you declare your variables before you use them.
In this section, we discuss the following topics:
·         Conventional data types.
·         Object data types.
Conventional Data Types
·         ANY
When variables and function return values are declared as ANY, the data type is indeterminate, enabling PeopleTools to determine the appropriate type of value based on context. Undeclared local variables are ANY by default.
·         BOOLEAN
·         DATE
·         DATETIME
·         FLOAT
·         INTEGER
Note. The FLOAT and INTEGER data types should be used only where a performance analysis indicates that the increased speed is useful and an application analysis indicates that the different representations won’t affect the results of the computations.
·         NUMBER
·         OBJECT
·         STRING
·         TIME
Object Data Types
For most classes in PeopleTools, you need a corresponding object data type to instantiate objects from that class.
The following are the data buffer access types:
·         Field
·         Record
·         Row
·         Rowset
The following are the page display types:
·         Grid
·         GridColumn
·         Page
The following are the Internet Script types:
·         Cookie
·         Request
·         Response
The following are the miscellaneous object types:
·         AESection
·         Array
·         File
·         Interlink
·         BIDocs
Note. BIDocs and Interlink objects used in PeopleCode programs run on the application server can only be declared as type Local. You can declare Interlinks as Global only in an Application Engine program
·         JavaObject
Note. JavaObject objects can only be declared as type Local.
·         Message
·         OptEngine
·         ProcessRequest
·         SoapDoc
·         SQL
·         SyncServer
·         TransformData
Note. TransformData objects can only be declared as type Local
·         XmlDoc
·         XmlNode
Note. XmlNode objects can only be declared as type Local.
API Object Type
The API object type has some additional considerations.
Use this data type for any API object, such as a session object, a tree object, a Component Interface, a PortalRegistry, and so on.
The following ApiObject data type objects can be declared as Global:
·         Session
·         PSMessages collection
·         PSMessages
·         All Tree classes (trees, tree structures, nodes, levels, and so on.)
·         All Query classes
All other ApiObject data type objects must be declared as Local .
How many types of variables are there in peoplecode?
4 types of variables are there
local
global
component
system
What is the scope of variables, local, global, component, derived work field, system?
Local: local variables created automatically by assigning a value to the variable. We can declare anywhere with in a people code program
Global variables: To use these variables we must declare it at the beginning of the program. Once declared it can be referenced the operator logs off peoplesoft. Only comments or other declarations are allowed top of these declaration. These variables should be used to transfer values between components only.
At what time system varaiable are created?
System variables are automatically created  when an operator logs on to peoplesoft.
Where we can declare variables?
We can declare variables  in any peoplecode event
PeopleCode supports how many types of functions?
PeopleCode supports the 2 types of functions:
                          i.    Built-in Functions:
Declaration is not at all required for built-in functions, and we can call directly.
Built-in functions are divided into different types based on their purpose.
                         ii.    User-Defined Functions
We have 3 types of User-Defined Functions.
Internal PeopleCode Functions: Peoplecode common routines contained within the same program where they are used. These functions are defined by the Function statement. Declaration is not at all required for Internal PeopleCode Functions. Internal PeopleCode Functions are defined within the program from which program we are calling the function.
External PeopleCode Functions: Peoplecode functions contained in a different program from where they are used. These functions are defined by the Declare… Peoplecode statement in the programs where used. Declaration is required to call this function. External PeopleCode functions are defined outside the calling program. Most External PeopleCode functions are stored on record definitions called function libraries.
External non-PeopleCode Functions: Common routines written in C or another language and loaded from a DLL. These are defined by the PeopleCode Declare… Library statement. Declaration is required to call this function, External non-PeopleCode Functions are stored in external libraries. And the convention is, place the all external functions in the Field Formula Event
How you declare a function?
Internal peoplecode functions: In this peoplecode identifies function by the Function statement.Each function must end with a corresponding End-function
Syntax: Function (,…………)
             Statement
             Statement
             End-function
External peoplecode functions: By using Declare function statement at the beginning of the program.
Syntax: Declare function peoplecode field formula;
The keyword peoplecode identify the function as an external peoplecode function. Once an external people code function is declared in a program it can then be called multiple times.
External Non peoplecode functions: A common c++ routine that is loaded from a DLL. It defines by a Declare statement with the keyword library.
What is a Rowset, row, record, field object?
Rowset: It is a data structure used to describe hierarchical data. It is made up of a collection of rows. It can contain all of the scroll’s data. A level 0 rowset contains all the data for the entire component. A rowset contains one or more rows. A rowset can contain the entire contents of a Component Buffer, or the contents of any lower level scroll plus all of its subordinate buffer data.
Row: Row represents a single row in a component scroll. A row contains one or more records or child rowsets.
Record: Record is a single instance of data within a row and is based on a record definition. A record contains one or more fields.
Field: Field is a single instance of data within records and is based on a field definition.
What is a class and an object?
A class is the formal definition of an object and acts as a template from which an instance of an object is created at runtime. The class defines the properties of the object and the methods used to control the object’s behavior. PeopleSoft delivers predefined classes (such as Array, File, Field, SQL, and so on.) You can create your own classes using the Application Class.
An object is a data structure in the memory. An instance of an object is created from its class.
In how many ways an object can be instantiated?
There are 3 ways to instantiate and object-
Createxxx built in functions- create an empty data structure in the data buffer.
Getxxx built-in functions- creates a data structure that refer to already existing data in the buffer.
Getxxx methods- Create a child object of the parent object executing the method.
What is SQLExec?
The SQLExec function executes a SQL command from within a PeopleCode program by passing a SQL command string. We can use SQLExec with insert, delete, update commands to modify data in tables that have not been loaded into the component buffer. 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.
Syntax: SQLExec (“SQL statement”, );
What is 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, SQLExec can perform better than the other SQL functions, because only a single row is fetched. Another limitation is that PeopleTools won’t maintain quoted literals. It means if any changes are made to definitions that are referenced in a SQLExec quoted literal, Peoplesoft cannot apply the changes to the code. If you need to SELECT multiple rows of data, we can use SQL class. First a SQL object has to be instantiated using the CreateSQL built-in function
SQLExec statements that result in a database update (specifically, UPDATE, INSERT, and DELETE) can only be issued in the following events:
SavePreChange, WorkFlow, SavePostChange, FieldChange
Remember that SQLExec UPDATEs, INSERTs, and DELETEs go directly to the database server, not to the Component Processor (although SQLExec can look at data in the buffer using bind variables included in the SQL string). If a SQLExec assumes that the database has been updated based on changes made in the component, that SQLExec can be issued only in the SavePostChange event, because before SavePostChange none of the changes made to page data has actually been written back to the database.
Syntax: Local SQL &SQL          (declaring the SQL object from SQL class)
            &SQL= CreateSQL (“SQL statement”, );
What is the fetch method?
The fetch method can be used to retrieve the next row from the cursor. Fetch takes as its argument the output variables to receive values from the Select.
What is SQLdefinition?
SQL definition- A SQL definition is an Application Designer definition that is used to store and maintain a SQL statement. We can create the SQL definition using the application designer and edit the SQL in SQL editor. Benefits of SQL definition- Reusable, Upgradeable, platform independent, Validated.
To reference a SQL definition, you will instantiate a SQL object with the GetSQL built-in function.
Syntax: GetSQL (SQL. sqlname, , );
SQL.sqlname is the name you gave the definition when it was saved.
Use CreateSQL(“SQL string”) when you are passing a text string to your SQL object.
Use GetSQL (SQL.sqlname) when you are getting the SQL from a SQL definition.
In which peoplecode events we can place SQLExec updates, deletes and inserts?
FieldChange
SavePreChange
WorkFlow
SavePostChange
Peoplecode Events:
SearchInit– This event is performed before the search page is displayed to the user. It’s a way to control processing before the user enters any value in the search page. Placed on search record field or component search record.
SearchSave- This event is performed when the user clicks on the search button in the search dialog. Error and warning messages can be placed on this event to prompt the user to enter at least one value in the search dialog. Placed on the search record or component search record.
RowSelect- This event is performed as the component processor reads data into the buffer. This peoplecode can prevent the component processor to load any specific data into the component by using the DiscardRow and StopFetching functions. Placed on record field or component record.
PreBuild- This event is performed once before the rest of the component build events. It can be used to hide or unhide pages and to set component variables. It can also be used to validate data entered in the search page. Placed on a component.
FieldDefault- This event is performed when a field has no value. It is used to set the default value to the field. Placed on record field or component record.
FieldFormula- After the FieldDefault is performed successfully, FieldFormula is performed. But it increases the performance overhead as it processes unconditionally every time the page is displayed. Now this event is used to store the web function libraries. Placed on a record field.
RowInit- This event is performed for every new row encountered by the component buffer. It is used to control the initial appearance of the fields. Placed on record field or component record.
PostBuild- This is performed after the component processor builds the page and before the page is displayed to the user. It is used to hide or unhide pages and set component variables. Placed only on the component.
Activate- This is performed when the page is displayed to the user. This is the only page event. It occurs each time the user selects a page. Placed on a page.
FieldEdit- This is performed once the value of the field is changed and the new value satisfies the system edits. It is used to validate the new value of the field. Error and warning messages can be placed. Placed on record field or component record.
FieldChange- After the FieldEdit is performed successfully, this event is performed but it is not used for validation. It is used for any additional processing based on the new value of the changed field. Placed on record field or component record.
RowInsert- This is performed when the user inserts a new row in the scroll. Placed on record field or component record.
RowDelete- It occurs when a row is deleted from the scroll. Error and warning messages can be placed to prevent the user to delete any row. Placed on record field or component record.
SaveEdit- It is performed once the user tries to save the component. It is used to validate data before it is updated on the database. This applies to all the rows of data and all pages in the component. Placed on record field and component record.
SavePreChange- It occurs after the SaveEdit is performed successfully. It provides one last chance to manipulate data before the database is updated. Placed on record field, component record or component.
WorkFlow- It occurs when a component is saved. Use Workflow to trigger a business event. Workflow PeopleCode is not field-specific: it triggers PeopleCode on all fields and on all rows of data in the component buffer. Placed on record field, component record or a component.
SavePostChange- After SavePreChange completes successfully, and the component processor issues the SQL statement to update the database, SavePostChange peoplecode is applied. It occurs after the system updates the database. Code in this event is used to update the data not in the buffer but in the database. Placed on record field, component record or component.
ItemSelected-  The ItemSelected event fires whenever the end-user selects a 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 pushbutton. This event and all its associated peoplecode will not fire if run from a component interface.
ItemSelected PeopleCode is only associated with pop-up menu items.
PrePopup-  The PrePopup event fires just before the display of a pop-up menu.
You can use PrePopup PeopleCode to control the appearance of the Pop-up menu. This event and all its associated peoplecode will not fire if run from a component interface.
PrePopup PeopleCode can be associated with record fields and component record fields
Record Field
Component Record Field
Component Record
Component
Page
Menu
FieldChange
FieldDefault
FieldEdit
FieldFormula
PrePopup
RowDelete
RowInit
RowInsert
RowSelect
SaveEdit
SavePostChg
SavePreChg
SearchInit
SearchSave
Workflow
FieldChange
FieldDefault
FieldEdit
PrePopup
RowDelete
RowInit
RowInsert
RowSelect
SaveEdit
SavePostChg
SavePreChg
SearchInit
SearchSave
PostBuild
PreBuild
SavePostChg
SavePreChg
Workflow
Activate
ItemSele
What are message events?
These events are not considered part of the Component Processor flow, so they’re documented separately from the majority of PeopleCode events. The following events are associated with messages:
·         OnPublishTransform Event
·         OnSubscribeTransform Event
·         OnRouteSend Event
·         OnRouteReceive Event
·         OnRequest Event
In a message definition, you can associate a PeopleCode program with the message itself and with each message subscription included in the definition.
Sequence of  events firing:
Field level default processing:
Field default
Component level default processing:
Field formula
Search processing in update Mode:
Search Init
Search Save
Search processing in Add Mode:
Row init
Search Init
Field Edit
Field Change
Save Edit
Search Save
Component Build processing in Update Mode:
Row select
Pre build
Row init
Post build
Activate
Component Build processing in Add Mode:
Row init
Post build
Activate
Save processing:
Save edit
Save prechange
Workflow
Save postchange
Row insert processing:
Row insert
Row init
Post build
Field Modification process:
Field edit
Field change
Row select processing:
Row select
Row delete processing;
Row delete
Popup menu display:
Prepopup
Itemselected processing:
Prepopup
Difference between Field Edit and Field Change?
We can write error messages in field edit and we can not write in field change.
Differenct between prebuild and postbuild?
Prebuild: The PreBuild event fires before the rest of the component build events. This event is often used to hide or unhide pages. It’s also used to set component variables. The PreBuild event is also used to validate data entered in the search dialog, after a prompt list is displayed
Post Build : The PostBuild event fires after all the other component build events have fired. This event is often used to hide or unhide pages. It’s also used to set component variables.

What is the Difference between save pre change and save post change?

It provides one last chance to manipulate data before the database is updated.
It occurs after the system updates the database. By using this event we can update the data directly in the database.

What is Importance of row insert?

To restrict some users to insert new rows into scrolls. It is valid only if the component is having scrolls (means child records). The program never executes unless there is scrolls, not valid for 0 level records.
Push button- Push buttons are used to trigger peoplecode programs. The advantage is that the user determines when the program should be performed by clicking on the push button. A push button will perform any FieldEdit and FieldChange events where the push button is attached.
The component processor flow changes for which events in add mode?
Search Record and Page display.
Traversing the data buffer- Accessing specific data by working through the data buffer hierarchy is known as traversing the data buffer. We can traverse the data buffer from the top down, starting from level 0 rowset and working the way down to a specific field.
Step 1:  Declare the data buffer objects
Component Rowset       &RS_level0, &RS_level1;
Component Row           &Row_level0, &Row_level1;
Component Record       &Record;
Component Field           &Field;
Step 2: Get the level 0 rowset and level 0 row
&RS_level0 = Getlevel0();
&Row_level0 = &RS_level0.GetRow(1);
Step3: Get the level 1 rowset
&RS_level1 = &Row_level0.GetRowset(SCROLL.Empl_Checklist);
Step 4: Get the level 1 row
&Row_level1 = &RS_level1.GetRow(2);
Step 5: Get the level 1 record
&Record = &Row_level1.GetRecord(Record.Empl_Checklist);
Step 6: Get the level 1 field
&Field = &Record.GetField(Field.Briefing_status);
Traversing multiple occurs level-
Rowset                         &RS_level0 = Getlevel0();
Row                             &Row_level0 = &RS_level0(1);
Rowset                         &RS_level1 = &Row_level0.GetRowset(SCROLL.Empl_Checklist);
                                    For &I = 1 To &RS_level1.ActiveRowCount
Row                             &Row_level1 = &RS_level1(&I);
Rowset                         &RS_level2 = &Row_level1.GetRowset(SCROLL.Empl.Chklst_Itm);
                                    For &J = 1 To &RS_level2.ActiveRowCount
Row                             &Row_level2 = &RS_level2(&J);
Record                         &Record = &Row_level2.Empl_Chklst_Itm;
Field                            &Field = &Record.Briefing_status;
                                    End For;
                                    End For;
Using Shortcut-
&Field = GetLevel0() (1).Empl.Checklist(1).Empl_Chklst_Itm(1).Empl_Chklst_Itm.Briefing_status;

Traversing the Data Buffer Hierarchy Example

Suppose you want to access the BRIEFING_STATUS field at level 2 of the following page:
The first thing to ask is where is your code running? Where are you starting from? For this example, the code is starting at a field on a record at level 0. However, you do not always have to start at level 0.
After you start with level 0, you must traverse the data hierarchy, through the level 1 rowset, to the level 2 rowset, before you can access the record that contains the field. Here’s the hierarchy again:
A rowset contains one or more rows, a row contains one or more records and zero or more child rowsets, and a record contains one or more fields.
Rowset
You first obtain the level 0 rowset, which is the PERSONAL_DATA rowset. However, you do not need to know the name of the level 0 rowset to access it.
&LEVEL0 = GetLevel0();
Rowsets Contain Rows
The next object to get is a row. As this code is working with data that is loaded from a page, there will only ever be one row at level 0. However, if you have rowsets that are populated with data that is not based on Component Buffers (for example, an Application Message) you may have more than one row at level 0.
&LEVEL0_ROW = &LEVEL0(1);
Rows Can Contain Child Rowsets
We need to get to the level 2 rowset. To do that, we need to traverse through the level 1 rowset first. Therefore, the next object we want to get is the level 1 rowset.
&LEVEL1 = &LEVEL0_ROW.GetRowset(SCROLL.EMPL_CHECKLIST);
Rowsets Contain Rows
If you’re traversing a page, the first thing to always do after you get a rowset is to get the appropriate row. Because we want to process all the rows of the rowset, we set this up in a loop.
For &I = 1 to &LEVEL1.ActiveRowCount
   &LEVEL1_ROW = &LEVEL1(&I);
   . . .
End-For;
Rows Can Contain Child Rowsets, Rowsets Contain Rows
We need to traverse down another level in our page structure. This means accessing the second level rowset. Then we need to access the rows in the second level rowset, in another loop.
Because we’re processing all the rows at the level 1, we’re just adding code to the previous For loop. As we’re processing through all the rows at level 2, we’re adding a second For loop. The new code is in bold.
For &I = 1 to &LEVEL1.ActiveRowCount
   &LEVEL1_ROW = &LEVEL1(&I);
   &LEVEL2 = &LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_ITM);
   For &J = 1 to &LEVEL2.ActiveRowCount
      &LEVEL2_ROW = &LEVEL2(&J);
   . . .
   End-For;
End-For;
Rows Contain Records
Rows also contain records. In fact, a row will always contain a record, and may contain only a child rowset, depending on how your page is set up. GetRecord is the default method for a row, so all you have to specify is the record name.
Because we’re processing all the rows at the level 2, we’re just adding code to the previous For loops. The new code is in bold.
For &I = 1 to &LEVEL1.ActiveRowCount
   &LEVEL1_ROW = &LEVEL1(&I);
   &LEVEL2 = &LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_ITM);
   For &J = 1 to &LEVEL2.ActiveRowCount
      &LEVEL2_ROW = &LEVEL2(&J);
      &RECORD = &LEVEL2_ROW.EMPL_CHKLST_ITM;
   . . .
   End-For;
End-For;
Records Contain Fields
Records are made up of fields. GetField is the default method for a record, so all you have to specify is the field name.
Because we’re processing all the rows at the level 1, we’re just adding code to the previous For loops. The new code is in bold.
For &I = 1 to &LEVEL1.ActiveRowCount
   &LEVEL1_ROW = &LEVEL1(&I);
   &LEVEL2 = &LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_ITM);
   For &J = 1 to &LEVEL2.ActiveRowCount
      &LEVEL2_ROW = &LEVEL2(&J);
      &RECORD = &LEVEL2_ROW.EMPL_CHKLST_ITM;
      &FIELD = &RECORD.BRIEFING_STATUS;
      /* Do processing */
   End-For;
End-For;
Using Shortcuts
The previous code is the long way of accessing this field. What if you wanted to use all the shortcuts, and access the field in one line of code? Here it is! The following code assumes all rows are 1.
What is current context?
Referencing that portion of the data buffer on which a program is executing is referred to as current context. Most PeopleCode programs run in a current context. The current context determines which buffer fields can be contextually referenced from PeopleCode, and which row of data is the “current row” on each scroll level at the time a PeopleCode program is running.
Can we update the table, which is not in component buffer?
Yes
Data Buffer methods-
Sort method- Using the sort rowset method, it is possible to sort the rows within the rowset based on custom criteria.
Syntax- &Rowset = GetRowSet (SCROLL.);
            &RowSet.Sort (, “A | D” [, “A | D”])
Select method- This method is used to select the rows into a rowset from the select record. The select method is used only with rowsets that reference the component buffers, instantiated using the GetRowSet method or function.
Syntax- &RowSet.Select (RECORD.selrecord, “where…” [,]);
Fill method- This method is used to fill the rowset which does not reference the component buffers. It is used with standalone rowsets instantiated using the CreateRowSet function.
Syntax- Fill (“where..” , );
Flush method- It is used to remove the rows from the buffer before using a Select to bring new rows in. It clears all the rows from the buffer without deleting them from the database.
What are think time functions? What are they?
Think time functions suspends action or processing until the user has taken some action.(such as clicking  ok button in message box).
Do cancel
Do model
Do model component
Exec (when synchronous)
File attach functions
Insert image
We should not write these functions in following events:
Save prechange
Workflow
Row select
Save postchange
What is the difference between functions and procedures?
Functions returns a value, procedures not return any value, package is the combination of functions and procedures
What is Data Buffer?
Data buffer contains multiple component data.
What is a Component Buffer?
Component buffer contains active component data.
What data stores in Component buffer?
Only search record fields are available, If we put one non search key value in 0 level then all levels data will available.
All field values of level 0record are available
Primary record fields are available
Derived work record placed on a component is available
Declared translate fields are available

Ways of debugging in 2 tire and 3 tire

Debugging in two-tier connections involves connecting directly to the database, not through the application server. Use this method to debug two-tier Windows applications.
Use three-tier debugging to debug three-tier Windows applications and PIA applications. For three-tier debugging, use PSADMIN to make sure that the following items are set.
·         The appropriate PSDBGSRV Listener Port is specified in the PeopleCode Debugger section of PSADMIN.
·         At least two PSAPPSRV processes configured to boot in the domain with the Service Timeout parameter set to 0 (zero).
·         You indicate y for Yes at the “Enable PSDBGSRV Server Process” prompt at the end of the PSADMIN interface.
You set these parameters as you configure or create a domain

Tell me few peoplecode functions you worked with?

Hyde
Unhyde
Grey
Ungrey
Substring
Sql execute
All
None
Win message
Win escape
Fetch value
%page
%component
Msgbox
Setlable,
Get field lable
Row count
Active Row count
Field changed
Get rowset
is changed
discord row
prior value
get sql
create sql.
Difference Between Get Record and Create Record?
CreateRecord creates a freestanding record definition and its component set of field objects. The specified record must have been defined previously, that is, it must have a record definition. However, if you are calling this function from PeopleCode associated with a page, the record does not have to be included on the current page.
This function returns a record object that references a new record buffer and set of fields.
EX:  Local Record &REC2;
&REC2 = CreateRecord(RECORD.OPC_METH);
GetRecord creates a reference to a record object for the current context, that is, from the row containing the currently executing program. GetRecord returns a record object.
The following code:
&REC = Get Record ();
Is equivalent to:
&REC = GetRow().GetRecord(Record.recname);
Or
&REC = GetRow().recname;
What is CreateSQL and GetSQL and how they differ with SQL EXEC?
The GetSQL function instantiates a SQL object and associates it with the SQL definition specified by sqlname. The SQL definition must already exist, either created using PeopleSoft Application Designer or the StoreSQL function.
Processing of the SQL definition is the same as for a SQL statement created by the CreateSQL function.
The CreateSQL function instantiates a SQL object from the SQL class and opens it on the given sqlstring and input values. sqlstring is a PeopleCode string value giving the SQL statement.
Any errors in the SQL processing cause the PeopleCode program to be terminated with an error message.
You can use CreateSQL with no parameters to create an empty SQL object that can be used to assign properties before being populated and executed.
HOW WE ACCESSS THE RECORD IN LEVEL 2?
HOW WE ACESS THE DATA ON SECONDARY PAGE WHICH IS ON LEVEL 3?
WHAT IS THE IMPORTANCE OF ROWINIT, ROWSELECT & FIELD CHANGE? IS THERE ANY RELATION SHIP B/W THESE EVENTS?
HOW WE DISPLAY THE SECONDARY PAGE BY USING PEOPLECODE FUNTION
By using DoModel function we can display secondary page
HOW CAN WE OPEN DIFFERNET COMPONENT IN A NEW WINDOW BY CLICKING OF A HYPERLINK?
Yes
HOW WE KNOW WE ARE IN CURRENT PAGE?
%Page
IF WE ARE RUNNING AE PROGRAM THROUH ONLINE PAGE CAN WE USE COMPONENT BUFFER DATA IN AE PEOPLECODE?
IF AN ERROR OCCURS IN SAVE POST CHANGE PEOPLECODE WILL THE DATA MODIFIED BY THE USER IN COMPONENT BUFFER UPDATES IN DATABASE? WHY?
No it will not update the database
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?
Explain with an example, where you used peoplecode extensively?
What is File Clause?
Difference between component rec field events and record field events?
From Level 1 how can we access level 2 3rd row record field?
Can you assign values to a table, which is not in a Component Buffer?
How can you get a different component by clicking the hyperlink on a page? How can you open a different component in a new window by clicking on a hyperlink?
Tell me component buffer and scroll buffer functions
What is the scope of variables local global derived work field and system
Some Meta strings
If you are running AE through online page can you use component buffer data in ae peoplecode
Data mover commands

Leave a Reply

Your email address will not be published. Required fields are marked *