PeopleSoft - Change Access ID Password

To Change the Access ID password, possible methods are listed below:

There are ONLY 3 ways to do this. These options MUST be done in 2 tier and your application servers, Process Schedulers, and Web Servers MUST BE DOWN and ALL users need to be logged off if possible.

METHOD # 1 - (Preferred Method) Log into Data Mover as the Access ID (Bootstrap mode).

Then run this command:

CHANGE_ACCESS_PASSWORD sa1 (This is your symbolic ID) cloud123 (This is the new password for the Access ID);

And hit the Green traffic light.

NOTE - This method does NOT work in PT 8.14 or 8.15, but is now fixed in PT 8.16 (T-JPELAY-AU4QW) so use method 2 or method 3. You MUST also make sure that the password for the Access ID has successfully been changed at the Database level because prior to PT 8.17 this method would not change the database level password. To do this go through your SQL tool (SQL Plus, Query Analyzer) and make the change in the database users table.

METHOD # 2 - (Second best method) You need to change the Access ID Password at database level then log into Data Mover in bootstrap mode and run:

update PSACCESSPRFL set ACCESSID = 'what your Access ID is' , ACCESSPSWD = 'your New Access Password' , ENCRYPTED = 0, where SYMBOLICID = 'whatever the SYMBOLICID is';

Then run


Note: If you have more than 45,000 rows in the PSOPRDEFN table then you may not be able to run the ENCRYPT_PASSWORD *; command in Data Mover. In that case just logon as a valid user in 2 tier and that will encrypt the Access ID in the PSACCESSPRFL table.

This will synch up the PSACCESSPRFL table with the same password stored at the database level for your Access ID.

METHOD # 3 - (Last and most discouraged method) Go into Application Designer / Tools / Miscellaneous Objects / Access Profiles.

Highlight the Symbolic ID and push the Edit button, enter the old password, new password, and confirm new password.

If you change it in Application Designer it does not change at the database level. This is because we do not GRANT to the database in PT 8. You MUST also make sure that the password for the Access ID has successfully been changed at the DB level. To do this go through your SQL tool (SQL Plus, Query Analyzer) and make the change in the database users table.


PS Query Permissions/Security in Peoplesoft

PS Query Permissions/Security

In Peoplesoft we cannot give access to any query directly like we provide it for components. user should have access to all the records in the query to access a particulary or use that record to create a query. Permission to the records needs to be provided first.

Private queries are visible to only those users who has created that query. query needs to be created as public for other users to access (given that they have access to all the records used in the query). security/permission to records are provide through query security tree and access groups.

In Query Tab of the Permission list set of query permission are present.

1) Access Group permission

2) Query Profile

Access group permission: This contains the list of the Access groups (nodes) in a particular query tree (it contain records that can be accessed) that a permission list has access.
Provide tree name and query access group here to get access to all records under query access group in this tree.

Tree Name and the Access group name needs to be entered.

Query Profile:
1)PeopleSoft Query
2)PeopleSoft Query Output
3) Advanced SQL Options

properties under each of these sections are set.
This defines what user can basically do with PS query.

PeopleTools > Security > Permission > Roles Permission Lists

Managing the query security tree

Query trees are accessible in Query Access group manager and not under the Tree manager.

PeopleTools > Security > Query Security > Query Access Group Manager.

Different trees for different category. Eg:- HR, BEFEFITS_ADMIN (contains BEFEFIT related records).

Each Leaf in the Tree corresponds to one record in this query tree.

Record is not Visible in PS Query ?

Add this record in the tree under the access group to which your primary permission list has access. (Query access group component)


Add the access to your Tree and access group in which this record is present.


HTML Procedures in SQR

Creating HTML output from SQR


To use the HTML procedures listed below, your program must reference the HTML procedures.

Issue the following two commands at the start of your program:



do html_on


The file is located in the SAMPLE (or SAMPLEW) directory.  Use the command-line flag -I to indicate this location.


There are 6 types of HTML procedure that can be used to easily create HTML o/p files.


General Purpose Procedures

Heading Procedures

Highlighting Procedures

Hypertext Link Procedures

List Procedures

Table Procedures



1) Html_br


Produces the specified number of line breaks in a paragraph using the HTML<BR> tag.

This causes the paragraph to be continued onto the next line.


Syntax: html_br(number count, string attributes)


count    = the number of HTML <BR> tags that are inserted.

            Attributes          =          the HTML attributes that are incorporated inside the HTML <BR> tag.


Example: Producing a line break:

            Print 'Here is some text' ()

            Do html_br (3,'')

            Print 'Here is some three lines down' ()


2) Inserts an image using the HTML <IMG> tag. This can also be done using the command PRINT-IMAGE;

However, the procedure html_img provides the ability to specify the full set of available HTML attributes.


Syntax:             html_img (string attributes)


Attributes          =          the HTML attributes that are incorporated inside the HTML <IMG> tag.


Some common attributes:


Src       =          URL of the image to be inserted (Ex:  src=/images/abc.gif)

Height =            height of the image in pixels (Ex:  height=200)

Width   =           width of the image in pixels (Ex:  width=400)


Example:          Producing an image:


Do html_img('src="/images/stop.gif"')


-Posted by

Ganesh A.M



SQL Best Practices in 20 mins

SQL Best Practices in 20 mins

-Ganesh A.M


Field Default event in Peoplesoft

Field default event Peoplecode in Peoplesoft

The People code in this event is used to initialize the default values for the fields in the component.

What happens when the field has default value defined in the record field properties and has People code assign the different value in the Field default people?

The Field default event People code will only fired when there is not default value defined for that field in the record field properties, so the value assigned in the record field properties will be initialized to that field.

-Ganesh A.M


Common Query Access Issues

Common Query Access Issues


a) User cannot see a table they wish to query from in query manage

   User does not have access to the table via one of their Access Group. Double-Click that they have the Proper Access group on one of their Permission lists an ad the table to an Access group if necessary.


b) A user cannot see a public query from search screen in either query manager or query viewer.

     Once you have determined that the query does in fact exist, and I s indeed a public query, then the user probably does not have access to all the tables being used in the query. If a user does not have access to all the tables involved in a query, the search screen itself will filter out the query, so that it does not even appear in the list. Double-Check that they have the proper Access group on one of their permission lists and add the table to an Access group if necessary.


Posted by

-Ganesh A.M



Row Level Security in Peoplesoft HRMS

Row Level Security in Peoplesoft HRMS


The Default department security is name DEPT_SECURITY and the SetID is the share, although you may choose to create one to operate with a different Setid, depending on your environment.


Root level on this tree represents your company or organization. Below that you are adding departments in a hierarchical manner until you have built on organizational char of your company’s department structure.


When you click the link on one of department levels to either insert a child or a sibling node, you will be allowed to either choose an existing department that has been created or to create a new department on the fly by clicking Add.


Tie date Permission lists to Your Trees


Define Business Rules - > Administer HR systems -> Use -> Maintain Row level Security


1)       Select a Permission list – It needs to created in the maintain security menu.

2)       Peoplesoft standard is to generally preface them with DP

3)       In the Data security profile page, you need to add the Departments that this permission list will have access to.

4)       You need to provide SetID for the Department Security Tree you are using and then enter the DeptID for the node you are choosing.

5)       Department Security Tree is hierarchical, that by adding an access to a department, you are automatically granting access to all the departments below that node as well.

If you need to exclude the data from a particular ‘Sub-Department’ you will have need to add that department separately to this list, and choose ‘No Access’ as the Acess code instead of the default of ‘Read/Write’.


Change the security Basis for the System


The final step to implement Row level security in HR is to change all the search views controlling which data is accessed on various pages. Luckily you don’t have to change it manually change each one, as Peoplesoft has delivered a process that takes care of it all for you. Please note that you only run this Process when turning on Department security System-Wide, Or when removing it from the system.


Define Business Rules -> Define General options - > Process - > Change Row Security Basis.


You need to choose option for Department security, to turn Department security on, or the Option of ‘None’, to turn Department security off.


-Posted by

Ganesh A.M



Application Designer - Change Control

To enable change control in the Application Designer, navigate to the link [shown in the picture] in the application designer and check the check box appropriately.

  • Use change control locking
  • Use change control history


Exception Handling in Peoplesoft

Exception Handling in Peoplesoft

Exception handling is the processing you initiate when an exception occurs. You can handle errors in PeopleCode using the Catch statement. The places in your code where you want exceptions handled must be enclosed by the Try and End-Try statements.

The Exception class encapsulates exceptional runtime conditions. It can be used with most PeopleCode programs.

The process of error handling can be broken down as follows:

• An error occurs (either a hardware or software error).

• The error is detected and an exception is thrown (either by the system or by your program).

• Your exception handler provides the response.

You can create exceptions in 2 ways

1) Creating an Exception base class that encapsulates the built-in function call and handles its function parameters consistently. This is the preferred way.

2) Calling the built-in function CreateException.

Application code often continues some form of processing even in the event of an exception; you should not assume that the script all processing if an exception occurs.

The error message that PeopleTools displays might not be appropriate for end-users because of its technical information.

The Exception class does not work with any of the PeopleSoft APIs, that is, the classes whose objects are declared as type ApiObject. This includes the Tree classes, the Query classes, Search classes, and so on.


Protected StatementList

catch QualifiedID &Id



Example 1:-

Import ExceptionPackage:*; 
try               /* Code to manipulate &MyArray here */
 &MyArray = GetArrayData(&Param1, &Param2, &Param3); 
catch ExceptionNull &Ex1
 If &Ex1.MessageSetNumber = 2 and &Ex1.MessageNumber = 236 Then 
   /* this is the message set and message number for &MyArray being Null */ 
   /* do data error handling */


Example 2:-
Local Exception &ex;  
Function t1(&i As integer) Returns number 
   Local number &res = &i / 0;     
Function t2 
   throw CreateException (2, 160, "'%1' doesn't support property or method '%2'", "SomeClass", "SomeMethod"); 
/* this will cause a divide by 0 leading to an exception. This code will never be caught since t1(2) will resume execution in the catch block below. It is here to show how an exception can be thrown directly bythe Peoplecode itself. */
  t2 ();   
Local number &res = t1 (2); 
Catch Exception &caught 
   MessageBox (0, "", 0, 0, "Caught exception: " | &caught.ToString()); 

Posted by



Application Classes in Peoplesoft - Reference sheet

Application Classes in Peoplesoft – Reference sheet / Points remember


  • Importing packages or classes

<Pacakge name>:<Subpacakge name>:<…>:<Class name or wild card>


  • Class Extensions represents the “is-a” relationship.

      When a class extends another class, it’s called a subclass of that class.


  • No Multiple inheritances or Concept of interface in Application classes.


  • Instance variables in the class are accessible in all the objects of that class.


  • Application programs generally pass parameters by value, which is not the same as for existing functions.


  • Parameter passing with object data types is by reference.


  • When the objects are passed to method and it reassign the object with new object it will not reflected in the calling method.


  • Application Programs use the out specifier to pass a parameter by reference.

Method increment (&Value as number out); rem passed by reference.


  • Create is the key word used to create the class object.

            Local MyObjectClass &o1 = Create MyobjectClass (‘A’);

            Local MyObjectClass &o1 = Create Test: Examples: MyobjectClass (‘A’);


  • If parameter in a method is having out specifier then parameter should be a variable and cannot be constant.


  • A class that extends another class must have constructor, and in the constructor it must initialize its super class.

          To initialize a superobject, an instance of the superclass is assigned to the keyword %Super in the constructor for the subclass.


Class Example extends ExampleBase

    Method Example ();



           Method Example         

              %Super = create ExampleBase ();

              &BaseStrin = &currentBaseString;

             &Slashstring = &BaseString;                



  • Before the constructor runs, the instance variables for the class are set by default takes on their declared types.


  • An application class doesn’t have destructors, that is, a method called just before an object is destroyed. The People code runtime environment generally cleans up any held resources.


  • When application class properties and instance variables are used as the argument to functions or methods, they are always passed by value, never by reference.


  • %This is can be used to self reference. This is to refer the same object.


  • %Super = %This – this should never be done it will go to an infinite loop.


  • Import Fruit:* - imports all the classes in the application package.


  • Import statements are validated when you save the Peoplecode.


  • Peoplesoft recommends that you use read-write or ready only properties instead of creating methods name GetXxx and SetXxx.


  • Getter and Setter syntax

Get Propertyname




  • External Functions Declarations are allowed in application classes, in the global and component variable declarations, after the class declaration (after the end-class) and before the method definition.


  • %Super is only required to access superclass members that are hidden by overriding members in the current time.


  • Downcasting is the process of determining if an object is of a particular subclass type. If the object has that subtype (either the object is of that subtype, or is a subtype of it), a reference to the subject is returned, otherwise Null is returned. In either case, the type of the resulting value is compatible with the name subclass type.


  • Class Fruit

          Property number fruitcount;



           Class Banana extends Fruit

              Property number BananaCount;



      Local Banana &MyBanana = Create Banana ();

     Local Fruit &MyFruit = &MyBanana;   /* Okay, Banana is a subtype of Fruit */

    Local number &num = & MyBanana.BananaCount;


         &MyBanana = &MyFruit as Banana;   /* &MyFruit is currently a Banana at runtime */

        &Num = (&MyFruit as Banana).BananaCount; /* same as &MyBanana.BananaCount */

        &MyFruit = Create Fruit ();

   &MyBanana = &MyFruit as Banana; /* Assigns Null - &Myfruit isn’t a Banana */


  • /* */ and /**  */ comments are allowed. Comments enclosed in  /** -- */ are potentially be used to generate API documentation.


  • Method header comments are uses some tags which helps in API documentation

Some of the tags are

·        @Parameter N

·        @exception name

·        @return type

Class header comments contains tags

·        @version X (value of version)

·        @author  name





 * Class header comments

* @Version 1.0

* @author Ganesh



Import PWWPack: ExampleBase


Class Example extends ExampleBase

   Method Example ();                                     /*Constructor*/

   Method NumToStr (&Num As number) Returns string ();

   Method AppendSlash ();

   Property number SlashCount get;                   /*Get properties */

   Property number ImportantDayofWeek get set; /*Get and set properties */

   Property string Slashstring readonly;   /* values can be assigned in constructor */

   Property date ImporantDate;


   Method NextDayofWeek (&Dow As number) returns date;

   Constant &Sunday = 1;              /*Constants */

   Instance string &Basestring;      /* Instance variables are like static variable */



Declare function getusername Peoplecode FUNCLIB_PP.STRING_FUNCTIONS FieldFormula;



* Method header comments example

* @param Dow is a number parameter

* @exception it throws Invalid day exception if the number is negative.

* @return   it is returns the date as of that week.


Method NextDayofWeek  (&Dow)





/* get block */


Get SlashCount

  Return (Slashcount);




- Posted by Ganesh