Sunday, April 15, 2012

Spartan Programming


What is Spartan Programming?
Spartan programming seeks to reduce code complexity through  minimum coding practices.

Instead of these 4 lines of code,
import GREETERS:MyClass;
Local GREETERS:MyClass &greeter = create GREETERS:MyClass();
Local string &message = &greeter.GreetMe();
MessageBox(0, "", 0, 0, &message)
we could rewrite in two lines as below:
import GREETERS:MyClass;
MessageBox(0, "", 0, 0, (create GREETERS:MyClass()).sayHello());
It may be difficult to read this 2nd method but less codes to maintain..

Application Class


Steps to create application Class:
1. Create an application package.
2. Create an application class.
3. Code your class.
4. Test your code.

Using Application designer we can do step-1 and Step-2 above.

Step-3 might look something like this:

class MyClass
   method GreetMe() Returns string;
end-class;

method GreetMe
    Return "Hello " | %OperatorId;
end-method;

Step-4 Test the code:

import GREETERS:MyClass;
Local GREETERS:MyClass &greeter = create GREETERS:MyClass();
Local string &message = &greeter.GreetMe();
MessageBox(0, "", 0, 0, &message);


The first line of this listing imports the MyClass application class into the current PeopleCode module in a manner similar
to a PeopleCode Declare directive.
The second line creates a new instance of the MyClass class using the create keyword.

Inappropriate use of application Class:
1) Avoid using Runtime Context-Sensitive Variables such as %Component, %Portal, %Request, %Page, %Response.

2) Avoid Event-Based PeopleCode such as SavePostChange for Application Classes.

Thursday, April 12, 2012

Mouse Over Popup - PeopleSoft 9.1

Mouse Over popup is new feature in PeopleSoft 9.1
Below example shows what is mouse over popup. It quickly shows additional employee or applicant information by pausing on a person's name or ID that has a dotted line under it, as shown in this example.



Now, let us see how to implement this technically. PeopleSoft application delivers these mouse over IDs:
APPLICNT_INFO_1
APPLICNT_INFO_2
EMPLOYEE_INFO_1
EMPLOYEE_INFO_2
EMPLOYEE_INFO_3

Field-Level
Navigation ->
Set Up HRMS, Common Definitions, Mouse Over Popup, MouseOver Field Definition, MouseOver Field Definition 


Component Level:
Set Up HRMS, Common Definitions, Mouse Over Popup, MouseOver Component Setup, MouseOver Component Setup

Note:  PeopleSoft delivers 31 fields in HCM 9.1 with this feature. Adding any other fields would be considered a customization and will require peoplecode modifications to the Application Package/Class - HR_MO_COMMON: SET_UP_COMMON, that is used to retrieve the data associated with any new fields.

Tuesday, April 10, 2012

Tools 8.52 - PS Admin tool to manage WEB server

Tools 8.52 introduces new options in the psadmin menu to administer the PIA web server. 

New psadmin options are listed below.

 1) Application Server 
 2) Process Scheduler
 3) Search Server
 4) Web (PIA) Server 
 5) Switch Config Home
 6) Replicate Config Home
 q) Quit

Command to execute (1-6, q): 4

Option 4 above has WEB server administration. Using this we can create domain same as Application server and Process scheduler servers.

Sunday, April 8, 2012

Accounts Payable - Overview

PeopleSoft AP Integration with Other systems/modules:














PeopleSoft Payables Business Process
Voucher Entry & Approval
Voucher Build
Voucher Edit
Matching Process
Voucher Posting
Pay Cycle
Drafts
Payment Posting
Withholding
Archiving
PeopleSoft Payables tracks the stages using statuses of a voucher:
 - Entry status 
 - Match status
 - Approval status -- A voucher has to be reviewed for approval, or unless it is pre-approved. You can post a voucher even though it has not been approved for payment, if your business unit definitions enable you to.
 - Budget status
 - Post status -- The system creates balanced accounting entries to record your liability and sets the post status to posted.  To change the numbers on a posted voucher, you must first unpost the voucher to create reversing entries.  
 - Payment status -- The payment status is unselected, selected for payment, or paid.
 - Payment post status


Voucher Build
Voucher Build is a batch program that builds voucher record sets from limited information entered online or retrieved from other procurement processes.

Voucher Edit
Voucher Edit is an Application Engine program that loads new voucher data from the Voucher Build temporary processing tables and/or any recycled vouchers from the online tables to the Voucher Edit work tables and performs the following:
-- Performs field-level, relational, and balancing edits for the voucher header, voucher line.
-- Calculates net payment dues dates, discount due dates, and discount amounts according to the payment terms.

Matching Process
Matching is a flexible process that compares vouchers with purchase orders and receiving documents to ensure that you  pay for what you ordered and received. 
To run matching, you must have PeopleSoft Payables and PeopleSoft Purchasing installed on the same database. The system automatically does matching based on document characteristics.

Voucher Posting Process
Creates expense accrual accounting entries in accounts payable.  This process creates balanced voucher accounting lines entries on the voucher accounting line table.  The source for the voucher accounting entries are the expense distribution on the voucher (DR).  The  liability offset (CR) account value is populated from the default setup on the accounting entry template.  

Payment Posting Process
Creates voucher payments accounting entries in accounts payable.  This process creates balances payment accounting line entries on the voucher accounting line table.  The payment posting process used the voucher posting process and the accounting entry template as the source for the cash (CR) side of the accounting entry.  The offset (DR) side of the payment accounting entry is created by reversing the liability offset from the voucher accounting line entry.  

Journal Generator
This is the process that creates General Ledger journal entries from PS subsystems (modules).  For Accounts Payable, the journal generator selects rows from the voucher accounting line table that meet the defined selection criteria.  These rows are summarized and the data is sent to the general ledger in the form of a general ledger journal.  

AP Reports
Some major reports in PS payables :

Match Exception Report
    --Lists the match exceptions with voucher data, purchase order data, receiver data, and match error information.

AP/GL Open liability Report
--Compares the AP Open Liability balance to the GL Open Liability balance Detail AP/GL Open Liability Account Reconciliation Report
--Shows all accounting activity for accounts payable transactions for each voucher. Use the detail report to validate the AP Open Liability balance to the General Ledger

Aged Vendor Liability
--Lists all vouchers that have not been paid by the As of Date. You can run the report in either summary or detail format for specific vendors


Vendor Aging Report
--Lists all vouchers that have not been paid at the date you specify Vendor Witholding Balances Control Report
--Lists withholding activity for internal audits. We recommend that you run the report on a regular basis to check the withholding summaries

Outstanding Balance by Vendor
--Lists the gross amount of all the outstanding vouchers for the specified vendor

Deferred Processing


What is Deferred processing?
Deferred processing is used speed up the data-entry process.  This means that the system does not validate the data for each field as you  Tab through a page.  You can enter in all the data for your page without unnecessary trips to the  server for data validation. Entered data is validated when:

  • You navigate to another page in the component 
  • Click the Save button 
  • Click the Refresh button (access key: Alt+0) 

If there are any errors in your data, you are notified at this time.

Point to consider -> FieldEdit event will not fire until we press the SAVE button if the deferred processing is ON.


You can select Deferred mode at the following levels:

  • Page control 
  • Grid
  • Page (include subpage and secondary page) 
  • Component levels
Next, how to setup this property in Application designer?  To set Deferred mode at the page level:
1. Open the page properties in PeopleSoft Application Designer.
2. On the Use tab, select Allow Deferred Processing

Similarly, we can do for other objects in their properties. For example, below property shows how to do deferred processing for Component-level.


Wednesday, April 4, 2012

File DELETE in SQR


Using the CALL SYSTEM, any OS commands can be executed from SQRs. 
CALL SYSTEM Using $del_file #del_status Wait 
if edit(#del_status,’9′) = ‘0′
show ‘intfiles.txt was deleted sucessfully’
end-if

$del_file – Specifies the operating system command to execute. The command can be a quoted string, string variable, or column.

#del_status – Represents the status of execution of OS Command. This is always going to be Numeric variable
UNIX/Linux: Zero (0) indicates success. Any other value is the system error code.
PC/ Microsoft Windows: A value less than 32 indicates an error.

Wait – This flag is used to enable to do multitask processing.
(Microsoft Windows only): WAIT specifies that SQR suspend its execution until the CALL SYSTEM command has finished processing. NOWAIT specifies that SQR start the CALL SYSTEM command but continue its own processing while that command is in progress.

For Microsoft Windows, the default is NOWAIT. On UNIX\Linux operating systems the behavior is always WAIT.

** Please note delete command needs to be built dynamically in $del_file above based on your process scheduler OS environment.

Deleting file from PeopleCode

Solution 1) Using Java class:
/* Deleting previously created csv file */
&MAIL_FILES1 = "\\test-server\test-folder\test_File_To_Delete.CSV";

&javaFile = CreateJavaObject("java.io.File", &MAIL_FILES1);

If &javaFile.exists() Then
   rem &Filename.open();
   &javaFile.delete();
End-If;

Solution 2) 

&tmpfile1 = GetFile(“c:\temp\filetoDelete.txt”, “W”, “A”, %FilePath_Absolute);
&tmpfile1.Delete();

Thanks Srivani for the solution-1.

Sunday, April 1, 2012

PeopleSoft HCM/Payroll - Core Tables list

Human Resources Information/ Personal Data:
PERSONAL_DATA
PERS_DATA_EFFDT
PERS_NID

Employment Data:
EMPLOYMENT- - general employment data, such as various service dates, etc.
DEPT_TBL --This is one of foundation tables in HR.    
JOBCODE_TBL --This is also a foundation table. 
JOB-- Job Table (main HR, Payroll record) -Contains job records along with other
data.    

Benefits Data:
BEN_PROG_PARTIC – Stores the Benefit Program to which the employee is assigned.
LEAVE_PLAN – Stores enrollment in leave plans.
HEALTH_BENEFIT – Stores enrollment in health insurance plans
SAVINGS_PLAN --  Stores enrollment in TDA, ORP and Deferred Compensation
LIFE_ADD_BEN --  Stores enrollment in life insurance plans.
RTRMNT_PLAN – Stores TRS enrollment.
DISABILITY_BEN – Stores enrollment in disability plans.

Tax Data:
FED_TAX_DATA – Contains federal tax data, including nonresident alien data
STATE_TAX_DATA – State Tax Data

Payroll Data:
Payroll processing check data (records used by the payroll process to store check history)
PAY_CALENDAR
PAY_CHECK                                  
PAY_LINE                                                                                       
PAY_EARNINGS                                    
PAY_OTH_EARNS                                 
PAY_DEDUCTION                                
PAY_TAX
Payroll funding distribution data (records that tie funding to payroll actual):
PAY_ERN_DIST
PAY_DED_DIST
PAY_TAX_DIST
                                              
Other employee level payroll data:
GENL_DEDUCTION
GENL_DED_CD
ADDL_PAY_EFFDT
ADDL_PAY_DATA
ADDL_PAY_ERNCD
DIRECT_DEPOSIT
DIR_DEP_DISTRIB

PS_EMPLOYEE - Used for Reporting which contains almost all employee level data. Refreshed periodically.

PeopleSoft - Phases, Input and Output, Approvers


Table below shows the stakeholders of each phase and input/output.

Task/Phase
Contributors
Approver
Input
Output
Fit/Gap
Business Analyst, Functional Analyst, PM
Business Process Owner
User Requirement
List of RICE Objects
Functional Design
BPO, Functional Analyst, Solution Architect
Business Process Owner
List of RICE objects,  Business Rules,
Functional Unit Test plan, Functional Design Document
Technical Design
Development Team
Project Manager
Functional Design document
Technical Design Document, Unit Test plan, Deployment Plan
Development
Development Team
Technical Architect, Tech Lead & PM
Technical Design Doc.
Source Code for RICE
Testing
Development Team and Testers, Users
PM, Tech Lead,  Test Manager
RICE Objects
Test Result
Implementation
Environment Team (DBA, Admin),  Sponsors, DEV team, Functional Team
Business Owners, PM,  Release Manager
UAT Approved RICE Objects, Deployment Plan
RICE objects in Production

PeopleCode Event Sequence

'