Skip to content

SAP HR/HCM — Human Capital Management Guide

DodaTech 10 min read

In this tutorial, you'll learn about SAP HR/HCM. We cover key concepts, practical examples, and best practices.

SAP HR/HCM (Human Capital Management) handles personnel records, payroll, time tracking, and recruitment in SAP S/4HANA for the full employee lifecycle.

What You'll Learn

SAP HCM manages every stage of the employee journey — from hiring and salary setup to time tracking, payroll processing, career development, and exit — all integrated with finance for accurate cost allocation.

Why It Matters

Payroll errors cause immediate employee distrust, government fines, and audit failures. SAP HR ensures every employee is paid correctly, every tax deduction is accurate, and every labor cost is tracked to the right department.

Doda Browser applies HCM-style organizational management to its team structure — each developer's role, manager, and project assignments are modeled using OM relationships, enabling automated access permissions based on reporting structure.

Real-World Use

A global company with 10,000 employees in 15 countries runs payroll in 12 currencies across 8 legal entities. Every month, SAP HR calculates salaries, applies country-specific tax rules, deducts social insurance, handles overtime and sick leave from the time system, posts salary costs to the correct cost centers, and sends payment files to 15 different banks — all with one payroll run.

Learning Path

flowchart LR
  A[SAP Overview] --> B[SAP Modules]
  B --> C[SAP SD]
  C --> D[SAP HR/HCM
You are here] D --> E[SAP BW]

What Is SAP HR/HCM?

SAP HCM manages the complete hire-to-retire lifecycle. Think of it as the company's employee database plus payroll calculation engine plus organizational chart plus recruitment system — all in one.

Core Submodules

Submodule Purpose Key TCode
Personnel Administration Employee master data, hires, transfers, terminations PA30, PA40
Organizational Management Company structure: org units, positions, jobs PPOME, PPOSE
Payroll Salary calculation, tax, social insurance, payslips PC00_M99_CALC
Time Management Attendance, absences, overtime, scheduling PT60, PA61
Recruitment Job postings, applicant tracking, hiring PAPBS
Personnel Development Training, qualifications, career planning PPDP
Compensation Management Salary review, bonuses, long-term incentives PCPM

Personnel Administration

Personnel Administration (PA) stores every employee's data in infotypes.

Infotypes

An infotype is a data group with a four-digit number:

Infotype Name Data Stored
0000 Actions Hire, transfer, termination events
0001 Organizational Assignment Company code, cost center, position
0002 Personal Data Name, DOB, gender, marital status
0006 Address Home address, phone, email
0007 Planned Working Time Weekly hours, work schedule
0008 Basic Pay Salary amount, frequency, currency
0014 Recurring Payments Bonuses, allowances
0015 Additional Payments One-time payments
2001 Absences Sick leave, vacation, leave of absence
2002 Attendances Overtime, on-call duty
* ABAP: Read employee basic pay from infotype 0008
DATA: lt_p0008 TYPE TABLE OF p0008.

SELECT * FROM pa0008
  WHERE pernr = '00001001'
    AND endda >= sy-datum
  INTO TABLE lt_p0008.

LOOP AT lt_p0008 ASSIGNING FIELD-SYMBOL(<ls_p0008>).
  WRITE: / 'Employee:', <ls_p0008>-pernr,
         / 'Salary:', <ls_p0008>-bet01 CURRENCY <ls_p0008>-waers,
         / 'Currency:', <ls_p0008>-waers,
         / 'Annual salary:', <ls_p0008>-anzhl.
ENDLOOP.

* Output:
* Employee: 00001001
* Salary: 75000.00
* Currency: USD
* Annual salary: 75000.0000

Personnel Actions (PA40)

A personnel action is a transaction that changes an employee's status:

Action What Happens
Hiring (action 10) Creates employee number, assigns to org unit, sets basic pay
Transfer (action 20) Moves employee to different cost center or department
Termination (action 30) Ends employment, calculates final pay
Rehire (action 40) Re-activates a former employee with new contract

