The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Monday, 1 December 2014

Controlling Component Save Processing

I was recently working upon an issue where the PeopleCode changes bring upon the Save Warning message and which goes into loop even if the component is saved. I was researching on various options to turn off the Save Warning. I found a couple of methods and properties which controls or depends on the component save flag. Thought of documenting everything together so that people having similar issue could read the related methods and properties in a single place.

Before I go ahead, I may have to explain how the Save Warning is issued for a component. Whenever a component is loaded, the Component Processer holds a flag value which will store whether the component is changed or not. This flag is set whenever the user changes the value of a field on the online page or when the value of a field is changed via PeopleCode logic. Having this flag value, whenever user attempts to navigate away from the component, the Component Processor will check this flag and if its value is set then a Save Warning is issued otherwise it logs out of the component. The value of this particular flag is reset after every insert into the database (after Save Pre Change) which will prevent the warning when the user has already saved the component. However a code in your Save Post Change could set the flag again.
Now let us discuss about some of the functions and properties which could be potentially helpful in tackling the Save Warning issues in PeopleSoft.

ComponentChanged() – This function will return a Boolean value based on if the component was changed after last save. You could use this function to determine the component level flag value which we discussed earlier and based on that you could write your logic.

If ComponentChanged() Then
Rem Write your logic here;
WinMessage(“Your Message Text”,0);

SetComponentChanged() – You can use this function to set the component level flag programmatically. Sometimes it may be required that even if the user has not changed any value on the page, when he/she clicks a button on the page the system needs to do the save processing. This is the function which could help you do this. This will initiate the Save Warning or Save Processing even if nothing has changed in the component.

Rem Initiate Save Processing;

SetSaveWarningFilter() – Use this function to supress the Save Warning irrespective of whether the component level flag is set or not. If you use this function the component processor will ignore the component level flag value and let the user to navigate away from the component without issuing any Save Warning. This function takes a Boolean value as argument. Passing True will direct the component processor to ignore the flag whereas passing an argument of False will make the component behave in its normal way.

REM changing the field value of DESCR;
&myRec.DESCR.Value = “My Description”;
REM Now the system will not issue Save Warning to the User;
REM To bring back the warning call the same function with parameter False;

Set Component Changed (Page Field Property) – Sometimes, for certain fields, even if the user changes some value on the online page we may not require to initiate the Save Processing or issue the Save Warning. This page field level property comes handy in those scenarios.

Set Component Changed property of page field

This property can be found in the Use tab of the page field property. This will determine if the component flag needs to be set when the user changes the value of the field. This property determines the behavior only for user intervention and does not govern the PeopleCode changes.

Disable Saving Page (Component property) – If the entire purpose of the component you have designed is to just display information or to act as an intermediate component, then you can use this property to avoid the Save warning. This property can be found on the Use tab of the component.

Disable Saving Page component property

Checking this field will hide the save button from the component and will suppress the save warning. If you want to permanently suppress the Save Warning for the entire component this is the best option to choose as it provides the mechanism to achieve the objective with minimal impact.

IsChanged Property – This property is available for the objects Field, Record and Row. This property will return a Boolean value indicating whether the object has changed or not. This property will be helpful in doing some special processing for which you need to dynamically know which object has changed.

Local Number &I;
&I = 1;
Rem Loop through the record to find out the changed field;
For &I = 1 To &myRecord.FieldCount
If &myRecord.GetField(&i).IsChanged Then
Rem Custom Logic;

SetComponentChanged (Property) – This property is read-write and is available in both Field and Rowset Level. Setting this value to True indicates the component processor that any change to the Field/Rowset using a PeopleCode will set the component save flag and the Save Warning needs to be issued. A value of False will not set the component changed flag when the Field/Rowset value is changed using a PeopleCode. The example provided below will illustrate the use of the property where a value of a field is changed programmatically without requiring/ initiating a Save Warning.

REM Change the field DESCR without requiring a user Save;
&myRec.DESCR.SetComponentChanged = False;
&myRec.DESCR.Value = “New Description”;
REM Re-set the property so that a change to the field made by the user prompts a save;
&myRec.DESCR.SetComponentChanged = True;

