HCM Report Custom development ALV report

Personnel Cost Distribution by Organizational Unit and Expense Group

Short answer: A report that distributes payroll costs to the directorate, department and company levels of the org structure and to management's own expense groups (salary, overtime, bonus, benefits, employer contributions). For employees with cost distribution, the cost centre shares are kept; the result is shown monthly and year to date.

Estimated effort
M · 6–9 working days
System
ECC and S/4HANA
Tables
7
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

Payroll posting (PC00_M99_CIPE) transfers results to CO by cost centre and cost element, and KSB1 shows those items. But the org hierarchy management wants (directorate, department) and its own expense groups are missing. Every month the accounting extract is mapped to the org chart in Excel.

Who uses it? Senior management, controlling, HR and budgeting teams.

Closest standard alternatives

  • PC00_M99_CIPE Create Posting Run. Posts payroll by cost centre and cost element; has no org or expense group breakdown.
  • KSB1 Cost Centers: Actual Line Items. Shows cost centre line items; does not sum by org hierarchy.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
HRPY_RGDIRDirectory for Payroll ResultsPayroll result directory (driving table)—ECC + S/4
PCL2HR Cluster 2 (PCL2)RT and cost distribution (C1) tablesPCL2-RELID = 'TR' AND PCL2-SRTFD = PERNR + SEQNRECC + S/4
PA0001HR Master Record: Infotype 0001 (Organizational Assignment)Org unit and cost centrePA0001-PERNR = HRPY_RGDIR-PERNRECC + S/4
HRP1001Infotype 1001 (Relationships) Database TableOrg hierarchy (A002)HRP1001-OBJID = PA0001-ORGEH AND HRP1001-OTYPE = 'O'ECC + S/4
HRP1000Infotype 1000 (Object) Database TableUnit namesHRP1000-OBJID = HRP1001-SOBIDECC + S/4
T512TWage Type TextsWage type texts—ECC + S/4
CSKTCost Center TextsCost centre nameCSKT-KOSTL = PA0001-KOSTLECC + S/4

BAPIs and functions used

  • PYXX_READ_PAYROLL_RESULTRead Payroll Result. Reads the RT and C1 tables
  • RH_STRUC_GETRead Organizational Structure for a Root Object. Rolls an org unit up to higher levels

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_PERIODPeriod (month/year)Single value—Yes11.2026
S_BUKRSCompany codeRange / multiplePA0001-BUKRSNo1000
P_ORGEHRoot org unitSingle valuePA0001-ORGEHNo50000010
P_LEVELHierarchy levelSingle value—No2
P_YTDShow year to dateCheckbox—NoX
P_PRIORCompare with prior yearCheckbox—No—

Output columns

#ColumnSource
1DirectorateHRP1000-STEXT
2DepartmentCalculated Unit name one level below
3HeadcountCalculated Employees with a payroll result
4SalaryCalculated Wage types in the salary group
5OvertimeCalculated Wage types in the overtime group
6BonusCalculated Wage types in the bonus group
7BenefitsCalculated Meals, transport, health insurance, etc.
8Employer contributionsCalculated Employer social security and unemployment
9Total costCalculated Sum of all groups

Sample output

DirectorateDepartmentHeadcountSalaryOvertimeBonusBenefitsEmployer contributionsTotal cost
Üretim MüdürlüğüMontaj1425,240,000612,000180,000395,0001,210,0007,637,000
Üretim MüdürlüğüBakım381,690,000214,00042,000108,000391,0002,445,000
Finans MüdürlüğüMuhasebe221,180,0009,00095,00066,000268,0001,618,000
Satış MüdürlüğüYurt İçi Satış301,520,0000310,000128,000384,0002,342,000
A view built with fictional sample data; not real system data.

How does the report work?

  1. Valid payroll results for the period are read from HRPY_RGDIR; the RT and cost distribution (C1) tables are taken from PCL2 with PYXX_READ_PAYROLL_RESULT.
  2. The employee’s org unit and cost centre come from PA0001; if cost distribution exists, the C1 percentages are used. Optionally, posted amounts are linked to accounting document lines through the PPOIX/PPOPX index.
  3. The org unit is rolled up to directorate and company level with RH_STRUC_GET (HRP1001 A002 ‘reports to’ relationships); unit names come from HRP1000.
  4. Wage types are mapped to expense groups with a settings table; employer contributions are collected in a separate group.
  5. The result is shown at the selected hierarchy level, by month and year to date, optionally compared with the prior year. Cost centre names come from CSKT.

Performance notes

Read the org structure once and keep it in memory; do not call the hierarchy for each employee. Schedule full-year runs in the background.

Features

  • ALV list (sort, filter, subtotals) Hierarchical ALV with subtotals per level
  • Double-click drill-down to the document Drill-down from a unit to the per-employee wage type breakdown
  • Export to Excel Exported to Excel as a management report
  • Runs as a background job Can run in the background after month-end close

Authorization objects

  • P_PCLXAuthorization to read the payroll result cluster (RELID RU/TR)
  • P_ORGINAuthorization to read employee data by personnel area, employee group and infotype
  • P_ABAPReport-level HR authorization check to simplify checks for large populations

Frequently asked questions

What if the org structure changes during the period?

The report uses the employee's org assignment at the end of the payroll period and the hierarchy valid on that date. If needed, an option to regroup past periods with the current hierarchy can be added.

Does it reconcile with accounting totals?

Yes, if the wage types mapped to expense groups are the same ones posted to accounting. Unmapped wage types appear under 'Other', so any difference is visible.

Does it work on S/4HANA?

Yes. The payroll cluster and organizational management are the same on S/4HANA (H4S4); the accounting side can be compared through ACDOCA.

Related reports

HCM Report Custom ALV report

Headcount Movement and Turnover Report by Department

A custom ALV report that gives, for the selected period and per organizational unit, opening headcount, hires, transfers between units, voluntary and …

PA0000 · PA0001 · T529T · T527X

Let us build this report for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Personnel Cost Distribution by Organizational Unit and Expense Group