Organizational Management

Organizational Management (OM) models the company structure. It uses four objects connected by relationships:

Object Example Relationships
Organizational Unit Sales Department Contains positions
Position Sales Manager — North Occupied by person
Job Regional Sales Manager Defines tasks, not specific to one org unit
Person John Smith Works in a position
* ABAP: Read organizational structure
DATA: lt_sobid TYPE TABLE OF sobid.

* Find all positions in org unit 'SALES-01'
CALL FUNCTION 'RH_STRUC_GET'
  EXPORTING
    act_otype       = 'O'
    act_objid       = 'SALES-01'
    act_wegid       = 'O_S_P'
  TABLES
    result_tab      = lt_sobid
  EXCEPTIONS
    no_plvar_found  = 1
    OTHERS          = 2.

LOOP AT lt_sobid ASSIGNING FIELD-SYMBOL(<ls_sobid>).
  WRITE: / 'Position:', <ls_sobid>-objid.
ENDLOOP.

* Output:
* Position: 50001001 (Sales Manager North)
* Position: 50001002 (Sales Rep East)
* Position: 50001003 (Sales Rep West)

Payroll Processing

Payroll is the most critical and complex HR process. Here is how it works:

Payroll Schema

SAP payroll uses schemas (drivers) and rules (functions). The main schema for most countries is D000.

The schema processes payroll in this order:

flowchart LR
  A[Master Data] --> B[Time Data]
  B --> C[Wage Types]
  C --> D[Gross Pay]
  D --> E[Tax Deductions]
  E --> F[Social Insurance]
  F --> G[Net Pay]
  G --> H[Bank Transfer File]
  H --> I[FI Posting]

Key Payroll Process

  1. Pre-payroll: Run time evaluation (PT60) to import worked hours and absences
  2. Payroll driver (PC00_M99_CALC): Calculate gross → net per employee
  3. Post-payroll: Release payroll results, apply to FI (PC00_M99_PAY)
  4. Bank transfer: Generate payment file for bank
* ABAP: Display payroll result for an employee
DATA: lt_rgdir TYPE TABLE OF pc261.

* Read payroll directory for a period
SELECT * FROM pc261
  WHERE pernr = '00001001'
    AND seqnr = '01'
    AND inper = '202601'
  INTO TABLE lt_rgdir.

LOOP AT lt_rgdir ASSIGNING FIELD-SYMBOL(<ls_rgdir>).
  WRITE: / 'Employee:', <ls_rgdir>-pernr,
         / 'Period:', <ls_rgdir>-paydt,
         / 'Gross:', <ls_rgdir>-gross CURRENCY 'USD',
         / 'Net:', <ls_rgdir>-net CURRENCY 'USD',
         / 'Tax:', <ls_rgdir>-tax CURRENCY 'USD',
         / 'Status:', <ls_rgdir>-payty.
ENDLOOP.

* Output:
* Employee: 00001001
* Period: 202601
* Gross: 6250.00
* Net: 4375.00
* Tax: 1250.00
* Status: A (released)

Time Management

Time Management tracks when employees work and when they don't.

Time Type Infotype How It Works
Planned working time 0007 Defines the standard work schedule
Absence 2001 Sick leave, vacation — deducts from entitlement
Attendance 2002 Overtime, on-call — adds additional pay
Time quotas 2006 Vacation entitlement, sick days remaining

Time Evaluation Schema (T000-T00)

Time evaluation processes employee clock-in/clock-out records, deduces overtime rules, and calculates absence quotas. It runs before payroll so the payroll schema has clean time data.

Recruitment

Recruitment manages the hiring pipeline:

Stage What Happens
Applicant applies Data entered via online form or recruiter enters it
Screening Applicant status = "in process", qualifications checked
Interview Status = "interview scheduled", results recorded
Offer Status = "offer made", salary proposal created
Hire Applicant becomes employee (PA40 action 10)

Security Angle

