Architecture for new payroll application

This chapter provides overviews of the core application architecture, elements, the processing framework, the batch architecture process, multiple currencies, and discusses how to define the installation settings.

Understanding the Core Application Architecture

Global Payroll is built on a core application that organizations in all countries can use to create payroll systems. Understanding the core application architecture will enable you to better understand the complex details of Global Payroll.

Understanding Elements

When you create your payroll system using Global Payroll, you want to be sure that it meets all the requirements of your organization. One of the ways that PeopleSoft ensures this is by building the payroll system through the use of components called elements.

This section discusses:

What Is an Element?

An element is the smallest component of Global Payroll. Elements are building blocks that relate to other building blocks to define your payroll system.

You define each element only once and use it repeatedly anywhere in the system.

This table lists the element categories:

Type of Element

Retrieves data. Some are predefined elements (called system elements ) that are delivered by PeopleSoft. Others you define when creating your payroll system.

Performs a calculation.

Defines the structure and framework for the system.

This table lists alternative element categories:

Type of Element

Represents primary rules for earnings, deductions, and absences.

Usually not used alone, but used to create other, more complex elements such as earnings and deductions.

Represents such things as eligibility criteria, accumulators, and certain types of rules.

You can combine these elements in an unlimited number of ways to produce the results that you need for your payroll processing.

Let's say that you want to calculate a payee's bonus pay. One element might be defined to contain the base bonus amount. Another element might be defined as a bracket element that retrieves the correct percentage of the base bonus based on a payee's seniority. Still another element might be defined to calculate the bonus earning by multiplying the base bonus amount (from a variable) by the percentage of bonus base from the bracket lookup to produce a bonus earning amount. This example shows how elements relate to each other in Global Payroll:

An example of how elements work together

Combining Elements Into Rules

In Global Payroll, you create and store rules by entering data through the online pages.

These rules drive the core application and define the payroll process. Think of a rule as what defines how an element is calculated. Rules define the payroll process itself.

Each country using Global Payroll defines its own rules. For example, overtime in one country might be defined as the last three-month average rate of pay multiplied by a factor based on the payee's seniority (5 years of service = factor of 1.3, 10 years of service = factor of 1.5, and so on). Global Payroll enables you to define rules that address your specific payroll processing needs.

Note. Through its country extension applications, PeopleSoft delivers a set of data that predefines most of the country-specific rules that your organization needs for its payroll system.

This diagram shows how elements and rules define your payroll process:

Elements are manipulated by rules to create the payroll process

Important! There is usually no need to modify the Global Payroll COBOL programs. Using the online pages, you can configure the system to meet your payroll processing needs. PeopleSoft strongly discourages the modification of the delivered COBOL programs—with the possible exception of modifying array size—because modifications can affect the integrity of the entire system.

Why the Core Application Uses Pay Item Name (PIN) Processing

A PIN number is a numeric identifier for an element. Every element in Global Payroll has a unique PIN number, including the elements that you create and the elements PeopleSoft delivers. Global Payroll programs access and process an element by referring to its PIN number, rather than its name.

A PIN is referred to as an element in Global Payroll. A PIN and an element are identical, and a PIN number is the same as an element number. We explain the term PIN here because it is referenced throughout the programs and table structure of the application. Think of PIN as the technical name that is used in the programming and table structure and element as the functional name that is used on all pages and discussions.

This is necessary because Global Payroll is designed for use by any organization in any country. Each organization will likely give the elements that form the basis for its payroll system different names, depending on its requirements. And organizations in different countries are going to name their elements using different languages. Also, the system elements delivered by PeopleSoft are often translated into many languages. If the name were the only way to identify an element, there could be problems.

PIN numbers also improve performance within batch processes. It is more efficient for the system to use numeric values than to use character values. This performance improvement is a result of being able to easily read the numeric values into the processing arrays and create a pointer to the correct place in the array.

PINs are numbered sequentially.

Note. The system assigns a PIN number to each element that you create. The first number the system assigns is 100,001. PIN numbers prior to 100,001 are reserved for the elements that are delivered with Global Payroll.

Elements are accessed by PIN number, rather than by element name, as shown in the following graphic:

