Você está na página 1de 78

PEOPLESOFT

The sequence of events that takes place in a PeopleSoft 8 Environment is as follows:


1

1. The URL in the Web browser address window invokes a PS servlet on the Web server 2 2. Servlet running in the servlet engine interprets request and comes up with the list of objects required to build the page 3 3. Request for all required objects sent to the application server in the form of a Jolt Message 4 4. Tuxedo receives the Jolt Message, and converts it into a service request which it routes to the appropriate PeopleSoft server process 5 5. PeopleSoft server process converts service request into SQL statement(s) 6 6. SQL statements sent to the database 7 7. Data requested is supplied by the database 8 8. PeopleSoft process constructs HTML page out of object data 9 9. Tuxedo acknowledges receipt of data and closes connection with the PeopleSoft process 10 10. Data forwarded by Tuxedo to requesting Java servlet 11 11. Servlet forwards page requested by the browser 12 12. When all objects are in place, HTML page forwarded to the Web services

Page: 1

What is PIA Architecture? In PIA end users do not have any PeopleSoft specific software installed on their machines, they use Internet browser to connect web server, which interacts with application server.

Page: 2

What are components of PIA? 1. Web browser 2. Web server 3. Application server 4. Batch server 5.Database server

What are major tasks that the application server performs in PIA? The application server maintains a persistent connection to the database, and converts peopletools and application table data into HTML. The server then provides the HTML to the web server for delivery to the browser. The application server also plays a role in connecting development workstations to the database for three-tier connections. What are the major tasks performed by the web server in PIA? Web server acts as the front end of the PIA. The Web server includes Web services software that displays the HTML to the browser. It also includes java servlets that manage each sessions connection to the application server. What is Tuxedo/Jolt? Tuxedo manages the multiple connections to the database. Jolt is a java based communication protocol. The assembled HTML is sent to the web server. What is a metadata? Software that resides on a web server and displays HTML for a Browser. 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. Where People Code get stored? Options: 1. Application server 2.Database server 3.Client server 4.Batch server 5.File server. Database Server. stored in PSPCMPROG TOOLS TABLE 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 browsers URL. All the trace setting options will appear on login page. Using the

Page: 3

Configuration Manager select the check boxes and select Apply. Then log off Peoplesoft and log back to start the trace. How do you turn on the PeopleCode trace? The PeopleCode trace can be turned on by selecting the Set push button on the PeopleCode Trace Control panel. It can also be turned on by saving options in the Configuration manager, logging out of Psoft and logging back on. It can also be turned on within PeopleCode by using the SetTracePC built-in function. 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

Page: 4

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 and 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 declarations.

Page: 5

Component variables: These variables should be used to transfer values between components only. System variables: System variables are preceded by a percent (%) symbol whenever they appear in a program. You can use these variables to get the current date and time, information about the user, the current language, the current record, page, or component, and more. At what time system variable 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 <function name>(<parm1>,<parm2>) Statement Statement End-function External peoplecode functions: By using Declare function statement at the beginning of the program. Syntax: Declare function <function name> peoplecode <recordname.fieldname> 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.

Page: 6

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 scrolls 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. How to prevent user from changing his own data?

AllowEmplIdChg(is_allowed)
The function takes a single Boolean parameter that when set to True allows the employee to update their own data. When the parameter is set to False, the employee is prevented from updating this data. Once permission is granted, it stays through the life of the component, not the page. Once a user switches to another component, the default value (not being able to make changes) is reapplied. 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 objectCreatexxx 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. How do we create custom field format? Custom field format allows you to create your own format definitions using format notation, and apply them to fields. These formats are organized into Format Families, which can include one or more unique formats. 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, and 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, <input values> <output variable>); 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

Page: 7

PeopleTools wont 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, <input values>); 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. Difference Between CreateSQL and GetSQL? CreateSQL(SQL string):

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.
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. GetSQL (SQL.sqlname):

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 Application Designer or the StoreSQL function.
Difference Between CreateRecord and GetRecord? 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. Examples
Local Record &REC2; &REC2 = CreateRecord(RECORD.OPC_METH);

Page: 8

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 = GetRecord(); Is equivalent to: &REC = GetRow().GetRecord (Record.recname); Or &REC = GetRow().recname; What is difference between Getrowset and Createrowset in people code? Getrowset is used to get rowset for a record in the component buffer. Createrowsetis used to create rowset for a record which in database, and is also called a Standalone rowset What is difference between DoSave() & DoSaveNow()

DoSave() saves the current page. DoSave defers save processing to the end of the current PeopleCode program event, as distinct from DoSaveNow, which causes save processing (including SaveEdit, SavePreChange, SavePostChange, and Workflow PeopleCode) to be executed immediately. DoSave can be used only in FieldEdit, FieldChange, or MenuItemSelected PeopleCode. DoSaveNow causes the current page to be saved immediately. Save processing (including SaveEdit, SavePreChange, SavePostChange, and Workflow PeopleCode) is executed before continuing execution of the program where DoSaveNow is called. DoSaveNow differs from the DoSave function in that DoSave defers saving the component until after any running PeopleCode is completed. DoSaveNow can only be called from a FieldEdit or FieldChange event.
How to skip from Search page? SetSearchDialogBehavior can be called in SearchInit PeopleCode to set the behavior of search and add dialogs before a page is displayed, overriding the default behavior. There are two dialog behavior settings: skip if possible (0) and force display (1). Skip if possible means that the dialog will be skipped if all of the following are true: All required keys have been provided (either by system defaults or by PeopleCode). If this an Add dialog, then no "duplicate key error" results from the provided keys; if this error occurs, the processing resets to the default behavior. If this is a Search dialog, then at least one row is returned based on the provided keys.

Peoplecode Events: 1. SearchInit- This event is performed before the search page is displayed to the user. Its a way to control processing before the user enters any value in the search page. Placed on search record field or component search record.

Page: 9

2. 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. 3. 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. 4. 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. 5. 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. 6. 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. 7. 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. 8. 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. 9. 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. 10. 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. 11. 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. 12. RowInsert- This is performed when the user inserts a new row in the scroll. Placed on record field or component record. 13. 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. 14. 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. 15. 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. 16. 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.

Page: 10

17. 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. 18. ItemSelected- The ItemSelected event fires whenever the end-user selects a menu item from a popup 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. 19. 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 Can we access scroll values before Post Build event? From RowSelect Event we can access.

Grid Method: &Grid.GetColumn(<Column>) Grid Property: &Grid.Label=abcd; GridColumn Propery: &MYGRIDCOLUMN.Enabled = False; &MYGRIDCOLUMN.Label = "Checklist Item"; &MYGRIDCOLUMN.Name = "Capital"; RowSet Methods: &RS.GetRow(n); &RS.CopyTo(&RS2); &RS.DeleteRow(&I); &RS.InsertRow(2); &RS.Fill("where MYRECORD = :1", &UVAL); &RS.Flush(); &RS.ShowAllRows() &RS.HideAllRows(); &RS.Sort(EXPORT_OBJECT_NAME, "A"); RowSet Properties: &RS.ActiveRowCount &RS.Level &RS.RowCount Row Methods: &ROW.GetRowset(SCROLL.QEPC_LEVEL1_REC); &ROW.CopyTo(GetRow(&I));

Page: 11

&ROW.GetRecord(&J); Row Properties: &ROW.ChildCount &ROW.InsertEnabled &ROW.DeleteEnabled &ROW.IsChanged &ROW.IsDeleted Record Methods: &REC.ExecuteEdits(); &REC.GetField(FIELD.NAME).Value; &REC.Insert(); &REC.Delete(); &REC.SearchClear(); &REC.SelectByKey(); &REC.Update(); Record Properties: &REC.ParentRow &REC.RowNumber; &REC.DeleteEnabled = True Field Methods: &Field.GetLongLabel(<LabelID>) &Field.GetShortLabel(<LabelID>) &Field.SearchClear(); &Field.SetDefault(); Field Properties: &Field.EditError &Field.IsAltKey &Field.IsAuditFieldAdd &Field.IsChanged &Field.Name Component PeopleCode: PreBuild PostBuild SavePreChange SavePostChange Workflow

Page: 12

Component-Record PeopleCode: SearchInit SearchSave RowInit RowSelect RowInsert RowDelete SaveEdit SavePreChange SavePostChange Component-Record-Filed PeopleCode: FidldDefault FieldEdit FieldChange PrePopup
What is ScrollSelect? ScrollSelect function selects records from a table and loads them into the scroll buffer area of a page. In parent/Child relationships, scrollSelect chooses all corresponding child rows and inserts them under the next higher level row. The function requires the specification of the target scroll area, a source record from which to select rows and an optional SQL string. The parameters passed to ScrollSelect vary based on the scroll level at which the function is targeted. Level 1 : ScrollSelect (1, RECORD.target_recname, RECORD.sel_recname); Level 2 : ScrollSelect (2, RECORD.level1_recname, RECORD.target_recname, RECORD.sel_recname); Level 3 : ScrollSelect (3, RECORD.level1_recname, RECORD.level2_recname, RECORD.target_recname, RECORD.sel_recname); When is the ScrollFlush function used? Is used to remove the rows of data from within a scroll bar without deleting them from the database. What are Inline variables? How are they used? Inline variables are used to reference the value of fields stored in the buffers in SQL statements. An inline variable consists of a colon followed by the appropriate record and field name to be referenced. How can you enable/disable the + and button in scroll? We have to handle RowInsert event to apply the following code RowsetObject.InsertEnabled=True/False; RowsetObject.DeleteEnabled=True/False; 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: If error happens, it goes to search page. 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

Page: 13

variables. The PreBuild event is also used to validate data entered in the search dialog, after a prompt list is displayed. PostBuild : Error causes cancel the component process. 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 SavePreChange and SavePostChange? 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. If a field is defaulted to a value in its property. The same field gets assigned a default value in default _peoplecode event. Which value will be assigned? Value assigned at peoplecode only will set. What happens if you don't specify a Search Record for a component? If you dont specify a search record, you wont be able to save the component definition. Seacrh record is always required for the component. You can specify a dummy search record called - INSTALLATION and the component can be saved. There won't be any search option for the page. It will directly take you to the contents on the page. What is add mode search record? When a different search record (other than standard search record) is specified for Add actions to create special security views that limit the rows operators can add based on specific search criteria or to specify a different search record for add actions. Which Table contains Login User Id & Password in people soft database..? It Is PSOPRDEFN. The password however is encrypted. What is the 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. What is Getlevel 0()? What is the use of %subrec and %selectall functions? Getlevel0 ()---used the get the rowset of the level0. %subrec--is used only in Dynamic View SQL where it expands to the columns of a subrecord: %selectall--%SelectAll is shorthand for selecting all fields in the specified record, wrapping date/time fields with %DateOut, %TimeOut. Explain about 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;

Page: 14

Component Row Component Record Component Field

&Row_level0, &Row_level1; &Record; &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 levelRowset &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; 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 What are the Data Buffer methodsSort method- Using the sort rowset method, it is possible to sort the rows within the rowset based on custom criteria. Syntax- &Rowset = GetRowSet (SCROLL.<RecordName>); &RowSet.Sort (<FieldName>, A | D [<Fieldname>, 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 [,<bind variables>]); 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.

Page: 15

Syntax- Fill (where.. , <bind variables>); 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.

In what order will PeopleCode be performed on the buffers in a panel group?


PeopleCode starts at the top of the buffers in a panel group and works its way down to the bottom. The PeopleCode programs on a given row will be performed in the same order as the fields on the record definition. What do ActiveRowCount and FetchValue do? Why are they generally used together? The ActiveRowCount function returns the number of rows at a specific occurs level. The FetchValue builtin function is used to retrieve the value of a field when using a looping statement. The two are usually found together in most For Looping statements. When is UpdateValue necessary? The UpdateValue built - in function must be used when updating the value of a field within a PeopleCode looping statement. Why should the SortScroll function be used? The SortScroll built-in function can be used to dynamically sort the rows of data within a scroll bar. What are the parameters of the SortScroll function? The occurs level and primary record definition to be sorted, followed by the field to use for the sort with "A" for ascending or "D" for descending. Multiple sort fields can be referenced. 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). DoCancel DoModel DoModelComponent Exec (when synchronous) File attach functions Insert image We should not write these functions in following events: SavePrechange Workflow SavePostChange RowSelect How to access PS_Query from your peoplecode? We can access the PS_Query by changing the record type as Query View and it allows us to fetch the PSQuery. Once the query is fetched, the columns are automatically included into the record definition. No need build the record. What is Query Security Record? Query Security Record is to secure access to a particular record using a security view. 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

Page: 16

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-0 record 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 Is it possible to create a dropdown list on a page and have the values in that list based of some criteria. In short, dynamic drop down list? Field.ClearDropDownList(): It removes the current contents of the DDL. Field.AddDropDownItem([Value],[Descr]): It takes two string parameters [Value]: It is actual value which is mapped to the dropdown item [Descr]: It is actual text which is visible as a dropdown item /* Define a field object for which you want to populate the drop down values */
&FLD_temp =Field.ACTION_RSN;

/* Clear the current dropdown values */


&FLD_temp.ClearDropDownList();

/* Following logic would be used to dynamically populate standalone rowset with the values */
&RS_temp = CreateRowset(Record.ACTN_RSN_TBL); &RS_temp.Fill("WHERE ACTION=.......");

/* Add the values to the dropdown list*/


For &I = 1 To &RS_temp.ActiveRowCount &FLD_temp.AddDropDownItem(&RS_temp.GetRow(&I).GetRecord(1).ACTION_REASON.Value, &RS_temp.GetRow(&I).GetRecord(1).DESCR.Value); End-For;

Tell me few peoplecode functions you worked with? Hide, Unhide , Grey, Ungrey, Substring, SqlExecute, All, None, WinMessage, Win escape, Fetch value %page, %component, Msgbox, Setlable, GetFieldLabel, Row count, ActiveRowCount, FieldChanged GetRowset, IsChanged, Discord row, PriorValue, GetSql, CreateSql. What is the difference between Transfer() and TransferPage? Transfer() closes the current page and transfers the end-user to another page, either within the current component or in another component. Transfer can either start a new instance of the application and

Page: 17

transfer to the new page there, or close the old page and transfer to the new one in the same instance of PeopleTools.
Transfer(new_instance, MENUNAME.menuname, BARNAME.barname, ITEMNAME.menu_itemname, PAGE.component_item_name, action [, keylist]);

where keylist is a list of field references in the form: Transfer() stops all further processing (including the program containing this function), unless you are in the middle of save processing. TransferPage()
- is called in SavePreChange or SavePostChange PeopleCode, the processing completes

before

the transfer is processed.

- TransferPage([PAGE.page_name]) Open the specified page which is in the current component and the following statement will be ignored. How to display the Secondary Page? 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.
DoModal(PAGE.pagename, title, xpos, ypos, [level, scrollpath, target_row])

If there is same component X in two different menus, Menu1 and Menu2 and if you want to assign different search record for each menu, then which peoplecode function do you use? No need to write PeopleCode. In MenuItem property, we can use Override option to set our search record. What is use of SendMail()? You can use SendMail to send an email message from a PeopleSoft page.

