VARST Operation In SAP HR


VARST Operation In SAP HR

Understanding the VARST Operation in SAP HR

SAP HR (Human Resources) streamlines many processes, including the complex world of time management and payroll calculations. An essential tool within this system is the VARST operation, which lets you manipulate and read values from different time management variables.

What is the VARST Operation?

VARST stands for “Variable Storage.” Here’s how it functions:

  1. Access and Retrieval: Think of VARST as a key unlocking a vast storage locker containing various time-related data points. It enables you to access information such as:
    • Planned working hours
    • Employee attendance records
    • Holiday calendars
    • Work schedule deviations
  2. Manipulation: VARST can modify the values it retrieves. This means you can use it to perform calculations, flag inconsistencies, or trigger different actions based on the data.

Critical Use Cases of VARST

The VARST operation becomes invaluable when writing Personnel Calculation Rules (PCRs) within SAP HR. Here are some common examples of how this works in practice:

  • Identifying Scheduled Days Off: Use VARSTFREE to determine if a particular day is a planned working day or a scheduled day off for an employee.
  • Determining Day Types: Use VARSTDAYTYP to ascertain whether a day is a regular workday, a public holiday, or another specific designation.
  • Calculating Overtime: VARST can retrieve planned hours and actual attendance, allowing you to calculate overtime hours accrued.
  • Custom Logic: VARST allows for the creation of highly customized rules that can address specific company policies or complex scenarios.

Example: A Simple Overtime Calculation

Let’s say you want to write a PCR to calculate overtime if an employee has worked more than their planned hours:

* **** <– Rule name

D HRS=YDAM16 <– Retrieve planned daily hours

D HRS=IDAHRS <– Retrieve actual daily hours

D HRS- <– Subtract planned from actual to find the difference (potential overtime) 

D MULTI NRA <– Multiply the difference by the overtime rate 

D ADDWT * <– Add the overtime pay to the wage type

Beyond the Basics

The VARST operation has numerous sub-functions (like the ones used above) that allow for even more granular control over your time management processes. Here are some helpful resources:

  • SAP Help Portal: Provides detailed documentation on VARST and its sub-functions: l
  • SAP Community Forums: Engage with other SAP HR users and experts for examples and troubleshooting: 

You can find more information about  SAP  HR in this  SAP HR Link



Unogeeks is the No.1 IT Training Institute for SAP HR Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on  SAP  HR here – SAP HR Blogs

You can check out our Best In Class SAP HR Details here – SAP HR Training

💬 Follow & Connect with us:


For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at:

Our Website ➜

Follow us:





Leave a Reply

Your email address will not be published. Required fields are marked *