Tuesday, 15 July 2014

People Tools 8.54 is available with lot more capabilities

People Tools 8.54 is now generally available for the customers. Oracle has released its landmark release of People Tools (version 8.54) on 11th July 2014.

With the release 8.54, PeopleSoft is bringing in fluid UI capabilities which could render on any devices and specifically targeted for mobile devices. There are many improvements and capabilities in reporting features available with the newest release.

For new implementation the tools 8.54 is ready to use and for upgrade customers, they may have to wait until patch 02 is available.

Apart from the major fluid UI capability, PeopleSoft has brought up improvements in the below mentioned functional areas.
Branding Framework
Activity Guides
Related Content/Actions
Introduced Global Temporary Tables
Materialized Views
Meta SQLs
PS Query
Pivot Grids
BI Publisher
Application Designer Capabilities

To see what has improved over your current version of People Tools, visit Oracles Cumulative Feature Overview site.

Watch interview with Willie Suh, Vice President of PeopleTools Development, for more information on fluid UI.

Tuesday, 17 June 2014

Currency Control Fields in PeopleSoft

People working in Financials or Money related modules in PeopleSoft might come across situations where they need to format the amounts to the format which is more common to the transaction currency used. This might seem to be a simple task if you are always working in same currency say USD. The amounts can be formatted using PeopleCode or other methods to display in the format which is required for your client (eg. 98.53 USD). But the situation become little complicated if you are working for a firm where the PeopleSoft is implemented globally and you have many multi currency transactions. In that case, formatting the field using PeopleCode for each and every currency using an IF or Evaluate logic will become pretty cumbersome.

PeopleSoft has provided a much simpler mechanism to do the same without writing any PeopleCode. This is called as currency control field.
Currency Control Field in PeopleSoft
Fig 1. Record Field Properties - Currency Control Field

This property can be found on the record field property. To make this work, you should be having a field which stores the currency code (usually CURRENCY_CD field) in the same record and the multicurrency option set in the application level. Once you have the field and options set, just mention the field name which contains the currency code in the Currency Control Field option in the record field property. Setting this option will automatically take care of the currency symbol, decimal digits and the scale of the number field. This helps you avoid a lot many PeopleCode. I know this is an obvious fact for those working in financials, but may be of a lot more help to the newbie’s.

As I mentioned earlier, you might need a field in the record which contains the currency code for the corresponding amount. What if you don’t have that field and you are arriving at the amount dynamically. PeopleSoft has again extended a little bit of help in this regard with a built in function called RoundCurrencyRoundCurrency function will return the amount with decimal precision formatted to the currency code passed. The syntax of the function is as shown below.
RoundCurrency(amount,currency code,effective date);

/* The below example will return the currency in AUD format effective today. */
/* Instead of hard coding the currency, you can pass dynamic values in real scenarios. */

LEDGER.AMOUNT.Value = RoundCurrency(AP_AMOUNTS_WRK.AMOUNT.Value,”AUD”,%Date);

Sunday, 23 March 2014

What is an HGrid in PeopleSoft?

HGrid is one of the less talked about and most useful feature in PeopleSoft page designs. HGrid stands for Hierarchical Grid. Some may even interpret it as horizontal grids. HGrids can introduce hierarchy or horizontality in PeopleSoft grids. These kind of grids are often very useful in presenting roll up values and child values for a specific item in the same grid.

HGrid is no different than the normal PeopleSoft grid except it provides a roll up/ expansion feature within the same grid. The same is true with the designing of HGrid as well. To create an HGrid, all you need to do is to create a normal PeopleSoft grid, add a HTML field to the grid (which performs the expansion/collision) and then import the delivered packages to configure the grid.

A typical HGrid in PeopleSoft will look as below.
PeopleSoft HGrid
PeopleSoft HGrid

There are many delivered methods which will do all the fancy jobs like cut, copy, paste, expand all, collapse all, move up/right/down/left etc… In PeopleSoft FSCM, there is a delivered work record POOL_HGRID_WRK which can be added to the page for designing these fancy buttons. You can even have your own work records with necessary fields to perform these actions.