SendMail(flags, recipients, CCs, BCCs, subject, text, [, attachment_filenames][,attachment_titles]) The flags parameter of this function and its return codes are platform dependent: the values are different depending on whether the platform is using the VIM or MAPI mail API (the SMTP mail API ignores any additional flags.)

What is the difference between Component level PeopleCode and Record Level PeopleCode There is no difference between the actual PeopleCode that you can use at the component, record field or component record field level. The difference is basically with the order of execution. Component code fires before component record field, which fires before record field code. Knowing the event model, you can then plan the location of your code to execute closest to where you want the effect to take place.

Page: 18

If you want to default a field value, you'd probably place your code in the record field rowinit. If you need to set some derived values on hidden pages in a component, you'd probably want to use component level code. Also, record field PeopleCode executes in any component containing the record field. Component level peoplecode will only execute for that component. What is Work list? A work list is a list of the items awaiting an activity. Users select items from the list, and the system automatically displays the panels they need in order to work on the items. Work lists are automatically created as you route items to them. To define a worklist, you just need to create a worklist record definition and define worklist routings. Explain about type of WorkFlow? Workflow routings are initiated by Workflow PeopleCode. The PeopleCode is assigned to pages, and when you save the page, it triggers a business event and its related routings.

Any process that can trigger PeopleCode can trigger a workflow event, including:

Users working in PeopleSoft pages. Third-parties sending information to a PeopleSoft component by way of Component Interfaces. Batch programs or queries sending information to a PeopleSoft component by way of Component Interfaces.

Page-Based Triggers At the center of almost every PeopleSoft activity is a page or group of pages (a component). Pages are your windows into the database. When you want to perform some functionenter an invoice, update employee information, register in a training classyou navigate to the appropriate page and enter or update data on it. As you enter data and save your work, the Application Processor manages the system behind the scenes, verifying your data, displaying prompt lists and translate values, running PeopleCode, and updating the database tables as necessary. Adding workflow does not change this basic picture. You still interact with the database through pages. Workflow PeopleCode evaluates data entered into a page and evaluates the data to see if the conditions that define the workflow rule are met. When the conditions are met, the PeopleCode generates a workflow routing. Third-Party Triggers PeopleSoft applications have always given you the flexibility to integrate with best of breed solutions. You can choose the hardware configuration and database platform that best meet the needs of your organization. The workflow tools are no different. Rather than requiring all input to come from a user at a PeopleSoft workstation, you can accept data from a variety of sources, such as electronic forms or automated queries. By using Component Interfaces to enter the data, you ensure that PeopleSoft performs all the same edits and security checks it always doesincluding running any workflow PeopleCode.

Page: 19

Batch Workflow Triggers There are cases where you want to trigger events using batch processing rather than in response to a user action on a page. A very common reason to do this is if you are monitoring a database for certain conditions such as elapsed time. For example, you might query for a list of users who haven't changed their passwords in over a month, so you can send them an email message asking them to change. Or you might check for outstanding course requests to review. Although the batch programs perform a simple task, they play an important role in workflow. By running predefined SQL programs on a regular basis, they periodically check your PeopleSoft database for data that is relevant to your business processes. By causing appropriate PeopleCode to fire, they enable the system to respond automatically. With workflow, you can get the system to automatically query the database for particular conditions. You can run these queries on a regular schedule. And most importantly, you can automatically trigger workflow notifications based on the results of these queries. Batch workflow processing uses the following tools in addition to the standard Workflow tools: Application Engine programs run queries behind the scenes and pass the results to a Component Interface. You can use Process Scheduler to runs these programs on a regular schedule. The Component Interface accesses the component and its PeopleCode to trigger a business event, thus initiating a workflow.

PSWORKLIST record is used for workflow routing . It should contains minimum of?

PSWORKLIST contains following six fields: BUSPROCNAME (key), ACTIVITYNAME (key), EVENTNAME (key), WORKLISTNAME (key), INSTANCEID (key), TRANSACTIONID (alt key)

Page: 20

APPLICATION DESIGNER
What is an Application Designer? Application Designer is an integrated development and upgrade tool that contains collection of related object definitions, these objects are useful for specific purpose means using this objects we can develop projects according to the user requirements. What are the 8 Development Steps? 8 steps in Developments steps Design the Application. Create Field Definition Create Record Build the Record Design the Page Create Component Register the Component Test the Application Difference between upgrade and development view? In Development view we will create or modify many types of definitions but in the upgrade view we will have only those definitions that are available for upgrade. How many types of tables are there in database and what are their differences? 1. System Catalog Tables 2. People Tools Tables 3. Application Data Tables System Catalog Tables: System Catalog Tables stores physical attributes of the tables and views. Naming convention for these tables is SYS. PeopleTools Tables: The objects that we develop using the People Tool Objects are saved in PeopleTools Tables. Naming convention for these tables prefixed with PS_. Once a field is created it would be stored in psfield definition table, once a record is created it would be stored in psrecdef. (Only definition/structure is stored) Application Data Tables: stores the data, which is entered by the user through PeopleSoft application windows and pages. Naming convention for these tables is PS_. Application Data Tables are divided into 2 types: 1. Control Tables 2. Transaction Tables Explain about Control table and Transaction table? Control Tables: Define the company structure and processing rules. Control table information is organized and stored by a set identifier, commonly called a SetID. Eg: PS_DEPT_TBL, PS_COMPANY_TBL, PS_LOCATION_TBL etc are some of the control tables. Most of the times Control Table names ends with _TBL Transaction Tables: Transaction tables store data about day-to-day activities. Because of this, these tables are updated frequently and can be quite large. The type of transaction varies, such as invoices, paychecks, employee names and addresses, job history, benefits data. One of the important Transaction table in HRMS is PS_JOB Explain about the Core Base Tables? Now that we have looked at the different table types, lets look at the major base tables in PeopleSoft. These are the core tables in the database. Almost all PeopleSoft processes touch one of these tables,

Page: 21

and chances are youll need to do the same in nearly every query. Since you will almost always be starting with one of these tables, learn their differences in order to choose the correct one. Each table contains every employee no matter what their status (active, inactive, on leave, etc.). The relationship between these three tables is simple (Figure 1-1). The PS_PERSONAL_DATA table has one row per employeeit is the parent table. Next in line is the PS_EMPLOYMENT table, which stores one row per employee job (if employees can have more than one job at a time in your organization). Finally, the PS_JOB table stores all of the status, compensation, and position history for the employee on many rows. PS_PERSONAL DATA. Stores current and historical information on the employees home address, SSN, and personal history such as birth date. Choose this table when you need personal (and sometimes confidential) data. Remember, everyone in the database (actives, terminated employees, and retirees) is on this table. Each person has exactly one row. See Chapter 6 for information on keys and field definitions. PS_EMPLOYMENT. Contains a general record of the employees employment, with information such as hire date, years of service, and EEO categories. Choose this table when youre looking for a particular date. All set-in-stone dates, like hire date and rehire date are stored here. Just like PS_PERSONAL_DATA, everyone in the database is on this table. See Chapter 12 for information on the specific fields found on PS_EMPLOYMENT.

PS_JOB. Stores current and historical information about an employees job, such as status, compensation, promotions, and company categories. All history for this information is stored here, too. Choose this table when you need a list of employees who have a certain status. Typically users look for employees who are A, L, P, or Active, On Leave, or On Paid Leave. Each employee will have several rows. See Chapters 7 through 10 for information on querying the PS_JOB table for different kinds of information. What is a prompt table? Prompt tables are the most common methods for validating data entry in peoplesoft applications. This is like application data table the only difference is that it stores values that other tables can validate against. Prompt table is a control table. (Country table and Company table) FieldEdit Event of the particular field is not fired when cursor leaves after entering data. Why?

Page: 22

The PageField property is Deffered Processing. How to set dynamic prompt table without using %Editable? As we know, while creating Dynamic view, there is no need to specify the SQL. This SQL should be written and assigned to the Record Field dynamically using peoplecode. For example Record Field EMPLID, it is assigned with dynamic prompt table view TEST_DVW and this view TEST_DVW is dynamically initialized by the following Peoplecode, which can be assigned both in FieldChange and RowInit events of the Record Field EMPLID: <RECORDNAME>.EMPLID.SqlText = "<write your SQL here>"; Note: One interesting fact about dynamic views is that you can change its output on page considering some factors like User permissions, other key field values on page etc. Table where are the Translate table values are stored? It will store values for fields that don't require an individual prompt table, It is also known as xlat table. The data we store in the translate table does not change often. Each database contains one translate table. (blood types, days of the week) What is the maximum field length for an xlatt field and what data types does it support? Max field length 4, CHAR Datatype. How many table edits are there in Record field properties? 1. Prompt Table With Edit 2. Prompt Table No Edit 3. Translate Table 4. Yes/No Table Edit Prompt Table With Edit: Users can edit the contents of the field against the values that are maintained in the specified prompt Table. Prompt Table No Edit: Provides List of Suggested values, which users cannot edit. Translate Table Edit: Which is nothing but a translate table created by developer. Yes/No Table:In some situations we want the user to enter only Boolean values like yes or no true or false in this situation we will use yes no table. The Translate Table for ex: PSYESNO. When you select the Yes/No Table Edit, the system automatically points to the PSYESNO field in the Translate Table Difference between prompt table with edit and No Edit? Prompt Table No Edit: Provides List of Suggested values, which users cannot edit. Prompt Table With Edit: Users can edit the contents of the field against the values that are maintained in the specified prompt Table. What is effective date? Date on which a table row becomes effective, the date that an action begins. For example, if you want to close out a ledger on June 30, the effective date for the ledger closing would be July 1. This date also determines when you can view and change the information. Pages or panels and batch processes that use the information use the current row. Effective date enables us to keep historical, current, and future information in tables. There are three types of effective dates: Current, History and Future. What is effective status? EFF_STATUS usually accompanies EFFDT. For example in Department table suppose we inactivated one dept from so and so future effdt, from that future date onwards this dept is going to be inactivated, after that whenever we click the link prompt button of dept id field we can see only active departments. What is effective sequence?

Page: 23

Whenever we want to enter more than one transaction on the same day for an employee like promotion and salary hike we will use effective sequence. Effseq number starts with 0 Is there any way by which you can find out whether the user is in Add mode or Update mode? %mode---returns A---for Add mode. Returns U for Update mode How many Actions are there in the Component Properties dialog (Use Tab)? Add: Used to add a new high-level key, such as a new employee ID or a new customer. Except in the case of effective dating Add is used to insert new current row or update future rows. If we select only Add action then we cant modify the existing rows. (Doesnt have any effect with effdt) Update/Display: Used to update existing rows only. Update/Display All: Used to update current and future rows in an effective dated record. Only used with effective dated records. Correction: Used to update any rows (history, current and future) in an effective dated record. Only used with effective dated records. Data Entry: Not supported in PeopleSoft Internet Architecture Important Record Field Properites: Key Check this to identify the field as the search criteria that uniquely identifies 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. Check this to indicate that duplicate values may occur. The order in which you place duplicate order keys on a field list, determines the order in which duplicate keys will be retrieved. This identifies 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 on a search record as an alternate search key, when you bring up a page, the system prompts you to enter a key or alternate search key values. This identifies the field as descending, if you want rows of data to be retrieved in 3-2-1 or C-B-A order. If you leave this option turned off, the key is an ascending keymeaning 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. We use descending order primarily for Effective Date fields; most character keys are ascending. When you specify a Search Key, the field will be available in the Basic Search or Lookup page. A search key is valid only for keys and should be used only on search records and prompt records. With Search Key checked, the system automatically turns on the List Box Item. Check this if you want the field to appear in the list box preceding a page. If a field has values on the Translate Table, and you designate it as a list box item, the list box automatically shows the translated value instead of

Duplicate Order Key

Alternate Search Key

Descending Key

Search Key

List Box Item

Page: 24

the code. From Search Field Through Search Field Select these as attributes for fields used as search records. If you check the From Search Field, the displayed list contains rows where the field value is greater than or equal to a value entered by the user. If you check Through Search Field, the displayed list contains rows where the field value is less than or equal to a value entered by the user. If you do not want these fields to be in a search list box, clear the List Box Item checkbox, even if the field is an Alternate Search Key. Default Search Field This controls what fieldname displays in the Search By drop-down list on the Basic Search page.

What are the mutual exclusive keys in Record Field property? Key, Duplicate Order Key and Alternate Search Key. What is from search key and through search key in Record properties? From search key: Gives the values from the specified value to the max values For ex: if we have to search values after emplid of 100 to the max then we should enter 100 in the from search key. (total values to be displayed are 300 values) Through search key: gives values from the given value 300 values. What is the difference between key and search key and also alternate search key? Keys determine the structure that makes a row of data unique. A key may also be a search key, which makes the field appear on search pages to help users locate rows of data. Alternate key are only used for search pages and have nothing to do with the table structure. Alternate search key provides an alternate path into the table data. It will appear to the user whenever he clicks advanced search option. How many types of tables are there? Define them? SQL Table: A physical SQL Table present in the database, this is the default. SQL View: Not a physical SQL Table but corresponds to a view written in SQL referring one or more fields from different tables. This gives a filtered view of information stored in tables. Stored in the database as a view. (Query view is system generated and SQL views are created by developer) whenever you modify a record you need to take care: check if any views are dependent on this record. Dynamic view: A record definition that can be used like a view in pages and People Code but is not stored as a SQL view in the database. Dynamic views provide superior performance. Derived/Work: We can use it to calculations. It is not an object, and also we can use it as a funclib. A temporary workspace to use during online page processing. A derived or work record is not stored in the database, so no need to build it. Sub Record: Group of fields used in multiple records like companies having address data of employees. If you have to use the same fields in different record definitions, then we will store all those fields in a subrecord and add this subrecord as a field to the record definitions. Stored in the database. Query View: using the PeopleSoft Query we dont need to write a query it will automatically generate by dragging and dropping. This is a two tier tool and runs through application designer and produces SQL dependent upon the host RDBMS. Temporary Table: we will do all the manipulations on the data present in the temporary table. Increases the performance, as it is not stored in the database. Used mainly for the AE batch processes.

Page: 25