Elements are accessed by PIN number

Understanding the Processing Framework

The Global Payroll core application is a common foundation and structure that organizations in every country use to build their own calculation rules. The core application determines the basic framework for your payroll and absence processing. This framework supplies the normal processing sequence, organizational structure, and processing structure for calculating a payroll or an absence.

This section discusses:

The Processing Sequence

A payroll or absence process consists of several processing phases, some of which you can run together. The typical processing sequence (the order in which Global Payroll executes phases of a batch process) for a payroll or absence run consists of these phases:

You can also run Cancel, Freeze, Unfreeze, and Suspend phases as needed and modify processing instructions by payee.

When you first launch the batch process, Global Payroll determines which payees are to be selected and calculated for the payroll or absence run, based on the selection criteria that you have specified. This identification phase is executed only once for each calendar group ID.

During the calculation phase, payroll or absence calculations are performed. Each payee is processed sequentially. As the system encounters each payee, it processes each element that is identified in the process list. Various criteria such as eligibility and generation control are considered in selecting which elements to process.

The calculation process can be repeated any number of times; only the payments that are appropriate to calculate are processed. When a calculation is first executed, all payments are processed. During subsequent calculations, only the following payments are processed:

An iterative trigger can be produced when data changes for a payee. For example, a change to a payee's rate of pay might create an iterative trigger. Or the addition of a new hire to the calendar group ID can produce iterative triggers.

Finalizing an absence or payroll run closes and completes the process.

The Organizational Structure

The Global Payroll core application determines the organizational structure for payroll processing. This diagram shows the hierarchy of components in the organizational structure:

Organizational structure of Global Payroll

Pay entity defines the organization making payments to payees. It also defines the type of currency to be used as the processing currency for every calculation.

Only one processing currency can be defined in Pay Entity. However, you can have multiple types of currency used as input and output. For example, you could enter your data in one type of currency and have 50 percent paid in one currency and 50 percent in another currency, regardless of the processing currency defined in pay entity.

The processing currency defined in pay entity is the currency that is used to generate reports.

A pay entity can be linked to one or more pay groups. However, each pay group is linked with only one pay entity.

You associate a specific country with each pay entity. This country designation is important for many features in Global Payroll such as the groups of calendars with a single calendar group ID, retroactive methods, and trigger definitions.

Global Payroll uses a logical grouping, called pay group, to qualify individuals for payment. Typically, all individuals in a pay group have something in common that causes them to be processed at the same time in the payroll system.

Common examples of pay groups are salaried and hourly pay. You can assign a payee's default earnings and deductions based on pay group if you select this option at installation time. A pay group can be associated only with a single pay entity.

Each pay group has a default eligibility group associated with it. This is traditionally the default earnings and deductions for the pay group population. The default eligibility group that is associated with a pay group is used as the payee level default. You can override these defaults.

Pay groups are ultimately associated with pay calendars to process a payroll. It is important to group payees who are paid with the same pay frequency—weekly, monthly, and so on—as well as payees who typically receive the same type of earnings and deductions.

Payees are the people in your organization that you want to pay.

Payees who are included in a pay group definition can be members of different eligibility groups. The only link between pay groups and eligibility groups is from a default perspective. The eligibility group that is defined on the Pay Group page is used as an initial default for the payee. You can override the default.

An eligibility group is a grouping of element groups. Eligibility groups indicate the specific elements for which a certain payee population is eligible. The default eligibility group is defined at the pay group level. A payee is assigned to an eligibility group through the default that is defined at the pay group level. You can override the default value.

For example, let's say that you have a pay group for all payees who are paid monthly. Of those payees, 99 percent are regular, salaried payees who are eligible for regular earnings. However, you also have 10 executives whom you want to pay in that same pay group. These executives are eligible for a slightly different set of earnings and deductions. You can override their eligibility group and assign them to the EXEC EARNINGS eligibility group. You can have only one default eligibility group for each pay group.

Element groups provide a method of assigning a large number of elements (like taxes) to many eligibility groups without repeating the elements in each and every eligibility group. Element groups provide a means for grouping these elements. You can assign any number of element groups to an eligibility group.

