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

'

Saturday, March 31, 2012

What is CONNECT ID?

Connect ID is to establish initial connection between PeopleSoft User and Database. Common connect ID used/delivered by PeopleSoft is 'people'.

A connect ID is a valid user ID that, when used during sign-in, takes the place of PeopleSoft user IDs. Using a connect ID means you don’t have to create a new database user for every PeopleSoft user that you add to the system.


A connect ID is required for a direct connection (two-tier connection) to the database. Application servers and two-tier Microsoft Windows clients require a connect ID. You specify the connect ID for an application server in the Signon section of the PSADMIN utility. For Microsoft Windows clients, you specify the connect ID in the Startup tab of PeopleSoft Configuration Manager. You can create a connect ID by running the Connect.SQL and Grant.SQL scripts.

PeopleSoft Finance - CORE Tables for AP and GL

General Ledger Tables
PS_LEDGER: The general ledger data table.
PS_JRNL_HEADER: Stores general ledger journal header data.
PS_JRNL_LN: Stores general ledger journal line data.
ps_combo_rule_tbl: Stores ChartField combination rules.
ps_combo_group_tbl: Stores ChartField combination groups.
ps_combo_data_tbl: ChartField Combo data table.
ps_bu_led_comb_tbl: Business Unit CharField Combos for Ledger.
PS_GL_ACCOUNT_TBL: GL Accounts table.
Accounts Payable/Voucher Tables
PS_GRP_AP: Stores AP control groups.
PS_VOUCHER: AP voucher header table.
PS_VOUCHER_LINE: AP voucher line.
PS_DISTRIB_LINE: Voucher distribution table.
PS_PAYMENT_TBL: AP disbursements table.
PS_PYMNT_VCHR_XREF: Voucher Scheduled Payment.
PS_RT_RATE_TBL : Market Rate Data Tale. There is also the market rate default view RT_DFLT_VW.
PS_VCHR_ACCTG_LINE: AP accounting entries.
Voucher Build Staging Tables
PS_VCHR_HDR_STG
PS_VCHR_LINE_STG
PS_VCHR_DIST_STG
PS_VCHR_PYMT_STG

Vendor Tables
VENDOR: Stores vendor related information.
VENDOR_ADDR: Vendor address related info.
VENDOR_LOC: Vendor locations.
VENDOR_PAY: Payment processing sepecifications such as payment method, payment handling code, bank code and so forth.
VNDR_ADDR_SCROL: Index to address table.
VNDR_CNTCT_SCR: Index to contact table.
VNDR_LOC_SCROL: Index to location table.
VENDOR_ID_NBRS: Additional ID numbers (Dun & Bradstreet numbers).
VENDOR_ADDR_PHN: Vendor phone numbers.
VENDOR_CNTCT: Vendor contacts.
VENDOR_CONVER: Vendor converstaions.
VENDOR_INVOICE: Stores vendor invoice related flags.
VENDOR_TYPE: Vendor type codes.
VNDR_BANK_ACCT: Vendor electronic payment information.
VNDR_CNTCT_PHN: Vendor contact phone numbers.
VNDR_IND_CLASS: Vendor Standard Industrial Classification (SIC) codes.
VNDR_URL: Vendor website address.
VNDR_VAT_RGSTRN: Vendor VAT information.
VENDOR_WTHD: Witholding data.
VENDOR_WTHD_JUR: Witholding type.

PeopleSoft Security

PeopleSoft Security is organized through 3 components. This security is mainly about User profile and related items.
  • User Profile (Operator ID)
  • Roles
  • Permission Lists
User profile is attached to Roles. Roles will have one or more Permission Lists. Permission Lists are then attached to Components. Below hierarchy shows the link between them.

Users -> Roles -> Permission Lists -> Components / Menu


USER PROFILES:
PSOPRDEFN Stores all operators (users) in the PeopleSoft system. Also stores their employee ID (EMPLID), encrypted password, primary permission list, default navigator home page, process profile permission list and row security permission list.
PSROLEUSER The highest level of security access is defined by roles (think of them as groups). This table stores the roles the user belongs to.
PSOPRCLS Roles link together permission lists which are the security objects that define access to components, pages, and other areas of the system. This view returns the permission lists that a user has access to via their roles. Note that prior to PeopleTools 8, permission lists were synonymous with classes and most of the security tables still use this convention.
PSOPRALIAS Aliases can be mapped to a particular operator ID (user). The obvious alias is employee ID (EMPLID) but others include external organisation ID (EXT_ORG_ID) and customer ID (CUST_ID). All ways of referring to the same entity.
PSOPRALIASTYPE This is the setup table for operator aliases
PSOPRALIASFIELD This is the setup table that maps operator aliases to records & fields
PSUSERATTR User attributes store the a hint password question & response for a user (if this is enabled)
PSUSEREMAIL Email addresses for users.


ROLES:
PSROLEDEFN Stores roles and their properties. Roles can be assigned dynamically through Query, PeopleCode or LDAP. Roles are also used in conjunction with Workflow and routing.
PSROLECLASS Roles are made of up of one or permission lists, and this table links the two together. Very handy.


PERMISSION LISTS:
PSCLASSDEFN Permission lists are where the security really happens. They provide access to menus, components and pages and a host of other security including PeopleTools, Process security, Component Interfaces, Web Libraries, Web Services, Personalisations, Query and Mass Change.
PSAUTHITEM The link between permission lists and menus
PSAUTHBUSCOMP The link between permission lists and component interfaces and their methods
PSAUTHOPTN The link between permission lists and personalisations
PSAUTHPRCS The link between permission lists and process groups
PSAUTHSIGNON The link between permission lists and signon times
PSAUTHWEBLIBVW A view linking permission lists and access to web libraries (really just Menus in PSAUTHITEM that begin with WEBLIB_).
PSAUTHWS The link between permission lists and web services (service operations)
PS_SCRTY_ACC_GRP The link between permission lists, trees and query access groups
PS_MC_OPR_SECURITY The link between permission lists and mass change templates. This is an odd table, it uses the field OPRID but really it links permission lists


PORTAL:

PSPRSMDEFN Stores the structure of the portal registry. This data is stored in a hierarchical (tree) structure within the table. The field PORTAL_URI_SEG1 is the menu, PORTAL_URI_SEG2 is the component, and PORTAL_URI_SEG3 is the market.
PSPRSMPERM Stores permission lists associated with access to everything within the portal registry


Sample Security Query:

select distinct OPRID, OPRCLASS
from PSOPRCLS
where OPRCLASS in (
select distinct CLASSID
from sysadm.PSAUTHITEM
where PNLITEMNAME = '<>
'
);



Workflow Tables

APPR_RULE_DETL – Approval Rule Defn Details
APPR_RULE_FIELD – Approval Rule Defn Route Cntl
APPR_RULE_AMT – Approval Rule Amounts
RTE_CNTL_LN – Route Control Profile Line
RTE_CNTL_RUSER – RoleUser Route Cntl Profiles
RTE_CNTL_TYPE – Route Control Type
RTE_CNTL_HDR – Routing Control Type

Application Engine Trace

Navigation:

PeopleTools -> Process Scheduler -> Processes -> Update Display

Go to Override Options Tab, and add the below entries:

-Trace 7 TOOLSTRACEPC 4044

Based on the numbers given next to TOOLSTRACEPC, detailed level trace file will be generated for Application Engine programs.