In SQL View type record, do you know the use of Non_Standard SQL? This option is just to override the standard naming convention of prefixing PS_ to the record name. What is a dynamic view? Where we can use dynamic View? It can be used like a view in pages and people code but not stored in database as a sql view, instead the system uses the view text as a base for the sql select that is performed at runtime. These views shows superior performance in some situations such as search records and people code selects. How the dynamic view is faster than SQL View? Dynamic views are used to send dynamic-sql-select-statements during runtime. For Records, Views and Dynamic-Views the fields behind the keyword select comes from the recorddefinition made in PeopleSoft. For the Records and Views you have also a corresponding database object; there is a PS_XXX-Database-Object for every XXX-Recordtable or View-Definition. In case of Dynamic-Views this is not neccesary. If you want to select PS_PERSONAL_DATA.NAME and PS_EMPLOYMENT.HIRE_DT in a page, than you could create a dynamic-view with the fields emplid, name and hire_dt. After that you have to define the sql-text, for example select a.emplid, a.name, %dateout(b.hire_dt) from ps_personal_data a, ps_employment b where b.emplid=a.emplid You do not have to build any database-objects in this case. When you use this dynamic-view in a page, peoplesoft takes this sql-text at runtime and executes the statement. Why to use dynamic-views? 1. Often you can use dynamic-views instead of regular views and as a result of that you have less database-objects. 2. In some cases it is faster to use an sql-statement instead using a view, for example: select distinct a.emplid, a.name, %dateout(b.hire_dt) from ps_personal_data a, ps_employment b where b.emplid=a.emplid and b.emplid=%1 is often faster than using select emplid, name, %dateout(hire_dt) from ps_myview where emplid=%1 where ps_myview is a regular view with the following sql-text "select distinct a.emplid, a.name, %dateout(b.hire_dt) from ps_personal_data a, ps_employment b where b.emplid=a.emplid" 3. There are ways to manipulate the complete where-condition of the dynamic-view using peoplecode and scrollselect. In these cases the dynamic-view should only include the keywords select and from (no where!). What is difference between SQL View and Dynamic View?

Page: 26

SQL views are written against the RDBMS catalog tables. Dynamic view is declared only to people tools and not to the system catalog. SQL views are not recommended for performance tuning as they run against the database. Dynamic views improve performance. SQL views reside in the database dynamic views are not. Advantages of Using Search Views instead of Search Table As the search view is created with selected fields there will not be much stress on app server and there by improves the performance. Search View also gives additional search criteria. What is the difference between record properties and record field properties? Record properties apply to the entire record definition. Record field properties are not shared among records, they are specific to a single record definition and are stored with the record. Each record stores a unique set of record field properties while the primary field definition remains the same. What is Component Buffer? Area in memory, which stores data for the currently active component. Whenever you open a component the entire data for that component is retrieved upfront and stored in the application server. Component buffer is a temporary buffer allocation. What is a data buffer? Data buffer contains multiple components of data. What databuffer classes are available in people code? Rowset, Row, Record, Field, Array, File, Sql, chart, grid and so on. What is the difference between component buffer and data buffer? Component buffer contains active component data i.e. level 0 data. Data buffer contains multiple components of data. Can you create your own Message Set Number as 1 in Message Catelog entries (PIA)? No. The range from 1 to 9999 is for delivered Message Catelog entries. Why is the Message Catalog used? The Message Catalog is used to store the text of error and warning messages that will be used in PeopleSoft applications. This allows the same message to be used in more than one PeopleCode program while only maintaining it in one place. It also prevents the text of messages from being hardcoded into Peoplecode programs. What data comes into Component Buffer? Primary record data, related display fields, translate values and derived work records. If you keep key and alternate search key on 0 level then only 2 values will appear in Component Buffer the other field values will not available. In Component Buffer if you want to see the other field values then place a non-key field on 0 level and make it invisible. Every level will have its own primary record. A level 0 primary record and a search record can be different but the key field values should match. Which message sets does PeopleSoft reserve as its own? Message sets 1 through 19,999 are reserved for use by PeopleSoft applications. Message sets 20,000 through 29,000 can be used by PS users. How is a message retrieved from the Message Catalog in PeopleCode? To retrieve a message from the Message catalog in PeopleCode, the MsgGet built in function is used. The required parameters of the function are message set, number and a default message. Why is PriorValue used? The PriorValue built-in function is used to determine the value of a field before it was changed.

Page: 27

What does SetDefault do? The SetDefault built -in function will clear out the contents of the field. The record default or FieldDefault PeopleCode can than be applied if appropriate What is a Related Display field and Display Control field? A related display field is for display purposes only - it always references a row that's not being updated from the current panel. The display control when you select Related Display field, you need to relate it to the appropriate control. A list of all the controls on the panel marked as display control fields in the Related control field box. Select the control field to which this particular related display is related. How many levels can we have on a page? Page allows Nested levels up to 3 levels. What are Level Based Controls and their Difference? Level Based controls are Scroll Area, Grid and Scroll Bar. Scroll areas have their page fields arranged by the developer. Page fields in a gird always appear in a single row. In grid we can view no of rows by giving occurrences. Scroll areas provide a row separator when you select multiple occurrences of data. We can view multiple rows in a grid while in a scroll area you can retrieve only one row at a time. One can have nested scroll areas but not grids. You can insert grid in a scroll area but not scroll in a grid. How to populate data into grid in online? &Rs.Select or Scrollselect (). What is the difference between scroll area and Grid? Scroll areas single row of data will be displayed whereas in grid multiple rows of data will be available. Difference between standard, secondary and subpage? Standard page: It is the graphical interface between users and database. The important data is displayed in the standard page. We can place secondary as well as a subpage in standard page. Secondary Page: Page that will open on users request but remains as a secondary to the primary page display. We can open it through standard page only. The data within secondary page is at the same level or below the level of the page control that launches the secondary page. Subpage: subpage controls are used to provide standard look for the commonly used fields. A sub page is referenced as a page control on multiple standard pages. Difference between subpage and sub record All the fields in a subpage must be associated with fields of a sub record in the specified record definition. Subrecord contains all related fields, whereas subpage contains fields from sub record. What is occur level and occur count? Occurs Level: Occurs level determines the level of the object that we inserted. By using this we can set levels for example after inserting a level based control in level 2 if you want to change the level based control to level 1 you can change the occurs level. Occur Count: Occur Count determines how many rows should be displayed. For ex if you want the scroll to display only 5 rows then we will give occurs count to 5. Difference between Search Record and Add Search Record Search Record: The search record controls access of rows of data in a table, and its keys and alternate search keys appear on the search page as criteria. The search record might also contain logic to filter the search to secure rows of datarow-level security is implemented in this way

Page: 28

Add search record: Add search record is specifically used for add actions. If we are using a search view as a search record for performance in this situation we will put the main record as a add search record so that we can enter new values in this main record. The system default is the standard search record if we don't specify an add search record What are the options available, while building a table? The Build process uses Data Definition Language (DDL) to construct a physical database component that is based on the associated record and field definitions that you created. With the Build feature, you can create the following. Create Tables: Creates structure in database. Create Index: When you build a table, it also creates index for that table Create View: It will create a sql view. Alter Tables: When you dont want to lose the existing data we build that record with this Create Trigger after the Build process begins, there are no runtime prompts until the process is complete. All events are written to the Build log. What are the three build options available when building a table from a record? Build script file: which generates a sql script that can be run against the desired database to build the table. Execute SQL: which builds the table in the database. Execute and build script: which both build the table and generates a sql script. Can you write People Code in Secondary as well in Sub Page? People Code can be used on the secondary page just like any other page. We cannot write People Code for Subpage. Can we have 2 Scroll areas at Level 1? Yes, we can have 2 scroll areas at level 1. What are multi level pages where should the field at level 0 be getting their data from? Level 0 fields must be associated with record fields of search record. Can we keep 2 records at level 0? Yes we can have 2 records at level 0 provided should match the key fields. Audit Table and their fields? Record and Field Level Audits Records the information of user actions details as well as the changes or additions or even modifications done on the table. Audit records are prefixed with Audit_. Audit Field Name AUDIT_OPRID AUDIT_STAMP AUDIT_ACTN Purpose Identifies the user who caused the system to trigger the auditseither by performing an add, change, or delete to an audited field. Identifies the date and time the audit was triggered. Indicates the type of action that the system audited. Possible actions include: A: Row inserted. D: Row deleted. C: Row changed (updated), but no key fields changed. The system writes old values to the audit table. K: Row changed (updated), and at least one key field changed. The system writes old values to the audit table. N: Row changed (updated), and at least one key field changed. The system writes new values to the audit table. Identifies the name of the record definition that was audited.

AUDIT_RECNAME

Page: 29

Record Level Audit: for creating a record for record level audit we need to have 3 fields Audit_operid, Audit_stamp, and Audit_action. We can create our own audit records by prefixing Audit_ Field level Audit: By using delivered PS_AUDIT table we can set field level audit. What are the key disadvantages of auditing? Auditing adds overhead to transactions that will slow database performance. Audit tables can grow to be quit large, again draining resources. What is SQL Object? People tool object that we can create and use it wherever we want PC, views, and dynamic views. %SQL. Differed and Interactive Processing In Interactive mode for every cursor action there will be a trip to the server. In deferred processing mode, trips to the server are reduced. In Interactive whenever a user exits a field there will be a trip to the server. In Deferred processing until a user performs an action, which requires a trip to the server there wont be any trips to the application server. What is use of Allow Expert Entry in component property? This property enables the user to have the expert entry page with Deferred mode even if the components process is interactive. All lookup fields become entry page only which will not validate the user data unless save or refresh the current page. To have this utility the user must be set as Allow Expert Entry checked in User Profile(General Tab). In how many places we can set Differed processing? Field Record Page Component What is the design Considerations while designing a page? Put the field control on the appropriate derived or work record, rather than on a regular data record definition to derive its value. Use as few record definitions as possible in a component. Do not remove table edits to improve performance, even though an edit against another table causes a short pause. Eliminating them might compromise data integrity. Apply deferred processing when possible to fields, pages, and components What is registering a Component? We will add the component to a Menu and give permissions and security. What are the considerations that you take while altering a table? Any time one intends to change an existing object we should always attempt to find out if the changes are effecting on other system objects. Edit> find definition reference: If a definition reference any other definitions we must research the connection and determine with the referenced object will have any effects then we need more follow-up. Can we use the same Component in 2 Menus? Yes , we can use same component in any no of menus Can we have a subpage at 0 Level? Yes, we can have a sub page at 0 level. Can we have a Secondary page at 0 Level?

Page: 30

We cannot have a secondary page in 0 Level. Can we have a Grid in Level 2 and scroll area in level 3? Yes we can. But performance issues say that a grid should always reside in the last level Can we have Nested Grids? No we cannot have Nested Grids. What is Parent Child Relationship? To maintain parent child relationship if the parent table contains one key field the child table should contain the same key field and one additional key. Some times while creating records, you'll have a field within a table for which you want to allow multiple occurrences, in which case you create a subordinate or child table. For ex. For employee reviews, an employee can be reviewed for performance in multiple categories - organization skills, interpersonal skills etc.,. These categories and ratings are stored in a separate child table, EE_REVIEW_RT, which is related to REVIEW_DT, the parent table which stores data about employee reviews. The keys you set on parent record will determine which keys are required on any child records. The child must have the same keys as the parent, plus one or more keys that uniquely identify each row. Can we define Child table fields in '0' level? No, Parent tables only can be associated at '0' level. What is the difference between primary record and the search record? Each scroll area and grid is associated with a single primary record. This represents the application data table the page fields are associated with. All fields in a scroll area or grid must be associated with one (and only one) record, which is the primary record for that level. The search record builds the search page for a component and populates all fields at level 0. The search record is determined at the component level. When you select a row of data from a search page where you are taken to? The search page takes you to a component the component is made up of one or more pages with each page containing several fields that hold the data. What is the difference between adding a row of data and inserting a row of data? When you use the add action a new high level key is created at level 0, when you insert a row of data you are adding information that has a one to many relationship with the key at level 0. Generally you insert rows within scroll areas are grids. How do you recognize levels on a page other than level 0? Levels are bound by either a scroll area or a grid. When exporting a project to a file in what format is the definition data stored? Projects are stored in XML files. Can projects be used to transport application data? No, Peoplesoft offers a different tool data mover to transport application data. Projects only hold people tools data. What 2 methods are available for transporting definitions in a project between the databases? Projects can be exported directly to another database or they can be exported to a file. When you export to a file you must take the extra step of importing the file from the target database. By using import and export commands we can transfer.

Page: 31

What is Business Unit? What are the major functions? A business unit is a way of tracking specific business information for reporting and other roll-up data collection. It performs 2major functions 1) It allows you to maintain a tree structure to facilitate customer-specific roll-up reporting. 2) It allows you to distribute and administer certain control tables like the department table. This is extremely important for large or multinational companies. Business Units are logical units created within your organization for reporting purposes and don't have any predetermined restrictions or requirements. This flexible structuring device enables you to actually define a higher level of reporting for your employees and group them according to functional or administrative tasks or for your business purposes. You can define Business Units that reflect the specific functional needs of your internal human resources departments, or reflect the actual business structure of your enterprise. Your Business Units may be, for example, companies, agencies, subsidiaries, divisions, departments, or branch offices within your organization. Or, you may choose to have a single Business Unit represent your entire organization. It's up to you and your unique business needs. What is Setid? SetIDs are simply the lables used to identify a TableSet. SetId is an additional primary key in control tables, that enables sharing of control table information across business units. All rows of data in your control tables keyed by the same SetID make up a TableSet. Where a Business Unit organizes your company or your organization, SetIDs help you organize your data within the system. The HRMS system uses tables (Control Tables or Prompt Tables) that use a high-level key that enables you to identify and retrieve data from the system. A secondary high-level key, referred to as a SetID, has also been added on various tables. SetIDs are simply the labels used to identify a TableSet. Business Unit and SetID functionality in PeopleSoft HRMS also provides you with a higher business level for reporting purposes and other business data roll-up. What is Table Sharing? Tableset Sharing is a method of filtering prompt data so that only appropriate values are available for data entry. With tableset sharing, a single table can offer different values based on underlying business rules. Table set Sharing is organized around these basic elements: Business Units and transaction tables SetIDs and control tables Business rules. (or) A TableSet is a group of rows across your control tables identified by the same SetID. In other words, all rows of data in your control tables keyed by the same SetID make up a TableSet. Tablesets or group of tables enables sharing of control table information and processing options among business units. For ex., using Tablesets you can define a group of Job Codes that can be shared by different business units. What is the difference between a Business_Unit and a Setid? And where can we set the relationship between them in PIA? A business unit is a way of tracking and reporting specific business information for reporting and other roll up data collection. It does not have to be a legal entity for HR. Its a way of organizing your organization. A SetID is a link to Table Set Sharing. Table set sharing simply consists of assigning specific SetIDs to specific record groups for individual business units to restrict the view of rows of data within control tables. Its a way of organizing your data in the system. What is Record Group?

Page: 32

A Record Group is a group of related records keyed by SetID which define the valid values for one or more fields in PeopleSoft. Related values are keyed with/under a single Record Group. For example Record Group FS_02 defines edit tables related to Calendars. Record Group FS_26 defines edit tables related to Locations. Record Group AR_02 defines edit tables related to the Accounts Receivable Aging. The structure of Record Groups is core to the feature of PeopleSoft known as TableSet sharing. Record Groups support sharing one set of valid values across multiple Business Units. All Business Units in PeopleSoft Financials must have a completely defined TableSet of valid values. To support this Business Units are often defined with reference to a default SetID. The SetID value is then the key used to access the complete set of valid values know as a Table Set. Within a TableSet each Record Group must reference one and only one SetID. Values specific to a Business Unit are keyed by a SetID referenced only by that Business Unit - sometimes the actual BU is used as the key/SetID value. Values shared with one or more Business Units are typically keyed by a more generic SetID - perhaps representative of a market or geographic segment. Finally values shared across all Business Units are usually keyed by a generic SetID - sometimes SHARE or MODEL. How many kinds of trees are available in tree manager? Many kinds of trees for a variety of purposes can be created, but all trees fall into these major types: Detail trees - in which database field values appear as detail values. Summary trees - provides an alternative way to group nodes from an existing detail tree, without duplicating the entire tree structure. Node - oriented trees - in which database field values appear as tree nodes. Query access trees - to organize record definitions for PeopleSoft Query security. What is FileLayOut? PeopleSoft supports reading and writing to plain text files that have a format based on a FileLayout definition that has been created PeopleSoft Application Designer. If a file is plain text, data is read or written using text string. If a file based on filelayout, you can use text string, rowset, record object.