Elements are the basic building blocks of Global Payroll. The organizational structure of the system begins with the definition of these basic payroll components.

The Processing Structure

This diagram shows the components of the Global Payroll processing structure:

Processing structure of Global Payroll

A process list specifies the order in which gross and net pay elements are processed and resolved. You add these elements to the process list by using sections. You add sections to your process list; the sections are processed in the order in which you insert them into the list. You can also execute sections conditionally.

The process list is where you indicate whether you are calculating an absence or a payroll. You use separate calendars for absence and payroll processing runs, so you must create separate process lists for absence and payroll runs.

On the Process List - Definition page you indicate what type of calculation is taking place. If the calculation type is absence, then the gross, net pay, and minimum net element name fields are not available. If the calculation type is payroll, then the gross and net pay element name fields are required. The minimum net element is optional. If the minimum element is not entered, the minimum net amount is considered to be zero. When you enter the gross and net pay element names, you are referencing the gross and net accumulators.

The net pay element and minimum net element are used during deduction arrears processing. The deduction amount is compared to the net plus minimum to see if the deduction can be taken. If the net plus minimum is less than the deduction, the system follows its own set of rules to process the deduction.

The net and gross element numbers and values are stored in output tables so that you can access this data for reporting and online inquiries.

A section is a grouping of elements and controls the order that those elements are processed on the process list. Five types of sections are used for different types of processing:

Once you have defined a section, you can reuse it in multiple process lists.

Elements are the basic building blocks in Global Payroll. Some stand alone while others use several simple elements (called supporting elements ) that are combined to form more complex elements.

During a payroll or absence processing run, the system resolves each element in the process list for each payee. The elements that are resolved depend on a payee, so the resolved value of an element depends on which payee is under consideration.

Calendars

To run a payroll or absence process, the relevant components of the system are linked together through the use of calendars. A calendar controls who is to be paid, what amounts are to be paid, and the period of time for which the payment is being made.

Only one pay group can be associated with a calendar. Through the use of various selection criteria, you can define who is going to be paid:

This diagram shows how calendars ties together the components of a payroll or absence run:

Calendar links the entire process together

Understanding the Batch Architecture Process Flow

This section discusses:

Global Payroll Modes

Global Payroll processes payees and elements by utilizing a very specific processing order. All the components of the system that you define, such as payees, elements, and rules, come together at the time a payroll or absence run is executed.

Think of Global Payroll as having two primary modes:

Note. The discussion in this section about the batch architecture process flow is a very high-level overview of the process. Each phase of the process is discussed in greater detail later in this PeopleBook.

Payee Selection

When you run a payroll or absence batch process, the first program that the system calls is the Service program. The Service program acts as the coordinator between the selection of payees to be processed and the calculation process. The Service program initiates the payee selection process. Once the payees are selected, the Service program passes control of the data that was created during the payee selection phase to the Calculation program.

This diagram shows how the Service program coordinates the payee selection and calculation phases:

The Service program is the batch processing starting point

Before you can process a payroll, you must identify the payees that are to be processed. In Global Payroll, this is called payee selection or payee identification. Payee selection is required in payroll and absence processing.

The payee selection process is separate from the calculation process. No rules are defined for payee selection that is associated with a payroll or absence calculation. The payee selection phase of the process only identifies the payees and creates the data that is later passed on to the calculation phase.

The pay calendar acts as the controlling function that coordinates and defines the payee selection and calculation processes. The Payroll/Absence Run Control also controls payee selection.

On the calendar definition page, you indicate whether you want active payees or listed payees selected. If you select active payees, you are offered a number of other defining choices. If you select listed payees, you insert the employee ID numbers for the payees that you want to select.

The payee selection process also uses retroactive and period segmentation triggers. Retroactive triggers can cause other pay periods besides the current pay period to be processed for a particular payee. Period segmentation triggers can cause the pay period to be split into segments, thus producing multiple calculations.