While designing your HGrid, you should be having a physical table to store the hierarchy (level) information of the HGrid, for this you might have to introduce two fields to capture the level number and the row number of any particular row. There is also a delivered sub record (HGRID_LEVEL_SBR) which can be used to capture the level details of the rows. Once you have the Table/View ready, all you have to do is to configure the HGrid package. In PeopleSoft FSCM or HCM databses you could find out a delivered application package name HGRID which contains the business logic for the Hgrid. You could extent or use the application class to create your own HGrids.

The main properties which you would need to configure will be as below.


DisplayOnly: Specify whether the grid is read only or editable
CreateLevelSeqNumHierarchy: Specify whether the level sequencing is handled manually or not
HGridRowRefNumFieldName: Field which carries the row number
HGridRowRefNumRecordName: Record which carries the row number
AssignRefNum: Specify whether the row number is generated automatically or not
HGridLevelFieldName: Field which stores the level information
HGridLevelRecordName: Record which contains the level field
HGridLevelSeqNumRecordName : Record which contains the detail level fields

Grid Properties

HGridRowSelRecordName: Record Used for selection indicator
HGridRowSelFieldName: Field Used for selection indicator
HGridDescrRecordName: Record which contain the actual description field
HGridDescrFieldName: Actual description field
HGridDescrDisplayRecordName: Record which is used to display the decription as HTML
HGridDescrDisplayFieldName: Field which is used to display the description as HTML
DescrChangeControlFieldName: Control field to handle the description (will be invisible)
DescrChangeControlRecordName: Record which contains the control field
DescrChangeControlPageFieldName:  The page field name of the control field

Control Properties

ExpCollControlFieldName: The control field to expand/collapse the hierarchy (invisible)
ExpCollControlRecordName: Record which contains the control field
ExpCollControlPageFieldName: Page field name of the field
ExpCollFlagFieldName: Field which stores the expansion/collapse information
ExpCollFlagRecordName: Record which contains the above field
DisplayWBSColumn: Specify whether you need to add bullet points for the hierarchy
WBSFieldName: Field which contains the bullet information
WBSRecordName: Record which contains the above field

Having done the above, you are 90% done with the HGrid design and configuration. All the rest you need to do is to invoke the appropriate methods from the appropriate events.

If you have your own requirements of manipulating the data based on rolling up/down, then you may have to create your own methods and extend the delivered one. For all the basic functionality the delivered ones should be working fine.

When you design a HGrid, consider all the facts including the data set, data model, real requirement and then come to a conclusion of designing an HGrid. A wrong design might take a toll on the performance of the application.

Saturday, 22 March 2014

Adjusting Timeout and Auto saving of PeopleSoft page

I was working on a requirement where for some particular self service pages which are exposed to the public, I need to extend the time out of that particular component alone as there are many data entry fields and it is obvious that the user will be taking more time to fill out the form. While working for the same, another requirement came in picture from the users that, the page needs to be saved after particular time frame.

Obviously the first thing which came to mind is tweaking of delivered javascript libraries, however it is going to be a customization and will be having a global impact. So thought of having a custom javascript for the particular page alone. There are many scripts available over the net to tweak the time out or to do an auto save functionality.

However I came across a simpler article which provides the script to do both the functionality, tweaking timeout as well as autosaving. I thought it will be worth sharing it over here so the readers could also make benefit of it.

The script is coded to make a save after specified time and then do a time out again after the same time frame. You could tweak the script to achieve the timeout immediately after the save or some other way based on your requirement.

Thursday, 20 February 2014

Change Control for PeopleSoft Developers

If you are working in a large PeopleSoft development team and if you and your team members are working on same area or objects it is very obvious that you might have encountered scenarios where the changes of one developer overwrites the changes of other developer. It is a very frequent scenario and always results in finding root cause of missing changes and the re-writing the original changes. There is a sort of control provided by PeopleSoft to control this scenario to an extent. I’m not sure whether every organization is aware of this or if they are utilizing this feature. This post is primarily targeted for those who are not aware of this.