This simplifies reading / writing and manipulating hierarchical transaction data with PeopleCode. The available file formats are Fixed, CSV & XML. Local Record &RecLine; Local File &MyFile; Local SQL &SQL2; &MyFile=GetFile(test.txt,w); If((MyFIle.IsOpen) then If(&MyFile.SetLayOut(FileLayout.FLSample); &RecLine=CreateRecord(Record.JOB); &SQL2=CreateSQL(%SelectAll(:1),&RecLine); While(&SQL2.Fetch(&RecLine)) &MyFile.WriteRecord(&RecLine); End-While; End-if; End-if;

Page: 33

SECURITY
How many ways we Can Implement Security In People soft? We can Implement security in People soft in 6 ways: 1. Signon and time-out security. 2. Page and dialog security. 3. Batch environment security. 4. Definition security. 5. Application data security. 6. PeopleSoft Internet Architecture security What is Permission List? A Permission List is a list of authorizations that we assign to roles. What is a Role? Roles describe how people fit into the workflow. A role is a class of users who perform the same type of work, such as clerks or managers. Business rules specify what user role needs to do an activity. For ex., department managers ( a role) must approve external course requests. What is user profile? A User Profile is a set of data about a particular user. And is useful to define the individual PeopleSoft users. We define User Profiles and then link them to one or more Roles. Typically, We link a User Profile to at least one Role in order to be a valid profile. The majority of values that make up a User Profile are inherited from the linked Roles. What type of permissions can contains a Permission List? Permission List stores the Sign-On times, Menus, PeopleTool access, such as access to Application Designer. Can we assign multiple roles to user profile? Yes. Can we assign multiple permission lists to roles? Yes. What is Single sign on? At a time we connect to more than one database. Means if we are in HR database, after completion of the transactions if we want to enter into FIN database, for this we need not reenter the password. What is a sign on time? A sign on time is an adjustable interval during which a user is allowed to sign on to PeopleSoft. How we specify the sign on times and time-out interval? Using Maintain Security we can specify both the sign on times and time-out interval. Is it possible to restrict some users to access specific actions? Yes. How we execute the batch process? By using the Process Scheduler. But we should assign the appropriate Process Profile to the User Profile and create process groups for our processes. Can we add the Process Profile Permission List directly to the User Profile? Yes. We can add the Process Profile Permission List directly to the User Profile, not to an intermediary

Page: 34

Role. What is User ID? A PeopleSoft User ID is an ID which we enter at the PeopleSoft sign on dialog box. Using the User Id we can enter into the PeopleSoft system. How can we assign a User Id and Password to a PeopleSoft user? Using the PeopleTools Security. What is Connect ID? Using the Connect Id we can connect to the Database. How can we create the Connect IDs? By running the Connect.SQL and Grant.SQL scripts. What is User ID? A PeopleSoft User ID is the ID we enter at the PeopleSoft signon dialog box. Using People Tools Security, we assign each PeopleSoft user a User ID and password. The combination of these two items grants users online access to the PeopleSoft system. The system can also use a User ID stored within an LDAP directory server. The User ID is the key used to distinctly identify the User Profile definition. What is Connect ID? Connect ID is a valid user ID that, when used during login, takes the place of PeopleSoft User IDs for the logon process. Using Connect ID means we don't have to create a new database user for every PeopleSoft user that we add to the system. Connect ID is required for a direct connection (two-tier connection) to the database. So application servers and two-tier Windows Clients require a Connect ID. We specify the Connect ID for an application server in the Signon section of the PSADMIN utility, and for Windows Clients we specify the Connect ID in the Startup tab of the Configuration Manager. We can create a Connect ID by running the Connect and Grants scripts. What is Symbolic ID? We use Symbolic ID as a search key for retrieving the encrypted value of Access ID, which is stored in PSACCESSPRFL. Also, the Symbolic ID acts as an intermediary entity between the User ID and the Access ID. All the User IDs are associated with a Symbolic ID, which in turn are associated with an Access ID. For example if we had to change the Access ID, then we need to update only the reference of the Access ID to Symbolic ID in the PSACCESSPRFL table rather than updating with each and every User Profile in the PSOPRDEFN table. What is Access ID? While creating a User ID, we will assign a Access Profile to the user id, which specifies an Access ID and password. PeopleSoft Access ID is the RDBMS ID with which PeopleSoft applications are ultimately connected to the database after the PeopleSoft system connects using the Connect ID and validates the User ID and password. An Access ID typically has administrator-level database access; that is, it has all the RDBMS privileges necessary to access and manipulate data for an entire PeopleSoft application. The Access ID should have SELECT, UPDATE, and DELETE access. It's important to understand that users do not know their corresponding Access ID. They just signon with their User ID and password andbehind the scenesthe system logs them onto the database using the Access ID. Should they try to access the database directly with a query tool using their User or Connect ID, they have limited access. User and Connect IDs only have access to the few PeopleSoft tables used during

Page: 35

signon, and that access is SELECT-level only. Furthermore, PeopleSoft encrypts all sensitive data that resides in those tables. What is the procedure to create a Permission List? Go to PeopleTools, Security, Permission & Roles, Permission List. On the Search page click Add New Value. In the Permission List edit box enter the Permission List name as xy. And click Add. Give the description if required and then click Save. Go to Web Libraries Tab include all the 27 libraries. Click Save. (Then we can enter into the browser environment). Go to any tab specify the required options then save. What is the Procedure to create a new Role?

Go PeopleTools, Security, Permission & Roles, Roles. On the Search page click Add New Value. In the Role Name edit box enter the Role name as xyz. And click Add. Give the description if required and then click Save. Go to Permission List Tab and specify the Permission list name as XY, then click Save. Go to any tab specify the required options then save.

What is the Procedure to create a new User Profiles? Go PeopleTools, Security, User Profiles, User Profiles. On the Search page click Add New Value. In the User Id edit box enter the User Profile name as xy. And click Add. In the General Tab specify the symbolic id as sa1. Go to Role Tab and specify the Role Name as xy. Then Save What is the Procedure to implementing Definition Security? Go, Definition Security in Application Designer. File, New Group (Here we can specify all the objects which we want give the permission to access the user). After creating new groups if we want to modify the group then go to File, Open, Group Then specify the Group Id. File, save (save the new group). File, Open, Permission List. Then specify the Permission List. Then assign groups to the permission list. Then Save. Close Application Designer and Definition Security. Reenter with the new user profile and observe all the things. What is Query Tree? PeopleSoft query uses a special type of tree, query tree that organizes record definitions into access groups. In the Query Security panel group, you specify which access groups an operator or operator class has access rights to. Users can only create or run queries on record definitions from access groups they have rights to. What is a Access Group? Access groups are nodes in a query tree, which are built with PeopleSoft Tree Manger. After we build a query tree, we give users access to one or more of its access groups. Then they can generate queries on any tables in the access groups accessible to them. When we open Query Manager, it displays either an access group structure or an alphabetical list of records to which we have access. Access groups enable us to logically organize the record components

Page: 36

to control security access within Query. It is not a physical representation of database. The record components shown are those that the user has been granted access to. Adding a Access Group: Open the desired Permission List and select Query, Access Groups Permissions. Select a Tree Name. Use the drop-down list boxes to find the Tree Name that we need. Select the highest Access Group that the user can access. Use the drop-down list boxes to find the Access Group. The system displays only the access groups in the selected query tree. The Access Group selected should be the highest-level tree group to which this Permission List needs access. The Accessible check box is selected by default. For example, users in the ALLPANLS permission list have access to all record components in the EIS_ACCESS_GRP and all access groups below it in the QUERY_TREE_EIS query treein other words, to all record components in the tree. Clear the Accessible check box, if desired. Save. What is a Process Group? Process groups are collections of Process Definitions that we create using PeopleSoft Process Scheduler. We add process groups to permission lists on the Process Group Permission page. Typically, we group Process Definitions according to work groups within our organization, and typically that work group would have a particular role associated with it. Regardless of how we organize our Process Definitions, we must assign process groups to a permission list. Users can run only those processes through Process Scheduler that belong to process groups assigned to their role. How to authorize the user to run a process or report? To authorize a user to run a process, the process group, which contains the process or report, should be added to the permission list of that user. What is a Process Profile? The process profile definition (defined in Process Scheduler) determines the default Process Scheduler settings for a user. For example, with the process profile, we specify such settings as where the system delivers the output of the process, whether the user can update the process request, and so on. What is Primary Permission List? Data permissions, or row-level security, appear either through a Primary Permissions List or a Row Security Permissions list. What is Object Security? Object / Definition Security is a separate People Tool that is used to restrict access of application developers. We use Definition Security to govern access to the individual database object definitions, such as Record definitions, Field definitions, and Page definitions. We use Definition Security to protect particular object definitions from being modified by certain developers. What is a Row Level Security? With row-level security, users can have access to a table without having access to all rows on that table. This type of security is typically applied to tables that hold sensitive data. People Soft applications implement row-level security by using a SQL view that joins the data table with an authorization table. How to implement row level security by operator id? You can design special types of sql views security views to control access to individual rows of data stored within your application database tables. peoplesoft applications are delivered with built-in row level security functions, tailored to the specific application.

Page: 37

What is operator class? Operator definitions - commonly referred to as operator Ids, or just operators - have associated pass words. Operator definitions are for each user in your system. An operator can be defined with its own set of system permissions and restrictions, or it can inherit this info from one or more class definitions to which it is linked. Class def have no user passwords associated with them; you can't use a class def to sign on to the system. Instead, u use classes to organize your users into groups with common access rights. Instead of setting up access rights for every operator, you can define just a few classes and link your users to them. What is the use of PeopleSoft Internet security? PeopleSoft Internet security controls the user access to shared hardware and software resources, So that only authorized users can connect to the web and application servers. This is also called Runtime Security. What is the use of Web server/Application server security? Web server/Application server security controls access to system objects and resources, So that only authorized users can connect to a given database. What is the use of Database security? Database security controls the access to database tables. What is the use of PeopleSoft application security?

At what level we can setup the PeopleSoft application security? User Level Row-Level Field-Level Object level. Tell about User Level security? By using the Maintain security PeopleTool we can establish the user security. Using the User Security we can controls the user access into PeopelSoft applications. How can we implement the Row-Level Security? What is the use of Row-Level Security? For this we dont have any PeopleTool. Row-Level Security is implemented by using the SQL Views. Using the Row-Level Security we can controls the rows of data that can be accessed by each user. How we implement the Field-Level security? What is the use of Field-Level security? By assigning the PeopleCode to the field. Like Hide Unhide, Gray, Ungray. Using the Field-Level security we can control the user access to specific data filed. How can we establish the Object security? By using the Definition Security PeopleTool. What is the purpose of the Definition Security? Using the Definition Security we can restrict particular objects from application developers. But not for the end users. How many objects we can develop using the Definition Security? Only one objects that is Group ID.

Page: 38

Can we run the Definition Security in Browser environment? No. it is applicable only in windows environment. What is the difference between Maintain security and Object Security (Definition)? By using the Maintain Security we can restricts the users to access the particular functions like some pages, some records, but using the Object security we restrict the total objects. Ex: if we don't want a developer to touch Application Engine programs, don't allow them to access Application Engine.

What is Batch Environment Security? or How do you give security to batch programs like SQR and A.E?

There are three levels of security for batch programs:


Each batch program has a run control that we define before we can run the batch program. The run controls are set up using PeopleSoft Process Scheduler Also using PeopleSoft Process Scheduler, you set up Process Groups, which are groups of batch processes. Then in PeopleTools Security you add Process Groups to a security profile. Users can run processes that belong to the Process Groups assigned to their security profile.

In your RDBMS environment, you can restrict off-line access to batch processes using the security tools described in your platform manuals. Note: You add the Process Profile Permission List directly to the User Profile, not to an intermediary Role. What is PeopleSoft Internet Architecture Security

The PeopleSoft Internet Architecture is in the category of PeopleSoft online security, also known as runtime security. Only authorized users can connect to the web and application server, and only authorized application servers can connect to a given database

Page: 39

COMPONENT INTERFACE
What is Component Interface? Component Interface is a peoplesoft object used to access PeopleSoft Component from external clients (Third Party Applications) including all business rules and data without going through the peoplesoft client. We use component interface to expose peoplesoft component (methods and properties) to the external software (ex vb,c,c++,java,com,dcom etc) What are the major elements in the Component Interface Architecture? There are three fundamental elements in the component interface architecture 1. Components 2. Component interfaces 3. Component interface API. What are the attributes of the Component Interface? 1. Component interface name. 2. Keys (get keys, create keys, and find keys). 3. Properties and collections (fields and records). 4. Methods. How many types of keys are there? Keys are 3 types 1. Get keys 2. Create keys 3. Find keys Get keys are nothing but search key of the component search record, We cannot change the get keys. Create keys are based on the add search record keys (add mode) and generated automatically for the component interface. We cannot change the create keys Find keys are based on search key and alternate search keys of the search record. We can remove find keys if we dont want to use. What is component interface properties? Properties: Properties are individual fields in component for component interface Properties are 2 types 1. Standard properties 2. User defined properties Standard properties exists for every component interfaces. What is Collections? Collections are referred as scrolls(level based controls will be having a primary record) in component for component interface. CreateKeyInfoCollection: Returns a set of items that describes the create keys. GetKeyInfoCollection: Returns a set of items that describes the get keys FindKeyInfoCollection: Returns a set of items that describes the find keys PropertyInfoCollection: Returns a set of items that describes properties.

Page: 40

What is Component Interface Methods? How many Methods are there? Methods are objects that perform a very specific function on a component interface at run-time. The event of a component interface is methods (like on execute for app-engine.) 2 types of methods are there 1. Standard methods User defined methods What are standard methods? Standard methods are those that are available for all component interfaces. Cancel, Create, Find, Get, Save. We can disable the standard methods, if we dont want that functionality by going to the CI properties dialog box. These standard methods provide basic functionality for any CI. User defined methods: 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. 1` Can we map more than one component at a time from the Component Interface? No. A component interface maps to one, and only one, PeopleSoft component. How can we access the component data? By internal (PeopleCode) and external (Java, C/C++, or COM) applications. Can we create the get keys and find keys manually? No. When we create a new component interface, get and find keys are created based on the search record definition for the underlying component. How many types of properties can include the Component Interface? Standard properties User-Defined Properties What are the standard properties? CreatekeyinfoCllection FindkeyinfoCllection PropertyInfoCllection GetHistoryItems (Update/Display mode or Correction mode) EditHistoryItems InteractiveMode StopOnFirstError. Traversing the Collections in the Component Interface? COLL_JOB Collection, Coll_JOBItm Row in the collection. &COLL_JOBCol = &CI_JOB_DATA.COLL_JOB; For &i = 1 to &COLL_JOBCol.Count &COLL_JOBItm = &COLL_JOBCol.Item (&i); &COLL_JOB_JRCol = &COLL_JOBItm.COLL_JOB_JR; For &J = 1 to &COLL_JOB_JRCol.Count

Page: 41

&COLL_JOB_JRItm = &COLL_JOB_JRCol.Item (&j); &COLL_JOB_JRItm.KEYPROP_EFFDT =; How do you login in correction mode in the Component Interface? Get History Items and Edit History items property to should be set to true. Get History Items alone: - Update display all - modes will be used. How do you provide security for the component interface? Open the Permission list On the Component Interface tab Add row and select the newly created Component Interface Edit the permissions to give permission for the standard methods Get, Create, Save, cancel, find. What the steps that you need to do in people code to invoke Component Interface? Establish a user section Get the component interface definition Populate the create keys Create an instance of the component interface Populate the required fields Save the component Interface. Why should we write in SavePostChange only, why not in other event? Because component interface object data will not be in component buffer and student information component data will not be in component buffer so we are updating/inserting the data in the data base not in the component buffer tables. Whenever we create a component interface ,we will give a name to CI to access.

What is Component Interface? Component Interface Architecture Component Interface Concepts Component Interface Definition Developing a Component Interface Determining Which Fields To Expose Standard & User Defined Properties Working with Keys Working with Collections Working with Methods Accessing CI Using PeopleCode
Security Using Maintain Security Component . Test the Component Interface . Difference from Components . Considerations New Component Interface How Keys Are Created Change in Component PeopleCode Event & Function Behavior

Page: 42

What is a Component Interface? A Component Interface is a PeopleTools object that exposes a PeopleSoft Component for synchronous access from another application. A Component Interface can be accessed from -> Microsoft COM -> C/C++ shared libraries -> Java -> PeopleCode Component Interface Architecture The overall component interface architecture includes more than just component interfaces themselves. They are Component Component Interface Component Interface API Every CI has the following main attributes Component Interface Name Keys Properties and collections Methods

Component Interface Concepts Component Interface Instance Object at runtime. Property Provide access to component data, settings and status Standard Properties Common across all CIs User-defined Properties Individual data items Collection Group of properties corresponding to a scroll

Page: 43

Key Properties containing values that uniquely identify an instance of a CI. Method Function that performs a specific task on a component interface at runtime. Standard Methods That are available on all CIs User defined Methods - That you can create to meet the requirements of an individual component interface.

Component Interface Definition

Developing a Component Interface Create the Component Interface Develop a component interface definition in Application Designer Enable Security Once the layout of the CI satisfies the requirement, add it to a Permission List Test it To do this, open the CI, then go to Tools > Test Component interface this will load a test program that will allow you to simulate using your CI. Determining Which Fields To Expose You can easily create component interface by dragging a record field or scroll from the component view into the component interface view. Considerations about levels. No Add mode on page. Invisible fields. Standard Properties

Page: 44

->Component Interface KeyInfoCollection Returns collection of items that describes the Create/Get/Find keys. PropertyInfoCollection Returns collection of items that describes the properties GetHistoryItems Determines whether the component interface runs in Update/Display mode or Correction mode. InteractiveMode Determines whether the component interface runs in Interactive mode or Deferred mode. StopOnFirstError First error will halt the execution. Standard Properties Component Interface Collection Count Returns the number of items in collection Data Item ItemNum Returns the position of the row in the collection User Defined Properties They are the specific record fields that you choose to expose to an external system with the component interface. You can Create a property by dragging the record fields from component to component interface. Delete them Rename By default properties are defined same as the record field name. Make them Read Only. Working with Keys GetKeys These keys automatically map to search key fields in the underlying component's search record. FindKeys Map to both search key fields and alternate search key fields in the underlying component's search record. CreateKeys Map to fields marked as Srch in the component's search record (or its add search record, if one is specified). Working With Collections When dragging a scroll into the component interface view, all "child" scrolls come with it. When dragging a scroll into the component interface view, all record fields contained within that scroll come with it. Keys that appear in parent and child scrolls are not added to child collections. When dragging a child scroll into the component interface view, parent collections are created automatically.

Working with Methods Standard Methods Cancel Create Find Get

Page: 45

Save GetPropertyByName (PropertyName) SetPropertyByName (PropertyName, PropertyValue) GetPropertyInfoByName (PropertyName) CopyRowset CopyRowsetDelta Data Collection Methods InsertItem (Index) DeleteItem (Index) Item (Index) ItemByKeys (Keys) CurrentItem CurrentItemNum GetEffectiveItem (Date, Seq) GetEffectiveItemNum (Date, Seq) User Defined Methods .Right-click anywhere in the component interface view, and select View pop-up menu. .Write the required PeopleCode functions. Accessing CI using PeopleCode When you want to access a component interface using PeopleCode, Application Designer will generate a template in the form of boilerplate PeopleCode that you can adapt to your purposes. Drag and drop the CI from the project into the PeopleCode editor which will generate the template. Example /* ===> This is a dynamically generated PeopleCode template to be used only as a helper to the application developer. You need to replace all references to '<*>' OR default values with references to PeopleCode variables and/or a Rec.Fields.*/ Local ApiObject &Session; Local ApiObject &ABS_HIST; Local ApiObject &ABSENCE_HISTCol; Local ApiObject &ABSENCE_HISTItm; Local ApiObject &PSMessages; Local string &ErrorText, &ErrorType; Local number &ErrorCount; Local boolean &Error; Function CheckErrorCodes() &PSMessages = &Session.PSMessages; &ErrorCount = &PSMessages.Count; For &i = 1 To &ErrorCount &ErrorText = &PSMessages.Item(&i).Text; &ErrorType = &PSMessages.Item(&i).Type; End-For; End-Function; /* Begin: Set Component Interface Properties */ /* ==> This Section is A Generic PeopleCode Template For Setting Field Properties. PeopleCode from the

Page: 46

This Section Must be Modified to Handle Application Specific Processing. Only Read/Write Field Properties are Written Out.*/ If Not &Error Then /* Set ABSENCE_HIST Collection Field Properties -- Parent: PS_ROOT Collection */ &ABSENCE_HISTCol = &ABS_HIST.ABSENCE_HIST; /* For &<*> = 1 to &ABSENCE_HISTCol.Count */ &ABSENCE_HISTItm = &ABSENCE_HISTCol.Item(<*>); &ABSENCE_HISTItm.ABSENCE_TYPE = <*>; /* End-For; */ /* Save Instance of Component Interface */ If Not &ABS_HIST.Save() Then CheckErrorCodes(); /* Application Specific Error Processing */ End-If; End-If; /* End: Set Component Interface Properties */ /* Cancel Instance of Component Interface */ &ABS_HIST.Cancel(); End-If; How can we access scroll level2 data by using collection in CI? Local ApiObject &Sess, &CI; &Sess=%Session; &CI=&Sess.GetCompIntfc(CompIntfc.CI_JOB_DATA); &CI.EmplID=K0MTX001; &CI.Get(); &L1=&CI.Coll_Job_Info; For &I=1 to &L1.Count &Item=&L1.Item(&I); &L2=&Item.Emp_Info; &Count=&L2.Count; For &J=1 to &Count &NewItem=&L2.Item(&J); If(&NewItem.EffDt<>%Date) then &L2.InsertItem(&Count); End-if; End-For; End-For; Security There are essentially two ways to secure component interfaces: Use Application Designer to mark individual properties "read only". Any property can be marked "read only" in the component interface design. Use Maintain Security to set security. Maintain Security addresses component interface security in the same manner that it addresses security for other PeopleTools objects. You can use it to control access to individual methods or entire component interfaces. Difference from Components There are a few key areas in which you ll see important differences between component interfaces and components. Saving a new row When using Create method, assign a value to at least one non-CreateKey property to ensure that the Save method properly validates the row data. WinMessage

Page: 47

Unavailable. Use MsgGet () instead. SendMail() Unavailable. Use TriggerBusinessEvent() instead. Scope Conflicts Infinite Processing Loops. A component interface should not call itself in any of the PeopleCode included within its component definition. Multiple Instances of a Component Interface. Because of potential memory conflicts, avoid creating multiple simultaneous instances of the same component interface

Page: 48

Interactive Mode 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 enough on some Unix servers to produce a connection failure. You can prevent this by setting the InteractiveMode property to False You should check the value of both the Save method and the collection ErrorPending property to discover all of the errors. Considerations New Component Interface Application Designer doesn't validate the component interface definition when you create it with the default properties, so you should make sure the definition is valid before attempting to use it. CreateKeys and Create Method are available only if component supports Add Mode. You cannot add any user-defined methods to the component interface until you have saved the component interface. How keys are created Component interface keys are based only on the search key fields and alternate search key fields designated as list box items in the search record of the underlying component. Each search key field produces a Getkey and a Findkey. Each search key field also produces a Createkey if the underlying component allows Add mode. Each alternate search key field produces a Findkey. PeopleCode Events & Function Behavior Search dialog processing - The first event to run is RowInit Page Activate PeopleCode Not triggered Menu PeopleCode and pop-up menus The events and function associated with them are not available Transfers between components, including modal transfers Not allowed. Dynamic tree controls Related functions can not be used ActiveX controls Not allowed DoSave() and DoSaveNow() Not supported. You should use CI Save() method instead. Change in Component Always validate the Component Interface if the underlying Component is modified.

Page: 49

APPLICATION ENGINE
What is Application Engine? Application Engine is a Development PeopleTool designed to create applications, these applications are useful to perform the background SQL process, means we can develop, test, and run background SQL processing programs. It is a set of SQL statements people code and program control actions defined in A.D that performs business process. What is the use of A.E program? We 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. PeopleSoft Application Engine does not generate SQL or PeopleCode it executes the SQL and PeopleCode that we include in an Application Engine action as part of our overall program. PeopleSoft Application Engine is designed for batch processing where we have a large amount of data that must be processed without user intervention. Ex: calculating the salaries in payroll processing What is the advantage of using Application Engine? The following are the advantages of using Application Engine. Encapsulation Unlike applications developed using COBOL or SQR, Application Engine applications reside completely within your database. With Application Engine, there are the programs to compile, no statements to store, and no need to directly interact with the operating environment in use. You can build, run and debug your applications without existing People Tools. Effective Dating Application sections are effective dated-meaning you can activate/deactivate a section as of a particular date. This enables you to archive sections as you modify them, instead of destroying them. In the future if you decide to revert to a previous incarnation of a section you can simply reactivate it. SQL / Meta-SQL Support In addition to writing your SQL within Application Engine, you can also copy SQL statements into Application Engine from SQL talk or any other SQL utility with few if any changes. RDBMS platforms have many differing syntax rules especially in regard to date, time and other numeric calculations. For the most part you can work around this problem using Meta-SQL which Application Engine supports. This language was created to handle different RDBMS SQL syntaxs by replacing them with a standard syntax, called Meta-strings. How many types of A.E programs are there? There are 5 types of A.E programs are there. 1. Standard, which is a normal entry-point program. 2. Upgrade only, which is used in PeopleSoft Upgrade utilities. 3. Import only, which is used by PeopleSoft Import utilities. 4. Daemon Only, a special type of program used as a daemon process. 5. Transform only, another special program type used to support XSLT. What is demon A.E program? PSDAEMON runs continuously when the Process Scheduler is running, and is intended for recurrent jobs. It polls the system checking for certain conditions to be true for events and when true, it schedules a process to handle the event. The most common usage of the PSDEMON is to check for files that have been loaded to the server and when found launch a process to import the file. The purpose of Daemon program is to poll the system for a condition and when the condition is true initiate a process. What is demon group? Once the demon programs are created they need to be defined in a Daemon Group. The Daemon Group contains all the daemon programs for one server. Daemon Group is attached to Process Scheduler Server and Daemon is enabled.

Page: 50

What is Transform program type? These types of programs enable different systems to communicate with one nother by transforming messages into appropriate formats. When we specify an Application Engine as a Transform Only program, we must specify an Action Type of XSLT. We can use transform programs to do any of the following: Apply a transformation to a message to make its structure comply with the target system's requirements. Perform a data translation on a message so its data is represented according to the target system's conventions. Determine whether to pass a message through to its target, by filtering it based on its content. Where will you use XSLT action? In Transform only program type we will use XSLT action. What are the other Tools, which are useful to execute the background SQL processing programs? 1. COBAL / SQL. 2. SQR Process. 3. Mass Change COBAL / SQL and SQR are belongs to 3rd party tools not belongs to PeopleSoft. Mass change is peopleTools. Why we are not using the Mass Change as background SQL Process for PeopleSoft Applications? The problem is there is no program logic. But the advantage is we can generate SQL, no need to write anything for this. What is the purpose of the Back Ground SQL Process? We can validate the data. We can move the data from one or more tables to one or more tables (Reporting Tables). We can update Database. What is meant by Scheduling processing? Processing the data without user involvement. What is the name of the Application Engine executable and what language is it written in? PSAE.exe and It is written in standard C++. And this file resides in c:\<PS_Home>\bin\Client\Winx86\PSAE.exe. Where are Application Engine programs stored? Application Engine programs are stored in the PeopleSoft database. Where can we create the Application Engine programs? In the Application Designer. What is the limitation to the Application Engine program name? 12 characters. Can we generate the SQL using the Application Engine? No. Application Engine does not generate SQL, it executes the SQL what we provide. We can generate the SQL by using the Query Tool. How can we make the database as platform independent? By using the meta-SQL in our programs.

Page: 51

How many types of components can include the Application Engine? Application Engine includes two distinct components: one is the "front-end" used to define batch program and the other is "back-end used to run the program what we developed. How many components include Application Engine Program? The Structure of the Application Engine Program? Program: An executable program must contain at least one Section, called MAIN. The execution of the program always starts from the MAIN section, and used to identify the starting point of the program. Sections: A Section is a set of ordered Steps. When a section is called, its steps are executed sequentially. The execution starts with the first step of the MAIN section and ends with the last step. We can call Sections (and other programs) from Steps within other Sections. We can put n number of sections in the program, but at least one section should be there, that is MAIN. Without MAIN section we can also develop Application Engine Program, but we can use this as an Application Library. They can't be executed directly because they have no MAIN Section. Steps: A Step is the smallest unit of work. We can use a Step to execute a PeopleCode command or log a message, execute a SQL statement or to call another Section. Every program begins by executing the first Step of the MAIN Section and ends after the last Step in the last Section completes successfully. We can specify the properties to the Section level and Step level. Actions: It contains the code we wish to execute. The primary type is a SQL statement. But we also have log messages, people code, call other section, and perform transformations. What should we get when we open a new Application Engine program? We can get only one section that is MAIN and Step01 (with no actions yet). What is the purpose of the Program? An Application Engine program identifies the set of processes to execute a given task. Can we change the name of the MAIN section? No, we cant. This is only one section we cant rename. Can we have A.E program without MAIN? No, What is an Application Library? Application Library is program that contains collection of callable sections. We cant run the Application Library as a standalone program. What are the properties of the Sections? Section name: We can specify the section name and the limitation is 8 characters. Description: We can write some description about the section. Market: Select the Market for which the section is intended. If a particular Market is irrelevant to your batch program, keep the default Market value of Global (GBL). Platform: In some cases, we may develop an application for some other RDBMS. For this we can specify the Platform name here only. Effective Date: We can make a particular section effective-dated and we can enter the effective date. The default effective date is 01/01/1900.

Page: 52

Effective Status: Specify whether a section is active or not. Active refers to being enabled at runtime. Inactive Sections are bypassed at runtime. Section Type: In the case of an abnormal termination of the program, the value of this system field specifies whether you must restart the section. Auto Commit: You can opt to have no commit or you can have Application Engine commit after the step successfully completes. Access: We can specify that a section can or cant be called from another program. If select this check box means we cant call this from other section. Otherwise we can call this form other section. Comments: We can add additional comments for this section. What are the parameters of the steps? Step Name : We can specify the Step name. Step Description : We can write some description about the Step. Commit After : We can determine when commit will be executed. Default: uses value supplied for the section. Later: dont commit now. After step: commit when step completes. Frequency: Only available in Loops. On Error: We can specify any one action to take when an error occurs. Abort: The program terminates and will write the message-to-message log. Ignore: It will write message-to-message log and continue. Suppress: no message will be written, but the program will continue. Comment: We can add additional comments for this Step. How can we view the comments of a particular section? By selecting View, Show all comments or by pressing F2 or Right click on a particular section in that select Show Comment. What is the sequence of execution of A.E. program? Do When Do while Do until Do Select SQL \ call section People Code Log Message At a time how many actions allows the Application Engine program? 7 actions. What are the mutually exclusive actions? SQL and Call Section are mutually exclusive. Why call section and SQL are mutually exclusive? Both SQL and call section is used to perform DML operations so we will use either SQL or call section. Can we put same action in one step? We can't put same action in one step. Can we have commits after every step? Yes we can have commit after every step.

Page: 53

What is the use of the Log Messages? A Log Message Action can be used to write a message to the MESSAGE_LOG based on a particular condition in the program. This gives your program multi-language capability. The Message Log refers to the People Tools table (PS_MESSAGE_LOG) where execution messages reside. Any substitution parameters are written to PS_MESSAGE_LOGPARM What is the purpose of the Do Select? Do Select is nothing but a For Loop and is used to populate state record values within the Application Engine program. Do select statement is a select statement that executes subsequent actions with in the step once for every row of data that is returned. What are the select types of the DO SELECT? 1. Select/fetch 2. Reselect 3. Restartable What is Select/fetch? Select and fetch opens the cursor to the database. Selects the first row that meets the sql condition in the Do Select. Executes the actions in the step (call section, sql, etc). Once the subsequent actions are completed the program returns to the open cursor from the Do Select, retrieves the next row and continues again with the rest of the actions. What is Reselect? Reselect opens a cursor to the database. Selects the first row that meets the sql condition in Do Select. Closes the cursor. Executes the following Actions in the step (Call Section, sql, etc) Once the subsequent Actions are completed the program returns to the sql in the do select and opens a cursor again. What is Restartable? It will act like select and fetch but the only difference is we will use this with restart option. What is the purpose of the Do While? It is a SELECT statement that runs before subsequent actions of the step. The subsequent actions within the step are executed in a loop as long as the SELECT statement returns at least one row for the Do while action. Do While is nothing but a While Loop. What is the purpose of the DO until? 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. Do Until is nothing but a Repeat Loop. What is the purpose of the Do When? The Do When action is a SELECT statement that allows subsequent actions to be executed if any rows of data are returned. This is the first executable statement with in the step. Do when is nothing but an If Loop. It contains SQL that tests for a condition. If the condition is true then it returns a row of data, and it executes the subsequent actions within the step. If the condition is false then no row of data returned and it terminates the entire step. If there are no more steps to execute, the program will end. What is the purpose of the SQL action? SQL Statements are used to perform the DDL, DML, and DCL operations. Majority cases we are using the DML commands (UPDATE, DELETE, INSERT, SELECT).

Page: 54

What is the use of the Call Section? Call Section is used to call one section from another section. The "called" Section can be in the same program as the calling Section, or it can be in an external program. If a Section already exists in one program, rather than copying it into another program, just call it. What is the use of people code action in A.E program? People code provides reusing common faction libraries of A.E program. And used to build dynamic SQL performs simple if /then/else edits set defaults and perform other tasks that dont required trip to the database. What is difference between Do select and SQL? The Do Select action is a SELECT statement that executes subsequent actions once for every row of data that the Do Select returns. It works like a FOR loop. It returns a row. Do Select is a test condition. Where as SQL executes DML and Meta SQL. What is difference between call section action and dynamic call check box? Call Section is used to call one section from another section. The "called" Section can be in the same program as the calling Section, or it can be in an external program. If a Section already exists in one program, rather than copying it into another program, just call it. Use the AE_APPLID and AE_SECTION fields in the state record to execute different sections depending on the conditions a program encounters during runtime. These two fields must be defined on the default state record for the program. If AE_APPLID is not present or is blank (at run time), the current program is substituted for the AE_APPLID value. If AE_SECTION is not present or is blank, an error occurs. When issuing a dynamic call, both the section and the Program ID must be dynamically set. You enable a dynamic call by first having your program store different section names in the AE_SECTION field, and different program names in AE_APPLID field. The values you insert in these fields are normally based on various conditions met within your program. You then create a Call Section action that calls the section name defined in the State record field by selecting the Dynamic check box. Selecting dynamic automatically populates the AE_SECTION field with the symbolic value %Section, and the Program ID field with the symbolic value %AEAPPLID. At runtime, the program calls the section name stored in AE_SECTION that belongs to the program name defined by AE_APPLID. How to move the selected section from AE to get migrated?

Page: 55

How can we filter some particular sections? Select View > Section Filtering > Custom. Then specify the market type (ex: GBR) and click OK. So that we can get only some section which are belongs to the GBR market type. To disable this option select View > Section Filtering > No Filtering. How many levels of actions support the Application Engine program? Application Engine supports up to 99 levels of nested Call Section Actions. For example, the first called Section can call a second, which can call a third, and so on, up to 99 calls. How to use the property On Return in PeopleCode Action?

With a PeopleCode action, there is only one property that you can specifyOn Return. Use the On Return value to determine how your Application Engine program reacts based on the return of your PeopleCode program. The OnReturn setting takes effect if your PeopleCode program issues a return 1 or exit 1. You can use the True keyword in place of a non-zero numeric return. When you specify the OnReturn property, you choose from the following values: Abort The program issues an error and exits immediately. Break The program exits the current step and section, and control returns to the calling step. The program exits the current step, and continues processing at the next step in the Skip section. If this is the last step in the section, the calling step resumes control of the Step processing.

Page: 56

STATE RECORD Can we have more than one state record in single A.E? Yes we can have more than one state record in A.E but one should be the default state record. What is a Cache Record? The Cache record (or cache) is a physical People soft record, keyed by process instance that must be created and maintained by the Application Engine developer. This record defines the fields that an application uses to pas values from one SQL statements to another. You retrieve cache field values by the Application Engine and BIND function; you assign cache values using & SELECT. Tell me what you know about state record? State records are used to assign variables for Application Engine program. State Record used as a worktable. Key field is Process_instance. It can be a derived work record or SQL table. No people code fires on AE state record. To restart facility we put the Process_instance field. How will u pass variable from one A.E. to another A.E. program? Through state record. What is the purpose of the State Record? To pass the variables for the Application Engine program. What is the other name to the State Record? Cache record. How many state records can be associated with an Application Engine program? An Application Engine program may have zero, one, or many state records. Only one state record will be the default. Where do we associate a state record with an Application Engine program? Program Properties. Who creates the State Record in the Application Engine program? The State Record must be created and maintained by the Application Engine developer. What type of record is a state record? Can be a Physical record (SQL table) or a derived work record. If it is Physical table we should build before using this. What is the extension to the state record? _AET. Then only the system identifies the record as a state record. How many rows we can have in state record? We will have one row in state record. But in case if multiple A.E programs use same state record as default state record then there will be multiple rows in state record. i.e. one row for each record. What field is used as the key field on a state record? PROCESS_INSTANCE. Why we are using the PROCESS_INSTANCE as a key field in the state record? For restart facility. What Meta SQL is used to retrieve values form a state record? %BIND.

Page: 57

What Meta SQL is used to store values into a state record? %SELECT. Can we specify the Date type field as a required field? No, we can specify only character and numeric fields as required fields. Is people code fires on A.E sate record? No PeoplCode fires on an Application Engine state record. Differences between State and temporary records? 1. State record at any point of time has only single line information, as it's driven by the Process_Instance a skey field. While temp table can have multiple rows. 2. State record had only single instance, while the temp table can have maximum of 99 instance. 3. State record is used for restart logic. 4. State record can be used for dynamically calling AE section, by adding AE_SECTION, AE_APPLID as fields. Temp table can not be used.

PROPERTIES OF THE APPLICATION ENGINE PROGRAM How can we access the properties of the Application Engine Programs? If we want to view and modify the properties of an Application Engine program open it in the Application Designer, select File > Object Properties while the program is open and press the Properties button. We can also press ALT+ENTER. Then it displays the Program Properties Dialog Box, and it consists of 4 controls. 1. General 2. State Records 3. Temp Tables 4. Advanced 1.General: Description: Used to enter a descriptive name. In this edit box we can enter up to 30-character only. Comments: Used to enter the comments about the program. Or add any other useful comments that development or administrative staff may need to see. Owner ID: Used to enter the Owner ID for the program. Owner ID is a way to identify which objects are owned by which PeopleSoft products, such as General Ledger, Accounts Receivables, and so on. The values in the dropdown list are Translate table values associated with the OBJECTOWNERID field. This field is entirely optional. 2. State Records: Qualify Search: By default, the Record List box will contain all record names that end with the extension AET. We can also specify the state record name. Get List: Press this button, to populate the Record List box. Record List: This text box contains the results of the State Record search. Selected: This group box is where we select State Records for use with a particular program. Use the Add button to include selected records that appear in the Record List. Use the Remove button

Page: 58

to exclude selected records that appear in the selected list box. Indicate which State Record will act as the default State Record by selecting its checkbox. For the default State Record, we only need to reference fieldnames in the PeopleCode and SQL (for the active program). When we reference a non-default State Record, we do so by using recname.fieldname. 3. Temporary Tables: Qualify Search: This edit box is useful to enter any wild card characters or complete table names to limit the results that will appear in the Record List. By default, the Record List box only will contain records that are of type "Temporary Table". This is an attribute applied at the time you create the Record in Application Designer. Get List: Press this button, to populate the Record List box. Record List: This text box contains the results of the Temp Table search. Selected: This group box is where you select temporary tables for use with a particular program. Use the Add button to include selected records that appear in the Record list. Use the Remove button to exclude selected records that appear in the selected list box. Instance Count: The Instance Count value controls the number of physical tables to be created for each dedicated table for this program during the SQL Build procedure in Application Designer. Typically, you would set this number to equal the number of parallel program runs that you anticipate. For instance if you expect up to five instances of the same program to run simultaneously, then you would set the Instance Count to 5. Insert Selected List into Project: If the active Application Engine program definition belongs to a Project, then you can opt to include the dedicated temporary tables for this program within the same project. Runtime: When you are implementing dedicated temporary tables, you must consider how your program should behave in the event the number of active processes exceeds the number of dedicated temporary table instances. Do you want the program to abort, or do you want it to use the base table (PS_recname with no suffix), which is a non-dedicated table. The Runtime options enable you to control how an Application Engine program behaves in the event that an instance of its specified dedicated temporary tables is not available. If you select Continue, then Application Engine uses the base version, or undedicated version, of the temporary tables. If you select Abort, then the program exits with a meaningful error message. 4. Advanced: Disable Restart: Application Engine has built-in restart capabilities. In many cases, we will want to have Restart enabled. To disable restart for a particular program, select DisableRestart. Application Library: Most Application Engine programs are defined to be executable. An executable program has a main entry point in its definition: the Section MAIN. This defines the entry point so whatever method we choose to invoke the program, such as command line or Process Scheduler, can initiate the program. However, in some cases, we may want a program to only contain a collection, or "library," of common routines (in the form of "callable" Sections) that we do not want to run as a standalone program. When sections are defined as "Public," other

Page: 59

programs can call the Sections, or routines, that exist in the "library" at runtime. Because this type of Program is not designed to run as a stand-alone program, it does not require the MAIN Section, or initial entry point. Setting the Application Library option renames or removes any existing MAIN Section. Note: Application Libraries are the appropriate spot to store a collection of shared Application Engine program Sections. It is not intended to store a specific SQL Action with in a Section. To share common SQL, use the SQL repository. Upgrade Only: This option is for programs intended to be used for upgrade purposes only. PeopleSoft delivers some Application Engine programs for upgrade-only uses. Unless you are responsible for the upgrade procedure at your site, you won't need to deal with these programs. These programs are documented specifically within the Upgrade documentation accompanying your shipment. Message Set. Specify the message set value that you want assigned as the default message set number for this Application Engine program. The system uses this Message Set value for all Log Message Actions where the message set isn't specified.
EXECUTION OF A.E PROGRAM

Difference between online and batch execution:


Online Execution Started by CallAppEngine from PeopleCode. Batch Execution Started through PeopleSoft Process Scheduler. Programs run for longer amounts of time, asynchronously, and at scheduled times. Can be designed for parallel execution for performance. Uses the Batch/Dedicated Temporary Table pool.

Program runs quickly, synchronously, and at random times. Potential for simultaneous execution.

Uses the Online Temporary Table pool.

How many ways we can execute A.E program? Batch Using PeopleSoft Process Scheduler Online Using PeopleCode Manual Using the Command Line Batch Using PeopleSoft Process Scheduler This is the most typical mode of execution. You invoke programs that run in this mode using PeopleSoft Process Scheduler or the Application Engine Process Request Page. Batch mode is also referred to as asynchronous execution meaning that it runs independently in the background. PeopleSoft Application Engine runs on any operating system that PeopleSoft supports as an application server. To run Application Engine programs on the batch server, you must install Tuxedo. This applies to both UNIX and Windows NT batch servers. If you run your batch server on the same server machine as your application server, then the application server and the batch server can share one Tuxedo install. If your

Page: 60

batch server is separate from your application server, then you must install the Tuxedo CD-ROM to your batch server. Online Using PeopleCode Application Engine programs that execute online typically get executed from a page with the CallAppEngine PeopleCode function. Such online processes are synchronous meaning that subsequent processes wait on the results. For instance, a page may be "frozen" until the online process returns the necessary results. With CallAppEngine there are no COMMITs issued. There is an asynchronous online PeopleCode option, ProcessRequest. With ProcessRequest, COMMITs are allowed. Manual Using the Command Line Usually, you use this technique only during testing or if you need to manually restart the program. In this section, we discuss how to: Most Application Engine programs are scheduled to run using the Process Scheduler. In 4 ways we can execute A.E program, they are Use Process Scheduler to start Application Engine batch programs. Use the Application Engine Process Request page. Use PeopleCode to call an Application Engine program. Use the command line to invoke an Application Engine program

1. Running From within the Application Engine For this we have RUN PROGRAM icon on the Application Engine Tool bar. Create new record (ID, Name, and Salary). Save (EMP_TBL) and Build. Create page, component, and menu. Register the component. Create new Application Engine Program, insert SQL action and write INSERT INTO PS_EMP_TBL (ID, NAME, SALARY) VAULES (100, NUTAN, 20000); Click on RUN Button. 2. Through PeopleCode To run through peoplecode we should create a push button on a page. When we click the push button, Filed change PeopleCode is triggered and associated PeopleCode will be executed. Create new record (ID, Name, and Salary), then save (EMP_TBL) and build. Write PeopleCode (Salary field and Field Change Event) CALLAPPENGINE (EMP_AE); Create new page, insert record fields (ID, Name, and Salary). And insert a push button. Then double click on the push button and specify the record name and field name. Then click on label tab and select any image ID. Click OK. Create component and menu. Create new Application Engine program. Insert SQL Action. INSERT INTO EMP_TBL (ID, NAME, SALARY) VALUES (100, NUTAN, 30000); Save the program with EMP_AE. Open the component click the Push Button. Then observe the results. 3. Running From PeopleSoft Process Scheduler. Create one record (ID, Name, salary). Create Page and Component and Menu. Register the Component. Save the record with EMP_TBL. Create new Application Engine object, insert SQL action, Then write the SQL, INSET INTO PS_EMP_TBL (ID, NAME, SALARY) VALUES (100, NUTAN, 50000); then save the program with EMP_AE. Open Browser environment PeopleTools > Application Engine > Request AE then click on add new value then enter User ID and Run control ID and Program name. SAVE. Go to Process Scheduler > Process, Click on Add New value, then enter the Process type as Application

Page: 61

Engine and Process name (Program name). Go to the Process Definition Options tab; specify the server name and Component name as AE request and Process Group. Again go to the request AE (PeopleTools, Application Engine, and Request AE). Open the process which we created. Then click on RUN button. Go to the Process Monitor click on Refresh. 1. Running From Command Line For this we should create .BAT file. Open any notepad file, write C:\PT8.42\bin\server\WINX86\PSAE -CD <database name> -CO <userID> -CP <User Password> -R <Run Control ID> -AI <Program Name> Then save the file with .BAT extension. Run Time Parameters for END-USER: 1. -CT: Database Platform 2. -CD: Database Name 3. -CO: User ID 4. -CP: User Password 5. -R: Run Control ID 6. -AI: Program Name 7. _I: Instance Number Run Time Parameters for Developers: 1. -TRACE n: Generate AE Trace File 2. -DEBUG a: Invoke Online AE Debugger 3. -CONVERT: Convert to release 7 to 8 What is the function used to call A.E program through people code? CallAppEngine function In which events of people code we can write CallAppEngine function? You need to include the CallAppEngine PeopleCode function within events that allow database updates. This includes the following PeopleCode events: 1. SavePreChange (Record) 2. SavePostChange (Page) 3. Workflow 4. Subscription (Message) 5. FieldChange Diff between online A.E program and batch job? Online A.E program is executed from a page with the call app engine people code function. In this process the page, which is calling from Online will be frozen until the process returns any results. No commits are issued until the program complets. Batch process is the typical mode of execution, in this mode programs are run using process scheduler or A.E request page.

DEBUGGING A A.E PROGRAM


Why we need the Debugging concept? After completion of the program successfully, due to some problems the output is not what we expected, the problem may be the network, hardware, system software, database, procedures or application software, So that we need to find the mistake. That means we have to debug the program.

Page: 62

Where can we view the failure details of the program? Process Monitor. Application Engine supports what type of Debugging Tools? 1. Process Monitor 2. Application Engine Trace file (In the Configuration Manager) 3. Application Engine Interactive Debugger 4. PeopleCode Debugger. How can we access the Application Engine Interactive Debugger? Set the Debug check box on, in the Process Scheduler folder tab in the Configuration Manager. Open the Configuration Manager. First click on the Trace tab and turn off the statement timings. Click on the profile tab. Click on the Edit push button. On the Process Scheduler page, we will find the Application Engine options. Select the Debug check box. Click the OK to save the new configuration. When we use A.E Interactive Debugger? It can be used while running on the client or when running directly on the server out side of the process scheduler. How can we access the Debug Commands? After specifying the Debug option in the Configuration Manger, Run any program then we will see the DOS communication window, then type a ? And press ENTER. Then it displays all the debugging commands. How can we set A.E Trace file? For process running on a windows workstation, we can set trace option in configuration manager. In configuration manager > Trace tab > A.E Trace will be there in that we can set trace. What do the A.E Trace file shows you? A.E Trace will show the steps and sql issued in the order and complete information. In addition it shows execution timings. How can you debug A.E program form command line argument and other? PSAE.EXE CT <DB_TYPE> -CD <DB_NAME> -CO <OPRID> -CP <RUN_CONTROL> -AI <PROGRAM_NAME> -I <PROCESS_INSTANCE> What errors you got when you are running A.E program? If your Peoplecode Action is having SendMail() which cause some error, then what will happen? Start PeopleSoft How do you debug an A.E program? You can set the Debug option in the following locations: Start PeopleSoft Configuration Manager and select the Process Scheduler tab. In the Application Engine group, enable Debug by selecting the Debug check box. This is the method that applies to all methods of invocation. If you used the command line option to invoke your Application Engine program, then you can just include the DEBUG Y parameter in the command line you submit to PSAE.EXE. If you already <PASSWORD> -R

Page: 63

have the Debug check box selected in PeopleSoft Configuration Manager, then you do not need to include the DEBUG parameter in your command line. If you have PeopleCode in your Application Engine program, you should also enable the PeopleCode Debugger. When you launch your program and the PeopleCode Action executes, you will enter the PeopleCode Debugger at that point.

Note. Setting the debug capabilities in either PeopleSoft Configuration Manager or the command line will turn debug mode on. The only situation where this is not true is when you have Debug enabled in Configuration Manager and you explicitly submit DEBUG N on the command line. In this case, the PeopleSoft Configuration Manager setting defines your "default" command line value, and the command line can override the default. How do you enable the PeopleCode Debugger for Application Engine? 1. Sign on to PeopleTools using the same User ID that you are going to use to invoke the Application Engine program. 2. Open PeopleSoft Application Designer. 3. Select Debug, PeopleCode Debugger Mode. 4. 5. Your Application Engine program can be open on the desktop, but you do not need to open the Application Engine program or the PeopleCode action that you want to debug. 6. Select Debug, Break at Start. 7. This causes the Application Engine program to break prior to executing any PeopleCode programs within it.

Temporary Tables in AE
What is temporary table and instances? Temporary table is buffer allocation, which consists of row and columns. Application Engine programs run in batch mode, multiple instances of the same program often execute in parallel processing. 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. Instances determine the number of temp tables to be created. Temp tables are mainly used for Parrellel processing. Also you take the data you want for manipulation into your Temp table, and you can play with that. Finally when you get the desired data, you can update the main tables. Difference between online and batch job Temporary table instances? Application Engine programs are designed for two types of execution and each has its own pool of Temporary Tables Online: Invoked by CallAppEngine from People code Run quickly, synchronously, and at random times. Potential for simultaneous executions Uses the online Temporary Table pool. Not restart able. Psae.exe randomly assigns an instance number from the number range on your online temp tables. If the instance number is in use psae.exe puts the program in Queue until the assigned instance becomes free.

Page: 64

Unlock on completion, on Crash free from Manage Abends. Batch: Invoked through the Process Scheduler. Run for longer amounts of time, asynchronously, and at scheduled times. Can be designed for parallel execution for performance. Uses the Batch/Dedicated Temporary table. Restart able. It allocates instance number based on the availability on a record by record basis and psae.exe begins with the lowest instance numbers. If the properties are set continue - Base table is used with Process instance as key. If Re-starable Locked across Restarts until completes successfully. If not Re-startable on Program completion. What is work record? Its a temp table used to store temporary values. Difference between _Tmp and _Tao? For on line process we will use _tmp and for batch process we will use _tao How you assign the temp tables to A.E program? Open a.e program >program properities>temp tables Select the table you want Click ok Save the program Open app designer Open the record Build the record Save What is A.E run control record? A.E Run control record stores the values of A.E program parameters. What is restart facility? The restart facility is used to restart the A.E program where it was stopped. What you need to do for making restart facility in A.E program? At least one state record needs to be physical record as the data will be available in case of abend. We have to select the restart check box in A.E program properties. In configuration manager select the process scheduler tab and uncheck the disable restart. How you improve performance of A.E. Program? By using temp tables we can improve performance. By using traces and reusing options. Avoid using SQL execution logic in a people code action. Instead use the logic in do conditions. Bulk insert option can speed up your program with in a loop. Define the following Meta sqls %Bind: Used for retrieve data from the state record %Select: Inserting values in to state record %Table: For referencing a table across multiple databases %Truncate: To delete the temporary table

Page: 65

%DateIn: Where dt is either a Date value or a date literal in YYYY-MM-DD format, expands into platformspecific 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 %DateOut: Where dt is a date column, expands to a platform-specific SQL substring representing dt in the SELECT clause of an SQL query. %Mode: Gives the correct user action Mode, like add/update %Execute edit: Enables People Soft Application Engine to support data dictionary edits in batch %Join: Expands the join dynamically while executing this Meta sql What is the max no of temp table instances can be created? The system creates a maximum of 99 temporary table instances only, even if the sum exceeds 99 for a particular temporary table. The naming convention for the temporary table instances is as follows. Where nn is a number between 1 and 99, as in PS_TEST_TMP23. What is parallel processing? The ability for multiple instances of the same program to run simultaneously is called parallel or concurrent processing. What is set processing? 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. Advantages of Set Processing? Improved Performance: - Our internal testing has revealed that, in an overwhelming majority of cases, set processing performs significantly better than it is -by-row counterpart for reasonable batch processing volumes. Minimized SQL Overhead: - It tends to use fewer Application Engine SQL statements that each processed more data than the statements executed in row-by-row processing. Easy Maintenance: - if need to make a fix or add an enhancement to SQL, its just a matter of modifying the SQL or inserting the new Chunk. Leveraging the RDBMS: - With Set based processing, you take advantage of the SQL processing engine on the database rather than placing the processing burden and overhead on the application executable. Example for Row by Row processing query declare A cursor for select dept_id from department where profit > 50000; open A; fetch A into p_dept_id while sql_status == OK update personnel set salary = (salary+1000) where dept_id = p_dept_id; fetch A into p_dept_id; end while; close A; free A;

Page: 66

Example for set processing query update personnel set salary = (salary + 1000) where exists (select 'X' from department where profit > 50000 and personnel.dept_id = department.dept_id) What is bulk insert? Inserting buffering rows into database. PeopleSoft Application Engine offers this non-standard SQL enhancement on the following databases: Oracle, Microsoft SQLServer, and DB2. This feature is named Bulk Insert. For those database platforms that do not support bulk insert, this flag is ignored. You should consider using this feature only when the INSERT SQL is called multiple times in the absence of intervening COMMITs When used in conjunction with statements like INSERT INTO tablename (field1, field2...) VALUES (%BIND(ref1), %BIND(ref2), Bulk Insert offers the most powerful degree of performance enhancements related to ReUse. This option turns on ReUse, and, in addition, it holds all the data in a buffer and performs an insert only after a large volume of rows has gathered in the buffer. The number of rows allowed to gather in the buffer depends on your database platform. Keep in mind that storing data in the buffers is applicable only if you've selected Bulk Insert and the SQL is an INSERT statement. For statements other than INSERT/...VALUES, the Bulk Insert option is ignored. This option is only applicable if the sql in our sql action contains a sql insert Where we have to set options for disable and enable restart facility? There are three places that we can enable or disable restart Check box on the Program Properties dialog box Check box in the Configuration Manager Profile To disable, include the option DR Y to the command line of PSAE.EXE (or delete to enable restart) If in any of these three places you've disabled restart, then restart is disabled. To enable or disable restart in Program Properties dialog box: 1. Select File, Definition Properties or click the Properties button. 2. Select the Advanced tab and select or clear the Disable Restart check box appropriately. 3. If you are developing programs and are ready to test but don't want a restart condition to get in the way, you could leave the Disable Restart check box clear in the Program Properties. Then, you could have the Disable Restart check box on the Configuration Manager selected, or if you are invoking your program from the command line, you could have the Restart flag enabled. This allows you to test new development and avoid errors about forcing you to restart during your testing. At the same time it prevents you from inadvertently leaving Disable Restart selected in the Program Properties when you moved the program into production. To enable or disable restart in PeopleSoft Configuration Manager: 1. Start Configuration Manager. Select the Profile tab and click the Edit button. 2. Select the Process Scheduler tab and select or clear the Disable Restart check box appropriately. What we have to do for restart facility? Program level: One state record should be sql table. On the advanced tab in the program properties dialog box make sure that disable restart is not checked

Page: 67

In configuration manager make sure that disable restart is not selected on the process schedular tab Section level: The options for Section Type should be Prepare Only and Critical Updates. If the section is only preparing data as selecting it populating temporary tables or updating temporary tables the section type should be prepare only. If the section is updating permanent application tables in the database we should select critical updates. Step Level: We need to have some conditions that reduce the answer set returned by the doselect Add and order by clause: %select field1 select field1 from ps_some_record where field1>%bind(field1) order by field1 Add a switch to the selected table Select column1, column2 From ps_table1 Where processing_switch = N Delete processed rows. How can we validate application engine data? What is the syntax for reading and writing a file from people code action? The following example opens an existing Unicode file for reading: &MYFILE.Open(&SOMENAME, "E", "U"); If &MYFILE.IsOpen Then while &MYFILE.ReadLine(&SOMESTRING) /* Process the contents of each &SOMESTRING */ End-While; &MYFILE.Close(); End-If; The following example opens a numbered file for writing in ANSI format, without overwriting any existing files: &MYFILE.Open("C:\temp\item*.txt", "N", %FilePath_Absolute); If &MYFILE.IsOpen Then &MYFILE.WriteLine("Some text."); &MYFILE.Close(); End-If; How can we call a section dynamically in app engine? Use the AE_APPLID and AE_SECTION fields in the state record to execute different sections depending on the conditions a program encounters during runtime. These two fields must be defined on the default state record for the program. If AE_APPLID is not present or is blank (at run time), the current program is substituted for the AE_APPLID value. If AE_SECTION is not present or is blank, an error occurs. When issuing a dynamic call, both the section and the Program ID must be dynamically set. You enable a dynamic call by first having your program store different section names in the AE_SECTION field, and different program names in AE_APPLID field. The values you insert in these fields are normally based on various conditions met within your program. You then create a Call Section action that calls the section name defined in the State record field by selecting the Dynamic check box.

Page: 68

Selecting dynamic automatically populates the AE_SECTION field with the symbolic value %Section, and the Program ID field with the symbolic value %AEAPPLID. At runtime, the program calls the section name stored in AE_SECTION that belongs to the program name defined by AE_APPLID. What is an Application Engine? Application Engine is a development tool that allows you to develop programs that execute SQL against your data in a procedural and dynamic structure. The key word in the previous statement is "SQL. Despite Application Engine's richer functionality, its primary purpose is still to run SQL against your data. In other words, Application Engine is not intended to execute programs that include only PeopleCode Actions. Disabling Restart There are certain conditions for which you may want to disable Restart For row-by-row processing. You don't want the overhead involved with Application Engine performing a checkpoint during the program run. You're committing after N iterations of a looping construct within a Step, and the SELECT statement driving the loop is composed in such a way that if the program abended and then started again, it would ignore transactions that were already processed in the previous program run. In this sense, the program handles the restart internally in that Application Engine treats each start of a program as a "fresh" start instead of restarting a previous instance.

Restartable Application Engine By default, Application Engine doesn't perform a COMMIT until an entire program successfully completes. It's up to program developers to set any individual Commits where appropriate. At the Section level, you can choose to Commit after each Step in that Section. At the Step level, you can require or defer COMMITs for individual Steps, or you can increase the COMMIT frequency within a Step to n iterations of a looping action within a Step, such as a Do Select or Do While. PS_AERUNCONTROL - record where last commit point stored. Keyed by PROCESS_INSTANCE. Commonly Used Meta SQLs %Bind

Page: 69

The Application Engine function, %Bind, is used to retrieve a field value from a State Record. The %Bind function can be used anywhere in a SQL statement. %BIND([recordname.]fieldname[,NOQUOTES][,NOWRAP][,STATIC]) %Select A %SELECT is required at the beginning of any and all SELECT statements. It identifies the State Record fields to hold the values returned by the corresponding SELECT statement. %SELECT(statefield1[, statefield2]...[, statefieldN]) SELECT field1[, field2]...[, fieldN] %SelectInit It is identical to %SELECT barring the following exception. If the SELECT returns no rows, %SelectInit reinitializes the buffers. In the case of a %SELECT and no rows are returned, the State Record fields retain their previous values %SQL Use the %SQL function for common SQL fragments that you have already defined and want to reuse, substituting additional values dynamically. SQLid is the name of a SQL definition created using either Application Designer or the StoreSQL function. %SQL (SQLid [, paramlist]) Performance Improvement One of the key performance features of Application Engine is the ability to "re-use" SQL statements. ReUse (SQL Action Property) Unless you select the ReUse property for you SQL Action, %BIND fields are substituted with literal values in the SQL statement. This means that the database has to recompile the statement every time it is executed. However, selecting ReUse converts any %BIND fields into real bind variables (:1, :2, and so on), allowing Application Engine to compile the statement once, dedicate a cursor, and re-execute it with new data multiple times. This reduction in compile time can bring dramatic improvements to performance. Bulk Insert (SQL Action Property) By buffering rows to be inserted, some databases can get a considerable performance boost. It should only be considered when the INSERT SQL is called multiple times in the absence of intervening COMMITs IF, THEN Logic (using PeopleCode) Instead of using Do When, we can use PeopleCode to simulate IF/THEN logic. Eg. If StateRec.Field1 = 'N Exit(1); Else Exit(0); End-if; Set Processing Set processing is a SQL technique used to process groups, or sets, of rows at one time rather than processing each row individually. Eg : UPDATE EmployeeTable SET Salary = Salary + 0.25 WHERE SalaryType = 'HOURLY' Trace Options Application Engine Trace TRACEAE = 255. Traces every SQL in the App Engine and shows the buffer values. TRACEAE = 128. Only shows the timing codes for each statement. Useful for checking performance.

Page: 70

PeopleCode Trace TRACEPC = 108. This option is useful when setting trace for all PeopleCode in the Application Engine. Using Process Scheduler Append in Parameter List -TRACE 255 -TOOLSTRACEPC 108

BEN_DEFN_PGM BEN_DEFN_PLAN BEN_DEFN_OPTN BEN_DEFN_COST BENEF_PLAN_TBL BEN_PROG_PARTIC DEPENDENT_BENEF

Page: 71

SQR What is SQR? Features of SQR? *SQR (Structured Query Reports) is a programming language used in data processing and data reporting. SQR program can execute multiple queries.* Features: 0. More flexible 0. Scalability for Client and Server architecture. 0. Multiple platform portability 0. Multiple RDBMS portability What are the sections and paragraphs available? There are five sections and three paragraphs available in SQR programming. The sections include a. Begin-setup End-setup. b. Begin-program End-program. c. Begin-procedure End-procedure. d. Begin-heading End-heading. e. Begin-footing End-footing And the paragraphs include Begin-select paragraph. Begin-SQL paragraph. Begin-document paragraph Is it possible to increase the array size once defined? No, it is not possible to increase the Array size once defined What is Load-lookup? Give the Syntax for Load-Lookup? The LOAD-LOOKUP command defines an array containing a set of keys and values and loads it into memory. With LOAD-LOOKUP, you can reduce the number of tables that are joined in one SELECT. Use this command in conjunction with one or more LOOKUP commands. Syntax: begin-setup load-lookup name=prods table=products key=product_code return_value=description Where =condition end-setup Can you Call a SQR from another SQR? How? We can call one SQR program from another SQR program using Call.callsystem. But this is possible only in UNIX Operating system. Briefly explain Most commonly used SQCs in SQR programs? Some of the most commonly used SQCs are 1.STDAPI.sqc : This Is Process Scheduler Interface which is used to initiate and terminate some field values such as Process_instance & Run_cntl_id 2.SETENV.sqc : This is used to set the Default Environment based on the Database such Printer Type, Paper Size,Date formats Etc.

Page: 72

3.NUMBER.sqc : This file contains generalized routines to format numbers. 4.DATETIME.sqc : This file contains generalized routines to format dates and times. 6.RESET.sqc : This is an important Footing SQc. What are the commands used in filehandling of sqr? Using File Handling we can Import. Steps are 1. Opening a File Using OPEN FOR-READING command. 1. Reading Data From File Using READ command. Writing Data into Table Using BEGIN-SQL paragraph & INSERT command

What is difference between .LIS and .SPF file? . LIS (list file) is used for line printer execution. Normally it is used for printing cheques. .SPF file is portable format, this is used for all window-based applications with any printer. Normally it is used for MSPAINT, Image, and Graphics. How many types of SQR files are there? There are 5 types of SQR files. 5. SQC: SQC program files contain commonly included procedures that are called by other SQR programs. 5. . LIS when an SQR reports generate output it is sent to a file with an. LIS extension. 5. . LOG: SQR.LOG file is the output file used by People soft. This file contains all information such as errors and displays statements. That is output to the terminal during the execution of SQR. 5. . MAX: SQR does not dynamically allocate memory. The default program allocations (which were coded for lower DOS memory) usually have to be increased for complex SQR programs. Note: People soft uses a .MAX file to increase any SQR parameter where default is not adequate for the program. There is one main .MAX file for processing under SQR W (windows) called ALLMAXES.MAX 5. SQT: These program files are precompiled SQR programs. As a People soft 5+ there are no delivered precompiled SQR programs. 10. Explain briefly about flags? The SQR command supports several flags. Each flag begins with a dash (-). Flags with arguments must be followed directly by the argument with no intervening space. SQR Command-Line Flags Flag Description -A Causes the report output to be appended to an existing file of the user name -Bnn (Oracle,SYBASE CT-Lib) indicates how many rows to buffer each time data is retrieved from the database. The default is 10 rows. -C Specifies that the cancel dialog box appear while the program. -CB (Callable SQR) forces the communication box to be used. -DEBUG (xxx) (Sybase) Causes lines preceded by #DEBUG to be compared. Without this flag, these lines are ignored. -E(file) Causes error messages to be directed to the named file, or to the default file report errs. If no errors occur, no file is created. -F (file) (Directory) overrides the default output file name program .lis -KEEP In addition to .LIS files, creates an .SPF file for each report that your program generates. - LOCK(RR]CS]RO]RL]XX] (SQL Base) Defines the types of locking (isolation level for the session.

Page: 73

-NR (SQL Base) specifies that the No Recovery mode is used when connecting to the database. -XCB Do not use the communication box. -XL Prevents SQR from logging on to the database. Programs run in this mode cannot contain any SQL statements. -XMB Disables the error message display so that a program can be run without interruption by error message boxes. -XP (SYBASE DB-Lib) Prevents SQR from creating temporary stored procedures. -XTB Preserves the trailing blanks in an LIS file. -ZIV Invokes the SPF viewer after generating program .spf file. Using this flag implicitly invokes the KEEP flag to create program .spf file. -ZMF(File) specifies the full path and name of the SQR Error Message file. The Sqr err.dat located in the directory indicated by the SQR DIR environment Variable is the default.

Page: 74

What are On-break parameters? ON-BREAK causes the specified action to perform in a tabular report when the value of a field changes. The default action prints the field only when its value changes (PRINT=CHANGE).Mainly used for Redundancy of Printing on a page. How can you Debug SQR programs? We can Debug SQR using Debugging Commands such as 2. #IF DEBUGxxx #END-IF 2. DISPLAY and 3. SHOW What is the difference between sqr and sqc? SQR SQC 1.This is nothing but the Actual 1.This is like a function in SQR. Source program. 2.This consists of Program Section. 2.This does not consists of program Section. 3.This can be Compiled & Executed. 3.This cannot be Compiled and Executed. 4.We cannot call one SQR from 4.We can call one SQC from another SQC or another SQR or SQC. SQR program. What are different types of variables in sqr? Types of variables in SQR are 1. Column Variables. 2. List Variables. 3. System Variables. 4. Document Variables. 5. Substitution Variables. User Defined Variables Is there any read-only variable in sqr? Column Variables & System Variables are Read-Only Variables. How to pass Inputs for sqr program while running from windows? Using ASK & INPUT Commands. How to pass Inputs to the SQR while running through the Process Scheduler? Using Procedures & SQCs to access data on Run Control Page (Run Control Fields). What is the purpose of Stdapi.sqc This is a Process Scheduler Interface sqc which is used to initiate and terminate some field values such as Process_instance & Run_cntl_id What is the SQT file? What are the advantages of SQT files? SQT file is nothing but resultant file after the compilation (i.e.) Runtime File. By using this SQT file for Execution we can increase the Performance of the program by reduciong the Compilation Time. What is the SQC used to read data from translate table? READXLAT.sqc is the SQC used to read data from Translate Table. Which section is mandatory in an SQR program? BEGIN-PROGRAM Section is Mandatory for an SQR program. How will you display an image in SQR? Using DECLARE-IMAGE , END-DECLARE command.

Page: 75

What is use of SETENV.SQC? This is used to set the Default Environment based on the Database such Printer Type, Paper Size, Date formats Etc. How will you perform ERROR handling in SQR? We can do Error handling in SQR using some command line flags such as O, -L,-ZMF,-XMB and using Error handling commands such as ON-ERROR = Skip/Warn/Stop (for Compile time errors) ON-ERROR = Procedure Name (for execution stage errors). How many ways of performance tuning are there in SQR? 1. Using LOADF-LOOKUP & LOOKUP. 2. Using ARRAYS. 3. Using MULTIPE REPORTS. 4. Using SQT Files. 5. Using Bnn Command line Flag. 6. Running on BATCH SERVER. 7. Using Proper Programming Logic in SQR such as Using BREAK statement in EVALUATE Command. 8. Proper SQL tuning such as using Sub queries instead of Joins. Can you call procedure in oracle from Sqr? How? To call a database procedure using Begin-select paragraph, the syntax is as follows: Begin-select [(report arguments)] from Dual End-select To call from Begin-sql, the syntax will be Begin-SQL ;; End-SQL Can you connect more than one database using one Sqr? How? Yes. What are the differences between Load lookup and Array ARRAYS LOAD-LOOKUP 1. Arrays can be declared in any section. 1. Load-Lookup is declared in only in SETUP section only. 2. Number of rows are not automatically 2. Numbers of rows are automatically added. gives a error if the number of added. Exceeds the specified number. 3. We should insert data in to Array by 3. Rows are automatically inserted in to programming. Load-Lookup. 4.We can retrive any number of fields. 4.We can retrive only Two fields from from a table. a table. 5.We have Length & Data type. 5.We dont have Length & Data type. 6.We cannot directly print from Array. 6.We can directly print from Load-Lookup. What are the steps required to run the SQR from peoplesoft environment? Three steps we have to fallow to run the SQR program from the peoplesoft environment (Process Scheduler). These steps include a. Making the SQR program API aware by calling two procedures (stdapi-init, stdapi-term) from the Beginprogram section and including the Stdapi.sqc in the bottom of the program.

Page: 76

b. Create new run control table or using existing run control table and creating run control page, component and register the component. Creating new run control SQC if we create a new run control table. c. Giving the permission to the user by giving process groups. How to pass command line flags to a sqr report running through process scheduler? Using override options in the process definition in the Process Scheduler in the People Tools. What are On-break parameters? ON-BREAK causes the specified action to perform in a tabular report when the value of a field changes . The default action prints the field only when its value changes (PRINT=CHANGE).Mainly used for Redundancy of Printing on a page. How does peoplesoft Process monitor knows that the process (Say sqr report) is at what stage such as initiated, in process, completed etc From the Field Value of RUNSTATUSDESCRfield from PS_PMN_PRCSLIST table. How can u Debugging SQR programs? We can Debug SQR using Debugging Commands such as 3. #IF DEBUGxxx #END-IF 2. DISPLAY and 3. SHOW How to refer a global variable in local procedure? After special character (ex.#,&) we use underscore(_) after that variable name. What is -Bnn flag? This is used to specify the number of rows that are to be taken from Dbase to the Buffer because default the system takes 10 rows at a time. What is -Tnn flag? This is mainly used for testing purpose. We can restrict the system to generate only a specific number of pages instead of generating all pages for testing. This is used in Windows Environment. What is -RS & -RT Flags? RS is used to generate SPF file ie; stopping the program after the comilation. _RT is used to run the SPF file .This is also one kind of Performance increasing technique by saving the compilation time. What are the sections in Sqr? Which one is necessary? Setup, Heading, Footing, Program & Procedure Sections. Program section is the Mandatory section. What is -debug command line flag? This is used for Debugging in SQR. How to place an corporate logo in sqr? Using Declare Image command What are the debugging commands in sqr? Show & Display are debugging commands What is the difference between them? Show is used to display more than one variable at a time. Display is used to display only one variable at a time.

Page: 77

What is difference between .LIS and .SPF file? . LIS (list file) is used for line printer execution. Normally it is used for printing cheques. .SPF file is portable format, this is used for all window-based applications with any printer. Normally it is used for MSPAINT, Image, and Graphic Performance tuning in SQR can be done using the following 1.Load-lookup cmd 2. Arrays 3.Multiple Reports 4.-Bnn flag 5.By running SQR progrm on server 6.By running SQT files

Page: 78

Você também pode gostar