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:

  • The correct effective-dated information is always used.

  • The correct year-to-date balances are always reflected.

  • Any positive input—such as absence data—is always forwarded into the next payment.

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