The result of the payee selection process is the creation of Process Status (GP_PYE_PRC_STAT) and Segment Status (GP_PYE_SEG_STAT) records. A Process Stat record is created for each payee for each calendar (including retroactive processes). A Segment Stat record is created for each payee for each segment in each calendar. The Process Stat and Segment Stat records are the storage places for the payee data that is related to the calendar that is being run. Essentially, the Process Stat and Segment Stat records list the payees and all the pay periods that are to be processed, including the current pay period and possible retroactive periods.

Calculation (Technical)

Once payees have been selected, the Service program passes control to the calculation phase of the process. The calculation phase uses the data that is stored in the Process Stat and Segment Stat records as the beginning set of payee data.

The first step in calculating the payroll is to load process-level data into arrays, including data from sources such as pay entity, pay group, eligibility group, calendar, and the process list. This system data is more static than the payee-specific data.

The calculation programs process each payee, using the Payee Process Stat records and Payee Segment Stat Records that were created during the payee selection phase. The program loads all the payee-level data into payee arrays, including data from table sources such as Job, Person, Compensation, Overrides, and Positive Input.

The process that loads the payee-level data into the arrays also refreshes its data or reset pointers to data between every payment so that:

At this stage, all the process-level and payee-level data is loaded into arrays, ready for processing.

Next, the calculation phase checks element eligibility.

The calculation program calls the Process List Manager program, which looks to the process list to determine which elements will be processed and in what order.

When the Process List Manager encounters an element to be processed, it calls the PIN Manager (a program that manages individual elements) to process each element that passed the element eligibility check earlier in the process. The PIN Manager references the PINV array during this process. The PINV array stores the results of all element resolutions during payroll batch processing. If the data stored in PINV indicates that an element has not already been resolved, the PIN Manager calls a PIN resolution program (a program that processes specific types of elements).

A separate array, called PINW, stores the accumulator data that is resolved during batch processing.

Each PIN resolution program resolves a specific type of element. For example, one PIN resolution program might resolve earning elements while another might resolve formula elements. The PIN resolution program loads the element definition into memory. Then the program overrides the definition that is stored in memory with any payee overrides or positive input that is designated for that payee. If any elements are referenced in the element and overrides definitions that are now in memory, the program calls the PIN Manager to resolve them. Remember, an element can comprise other elements. During processing, this means that to resolve a single element, the system might need to resolve any number of other elements from which the primary element is created. The results of this process are used to calculate the values of earnings, deductions, and other elements, and pass the values back to the PIN Manager, which writes them to the main value array (PINV).

Each element is resolved in a cyclical (or recursive ) manner; that is, each element is resolved, and the data is stored (in PINV or PINW). Then the Process List Manager again looks to the process list to see what element is to be processed next, and the process is repeated.

When all calculations are complete for the payroll or absence run, the program writes the results to the appropriate output tables. First, the program references the PINV and PINW arrays and writes the results to the database. Then it references all positive input and writes the data to the positive input history records. Finally, the program generates deltas for any future retroactive processing.

This diagram shows the calculation phase of the batch process:

The calculation process

Arrays Used in Batch Processing (Technical)

In Global Payroll batch processing, arrays are used to store data. Arrays are temporary tables that COBOL programs use to store data during processing. Once processing is complete, the programs write the data from the temporary arrays to the appropriate output tables.

Occasionally you might need to modify the COBOL programs to accommodate a larger maximum array size than is defined in the programs that are delivered by PeopleSoft. If an array is too small (the data overflows the array), you get an error message, and the batch process fails. The error message (MSGID-ARRAY-OFLOW) identifies the array and the COBOL file where the array is defined. This guides you to the location in the designated file that might need modification.

Increasing the Occurs Count in Arrays

The table access programs allocate a specified, limited amount of memory space to store in a table array all the details of the payroll process tables that are typical for a payroll run.

You can increase the maximum size of an array by increasing the occurs count in the appropriate table access program.

Note. This is the only COBOL modification that we detail because COBOL modifications to the delivered Global Payroll programs are strongly discouraged.

For example, let's look at a piece of unmodified code in GPCDPDM.CBL.

Below is an array and its related COUNT control field that prevents the program from aborting. When you make a modification, both highlighted numbers must be changed and kept in sync.

05 L-PMT-COUNT PIC 9999 VALUE 0 COMP. 88 L-PMT-COUNT-MAX VALUE ​200. 05 L-PMT-DATA OCCURS ​200 INDEXED BY PMT-IDX.

The assumption here is that there will never be more than 200 payments processed for a payee during any calendar run. If more than 200 payments were processed, the program would issue an error message (MSGID-ARRAY-OFLOW), and the payroll process would terminate.

While the system loads and refreshes this array once for each payee, the system refreshes other arrays for each payment, and loads and increments others throughout the entire process.

This type of modification is not difficult to deal with when you upgrade to a new Global Payroll release, when PeopleSoft delivers a whole new set of source code. Simply move your array size modifications to the new code line. Whenever you change the size of an array, be sure to recompile the entire Global Payroll COBOL code line (GPP*).

Batch Processing Output Tables

The goal of a payroll or absence batch processing run is to produce a set of output tables, where your important batch processing data results reside. Once you know the type of information that resides in the output tables that are generated by Global Payroll, you can use those tables to produce reports and other data manipulations that are relevant to your organization's needs. This diagram shows the relationships between the batch processing output tables:

Relationships Between batch processing output tables

Tables Generated by Payee Selection Process

The payee selection process generates the following tables:

Tables Containing Element Results

The following tables contain element results:

Table Containing Accumulator Results

The Accumulators table (GP_RSLT_ACUM) contains the results of accumulators after batch processing.

Table Containing Deltas

The Deltas table (GP_RSLT_DELTA) contains deltas, which are the differences between two element results. This data is often important for processing retroactivity. This table is a child table to the Segment Stat (segment status) table (GP_PYE_SEG_STAT), which is a child of the Pay Process Stat table (GP_PYE_PRC_STAT).

Tables Containing Positive Input Results

The following tables contain positive input results:

Understanding Multiple Currencies

A key part of any multiple country system is currency support. Global Payroll streamlines the process of using multiple currencies. You can enter amounts and make payments in any currency—the system performs all necessary conversions using the parameters that you define.

This section discusses:

Note. Global Payroll is designed to meet the changing currency requirements of the European Monetary Union (EMU). The system supports all currencies and enables multiple currency conversions.

Using and Defining Currency

To use multiple currencies in Global Payroll, you set up and maintain the following tables:

These PeopleSoft Enterprise Component tables are used universally by PeopleSoft Enterprise Human Resources.

See PeopleSoft Enterprise Human Resources 9.1 PeopleBook: Enterprise Components

Once you have defined the currency codes, types, exchange rates, and base currencies that you use in your system, you'll need to understand how Global Payroll uses this information so that you can run your payroll using multiple currencies.

The pages referred to in this discussion are described in detail in other areas of this documentation; here we discuss only how the fields on the pages are used in currency processing.

Once you've set up your currency rate codes, rate types, and exchange rates, you can use them to control your input and output amounts.

This table describes the Global Payroll two-tiered approach to currency codes:

Currency Code Use

Determines the processing currency for all payees in this pay entity. If no override currency code is present at a lower level, the system assumes that the amounts are in this processing currency.

Definition of database field or element

When you enter a payee's base compensation as a database field, on the Job Table or in the Payee Data component, you can enter a currency code. Also, when you define certain other elements, such as earnings and deductions, you assign a currency code to the definition. Then the system knows that your input for this definition is in that currency. The currency is converted to the processing currency for gross-to-net processing.

In Global Payroll, you must enter a currency code every time you enter a monetary value on a page. The currency code designates what monetary unit you are entering.

Currency at the Pay Entity Level

For payroll purposes, the pay entity is the highest level of an organization. All payees are assigned to pay groups. Each pay group is assigned to one—and only one—pay entity. The currency entered on the Pay Entity page affects all pay groups that are assigned to that pay entity and all payees who are assigned to those pay groups. We refer to the pay entity currency as the processing currency.

All calculations for payees who are associated with this pay entity occurs in the pay entity currency. Before processing, all input items are converted to this currency. After processing, all output values are stored with net distribution information for each payee. Eventually this information is passed to banking payment files. Any conversion of a monetary output value to a different currency is handled by the party who receives the information, such as a bank.

Always define your processing currency as the currency that is used for most of your input and output, unless your country or locality requires stipulating what currency must be used for processing.

Note. You cannot override the processing currency. This doesn't mean that you can't enter amounts, or get output, in other currencies; it means that the processing occurs in this currency. If you override the default currency, the payments are converted to the processing currency for processing.

Currency at the Element Level

There are many kinds of monetary elements in Global Payroll. You can use currency with base compensation and with other elements.

Using Currency with Base Compensation

When a payee's base earnings are entered on the Job Data pages, you attach a currency code to the amount. If this currency is not the same as the processing currency, the system converts the amount entered into the processing currency before processing a payee's payment. If you do not enter a currency code, the system assumes that the amount is expressed in the processing currency and does no conversion.

Note. The currency code on Job Data appears by default from the base currency on the Installation Table, not from the Pay Entity Table. The base currency does not have to be the same as the pay entity currency—base currency has no impact on Global Payroll. However, check the code carefully to ensure that the default is correct. If it is not correct, change it.

Using Currency with Other Elements

Earnings and deductions are examples of elements. When you define an earning or deduction element, you enter other supporting elements, such as variables, in one of the component fields for the earning or deduction element. A component field, such as a base or a rate, can have a monetary format. The system requires that a currency code be provided for any field with a monetary format. At the point of entry into the batch system, the currency of a monetary value will be converted to the processing currency. If a monetary value is defined on a variable, then in the variable program, the amount will be converted to the processing currency. From that point on, the converted value will be used during the calculations. If the variable is used within an earning calculation, the converted value will be used.

Exchange Rate Types and Dates

When the Global Payroll calculation encounters a currency value that is not in the processing currency as defined at the Pay Entity level, the payroll system must perform a currency conversion. To do this, the system must know which exchange rate type to use and the dates to which it applies. The exchange rate type and dates documented below only apply to calculations performed within the Global Payroll process. They do not apply to other features like online currency conversions.

Exchange Rate Types and Dates at the Payee Level

You can override the exchange rate type and date at the payee level on the Payee Data Defaults page. Let's say that ten payees in the United Kingdom are working in Germany. One has a special rate, and the other nine get the official bank rate. For the pay group that includes these payees, you define the exchange rate type as the official bank rate. But let's say that you need to override that entry for the tenth payee. You can override the exchange rate in Job Data.

The default values for the payee are those defined for the payee's pay group. The system stores a value at the payee level only if you override the default.

To determine the exchange rate date, the system looks at the period end date, payment date, or period begin date and compares the date to the calendar period dates. It determines which exchange rate—based on the appropriate effective date—should be used for any required currency conversions during batch processing.

Accumulators and Currency

An accumulator tracks values in a single currency. If you change the processing currency, the system automatically converts the accumulator's value to the new processing currency. So, if you switch the processing currency from FRA to EUR on July 1, the system converts the accumulator's June 30 value to euros. Any amounts that are added to or subtracted from the accumulator after June 30 are tracked in euros.

If a payee receives earnings from countries that use different currencies, a separate accumulator must be defined for each currency. Say that a payee works in one country and is paid in that country's currency. An accumulator stores the payee's year-to-date earnings. The payee's job is redefined and now he works in two countries that use different currencies. The payee's earnings can no longer be stored in a single accumulator. You must define a new accumulator to store year-to-date earnings for the second country.

Viewing Payments Across Multiple Currencies

Many online pages that display earnings or amounts in one currency enable you to view these amounts in another currency so that you can track conversions across all currencies that are supported by the system.

In Global Payroll, you can view monetary values in multiple currencies on data entry pages and on pages where you view information.

Online Currency Defaults

When you enter a monetary value, you must also enter a currency code. You can change the default currency codes.

Currency defaults can come from operator preference, element definition, or pay entity. Operator preference refers to the EXCHNG_TO_CUR field on the Operator Defaults Table — HR record (OPR_DEF_TBL_HR). It is set on the Operator Preferences page. The record is not effective-dated. The pay entity record and the element definition record are effective-dated.

This table lists the currency code defaults and the as of date used:

Default Currency Code From