The mechanism provided by PeopleSoft to avoid overwriting of the changes is called Change Control in PeopleSoft. This needs to be setup by the PeopleSoft Administrator of your team.

To activate this feature, the admin needs to log in to the app designer and select the Administrator item available in the Tools menu.

Tools > Change Control > Administrator

Select the Use Change Control Locking to enable the change control for the development database. If you want to audit the changes made to each object in application designer, then you may have to enable the Use Change Control History option as well.

Once this option is enabled for your database, in order to work on any object in the application designer, developers has to lock the object definition first. Once an object definition is locked by a developer, no other developer will be able to modify/edit that particular object unless the first developer finishes his work and unlocks the same object. There by the locking will make sure that no other developer will be modifying the same object at the same time you are working on it. So once you save your changes, you can be sure that no other person will be overwriting your changes. Once you unlock the object definition and the second person locks it for editing, the second person will be getting a local cache of the object which contains the changes added by the first person (So no app designer cache issueJ).

There are two popular ways to lock an object definition in PeopleSoft. The first method is to add the object to the project and under the Development tab of the project sidebar, right click the object definition. You will get an option to lock the object. The Unlock option will be enabled once the object is locked and vice versa.

The second method is to open the object in application designer and check the tool bars menu, you will get an icon to lock the object, unlock the object and to see the change history (if enabled by the admin).

Click the first icon (locked) to lock the open object, second icon (Unlocked) to unlock the open object, third icon (comment) to add a comment to the change history and the fourth icon (code) to see the revision history of the open object.

Whenever you use change control for development, ensure that each developer has a unique id to log in to app designer. I believe most of the organizations have a unique id for developer, but there are cases where individual developers do not have a PeopleSoft id and every one in a team logs in using a common developer id. If you are using a common developer id, then the change control is of no use.

Once you a developer is done with the editing, make sure that you unlock the object so that the next person could start on working on the same object.

Tuesday, 21 January 2014

PeopleSoft Feature 9.2 Pack Release (PUM Image 4)

Shortly after the bigger release of PeopleSoft 9.2, now Oracle has come up with the first value addition with its Feature Pack release. Feature Pack is an older concept and now everything done through Images. The new features are now released with PeopleSoft 9.2 image 4. PeopleSoft 9.2 customers can now go and upgrade to the latest release of 9.2 by using Make Me Current option with the PeopleSoft 9.2 Image# 4. Now with the help of PeopleSoft Update Manager, customers can even select and apply only the features required by them.

From the FSCM side, PeopleSoft has introduced many new features including but not limited to, Mobile Approvals and Transactions, eMail Approvals, Real Time Bottom Line system for use with inMemory machines, Project Discovey applications with Endecca for use with Oracle Exalogic systems, New additions to WorkCenters and more Search capabilities. Human Capital Management systems has released greater integrations with the Taleo systems.

To get the full list of features released with image 4, existing PeopleSoft customers can download the release value proposition from this link.

Monday, 6 January 2014

Finding components where a particular field is used

As a part of impact analysis while doing any major development work in PeopleSoft, often you may have to search for definition references of fields and other objects.  The Find In will bring out list of all the pages where the field might be used. Now to find out the component list where these pages are used, you may have to end up doing the Find In for each and every page. Sometimes if the referenced pages are more, it will become a tiring work. I want to share a simple SQL which could reduce most of your work if you are looking for component references for a field.

Again, the SQL provided here is a simple one and for example purpose. However you could explore more on the system tables and come up with such simpler and time saving SQL’s. If you already do have some, keep sharing the same in the comments section.

SELECT nvl(b.pnlgrpname,'Not added in any component.') AS Component,
  a.pnlname         AS Page,
  a.pnlfldid        AS FieldId
FROM pspnlfield a,
  pspnlgroup b
WHERE a.recname = 'RECORD_NAME'
AND a.fieldname = 'FIELD_NAME'

AND a.pnlname   = b.pnlname(+);