# Payroll Wage Type Period Comparison and Variance Report

> A custom ALV report that compares the payroll results of one period with the previous period per employee and wage type, and lists variances above a percentage or amount threshold as well as wage types that appear or disappear. The payroll owner checks unusual changes in one list before the payment file and the posting to accounting.

- Type: Report, Custom development, ALV report
- Module: HCM
- Estimated effort: M (4–7 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/payroll-wage-type-period-comparison-variance-report/


## Why is the standard not enough?

PC00_M99_CWTR lists wage type amounts period by period, but it does not put two periods side by side, calculate the difference and percentage, or isolate variances above a threshold. Teams match the output of two periods in Excel; retroactive calculations make that matching even harder.

### Closest standard alternatives

- PC00_M99_CWTR: Lists wage type amounts; does not compare two periods or calculate variances.
- PC00_M99_CALC: Runs or simulates payroll; produces no variance list between periods.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| HRPY_RGDIR | Payroll results directory: period, sequence number, current result and retro information (driving table) | Read | - | ECC + S/4 |
| PCL2 | Payroll results cluster (RT wage type table), read through the read function | Read | PCL2-RELID = T500L-RELID AND PCL2-SRTFD = HRPY_RGDIR-PERNR + HRPY_RGDIR-SEQNR | ECC + S/4 |
| T500L | Cluster ID per country grouping | Read | T500L-MOLGA = T001P-MOLGA | ECC + S/4 |
| PA0001 | Name, org unit, cost center and payroll area | Read | PA0001-PERNR = HRPY_RGDIR-PERNR | ECC + S/4 |
| T512T | Wage type text | Read | T512T-SPRSL = SY-LANGU AND T512T-MOLGA = T500L-MOLGA | ECC + S/4 |

## BAPIs and functions used

- PYXX_READ_PAYROLL_RESULT: Reads the payroll result for each period from the cluster

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_ABKRS | Payroll area | Range / multiple | PA0001-ABKRS | Yes |
| P_CURPER | Current period (YYYYPP) | Single value | HRPY_RGDIR-FPPER | Yes |
| P_PRVPER | Comparison period (blank = previous period) | Single value | HRPY_RGDIR-FPPER | No |
| S_PERNR | Personnel number | Range / multiple | PA0001-PERNR | No |
| S_ORGEH | Org unit | Range / multiple | PA0001-ORGEH | No |
| S_LGART | Wage type | Range / multiple | T512T-LGART | No |
| P_PCT | Variance threshold (%) | Single value | - | No |
| P_AMT | Variance threshold (amount) | Single value | - | No |

## Output columns

| Column | Source |
|---|---|
| Pers. no. | HRPY_RGDIR-PERNR |
| Name | PA0001-ENAME |
| Org unit | PA0001-ORGEH |
| Cost center | PA0001-KOSTL |
| Wage type | T512T-LGART |
| Wage type text | T512T-LGTXT |
| Previous period | Calculated: Sum of RT-BETRG in the comparison period |
| Current period | Calculated: Sum of RT-BETRG in the current period |
| Difference | Calculated: Current period − previous period |
| Difference (%) | Calculated: Difference ÷ |previous period| × 100 |
| Flag | Calculated: New, dropped or above threshold |
| Retro | Calculated: X when the current period has a result with HRPY_RGDIR-INPER ≠ FPPER |

## How does the report work?

1. For the selected payroll area and employee selection, the valid results of the two periods to compare are found in HRPY_RGDIR (the latest result for each period, SRTZA = 'A').
2. Each result is read with PYXX_READ_PAYROLL_RESULT; the cluster ID of the country comes from T500L. Amounts of the selected wage types are summed from the RT table per employee and wage type.
3. Difference = current period amount − previous period amount; percentage = difference ÷ |previous period amount| × 100. A wage type missing in the previous period is flagged 'new', one missing in the current period 'dropped'.
4. Lines whose absolute difference is below the amount threshold and whose percentage is below the percentage threshold are removed. If the current period contains a retroactive run (INPER ≠ FPPER), the line gets a note.
5. Org unit, cost center and name come from PA0001, the wage type text from T512T; the result is shown with subtotals per employee.

## Authorization objects

- P_ORGIN: Authorization to read personnel data by organizational assignment
- P_PCLX: Read authorization for the payroll results cluster (PCL2)
- P_ABAP: Simplified authorization check for the report (optional)

## Frequently asked questions

### Can simulation results be compared?

Simulation results are not saved in the cluster. The comparison is therefore done after the payroll run and before exit, which still leaves time to check before the payment file.

### How are retroactive calculations handled?

The latest valid result of each period is compared. If the current period includes a retroactive recalculation, the line shows the Retro flag; part of the difference may belong to an earlier period.

### Which wage types should be compared?

Total gross, net pay, statutory deductions and additional payment wage types are usually enough. The wage type list is stored in a selection variant and agreed with the payroll team during installation.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=hcm-payroll-wage-type-period-variance