ABAP programs read HR infotypes through standard Open SQL. In terms of security, SAP HR contains the most sensitive data in any company — salaries, bank accounts, medical information, and personal identification numbers. Authorization is extremely granular:

  • Authorization object P_PERNR: Controls which employees a user can see (by position, org unit, or directly)
  • Authorization object P_ORGIN: Controls which infotypes a user can read or write
  • Payroll confidentiality: Payroll results are encrypted in the database
  • Audit trail: Every HR infotype change is logged in table CDHDR

Durga Antivirus Pro uses HR-inspired data classification — salary data is treated as "PII critical" with the same access restrictions SAP HCM applies: only authorized payroll admins can view it, and every access is logged.

Common Errors

1. Payroll Driver Crashes Mid-Run

A payroll schema error (like a missing rule) stops payroll for all employees. Check the payroll log (PC00_M99_ERR) for the specific error and fix the rule before re-running.

2. Retroactive Accounting Discrepancy

If you change an employee's salary after payroll has run, the next payroll run applies retroactive accounting. The difference is calculated automatically but may cause unexpected adjustments in the current period.

3. Time Evaluation Doesn't Match Payroll

Time evaluation (PT60) must complete successfully before payroll. If the status is "not evaluated," payroll runs with zero time data, resulting in underpayment.

4. OM Relationship Inconsistency

If a position is not assigned to an org unit, you cannot hire someone into that position via PA40. Fix the relationship in PPOME first.

5. Missing Wage Type Configuration

A new allowance type was added but the payroll schema doesn't process it. The wage type appears in master data but has zero effect on the paycheck. Add processing rules to the schema.

6. Incorrect Tax Calculation for Cross-Border Employees

An employee lives in one country but works in another. SAP HR needs country-specific tax rules configured, plus the right "tax jurisdiction" code in infotype 0012.

Practice Questions

  1. What is an infotype in SAP HR? A four-digit data group that stores related employee information, such as personal data (0002), basic pay (0008), or absences (2001).

  2. What transaction code is used to hire an employee? PA40 with action type 10 (Hiring). It creates the employee number and triggers required infotype entry screens.

  3. How does SAP HR integrate with FI? Payroll results are posted to FI as cost center expenses. Salary expense (debit) and bank payable (credit) are generated from the payroll posting run.

  4. What is the difference between a position and a job in OM? A position is a specific instance within one org unit. A job is a classification that can apply across many positions. Example: "Sales Manager North" is a position; "Regional Sales Manager" is a job.

  5. What is a payroll schema? A sequence of rules and functions that calculates an employee's gross pay, deductions, and net pay. Schema D000 is the standard for most countries.

Challenge: An employee in Germany transfers from development (cost center CC-DEV) to marketing (cost center CC-MKT) on the 15th of the month. Payroll runs for the full month on the 25th. How does SAP split the salary cost between the two cost centers? What configuration controls this?

Real-World Task: Set up a new employee in SAP HCM. Create an organizational unit "IT Department" with three positions. Hire a senior developer into position "Lead Developer — IT" with an annual salary of $95,000, standard working time 40 hours/week, and vacation entitlement of 20 days.

What is the difference between SAP HR and SAP HCM?

SAP HR is the older name for the module, from SAP ECC. SAP HCM is the modern name in SAP S/4HANA. Functionality is the same — the names are used interchangeably in most contexts.

How does SAP HR handle multi-country payroll?

SAP HR uses country-specific sub-modules with localized payroll schemas. Each country has its own tax rules, social insurance calculations, and legal reporting. One payroll run can process all countries simultaneously.

Can SAP HR integrate with third-party time clocks?

Yes. SAP HR supports cross-application time sheets (CATS) that can import clock-in data from any system via standard BAPIs, RFC, or file-based batch input.

What's Next

Tutorial What You'll Learn
SAP Overview — Complete Guide Foundational SAP ERP concepts
SAP FICO — Finance Guide How FI posts HR payroll costs
SAP ABAP Programming Write ABAP programs for custom HR reports

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Updated 2026-06-21.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro