Operations VARST, HRS, and ADDDB

Definition

Operations VARST, HRS, and ADDDB are used frequently in time evaluation. They illustrate the options available to you for customizing personnel calculation rules.

Structure

Operation VARST

Operation VARST is only used as a decision operation. You can use it to query general status fields (values from tables, infotypes, data on the weekday, and so on) or to enter them in the variable key of the personnel calculation rule.

Operation HRS

Operation HRS processes the number of hours field. You can use it to enter a particular value in the number of hours field and/or provide values from tables, infotypes, results from tables SALDO, TES, and so on.

If you loop through table TIP, the number of hours field is filled with the number of hours of the TIP entry. If the function used does not loop through table TIP, the number of hours field has the same value as it did previously.

You can use operation HRS as a decision operation or as an operation to perform calculations and form balances.

The operation comprises four parts:

Operation HRSOYZZZZ

HRS

O

Y

ZZZZZ

Operation

Operator

Origin indicator of operand

Operand

The operator indicates what should happen with the number of hours field. You can use it to, for example:
  • Set the number of hours field to the same value as a particular table value

  • Deduct the number of hours field from or add it to a time type

  • Multiply the number of hours field by a value

  • Compare the number of hours field with a value

You can use the origin indicator of the operand to make the following available:

  • Values from internal tables

  • Values from tables

  • Values from infotypes

  • Employee’s age

  • System fields

  • Result of the last HRS operation

You can use a time type, number of hours or a field name as operands .

Operation ADDDB

Operation ADDDB is an operation that is used to store values in table TES. It enters the value of the number of hours field for the specified time type in table TES (day balances).

Operation ADDDB is made up of three parts:

Operation ADDDBxxxxy

Operation

Time type

Control indicator

ADDDB

xxxxx

T = planned hours

enters planned working hours from daily work schedule in a time type

Z = replacement

overwrites the value set using the value of operation HRS

– = subtraction

subtracts the value set using operation HRS from the value in the number field of the time type

BLANK = Addition

adds the value set using operation HRS to the value in the number field of the time type

Example

The value of the number of hours field in time type 9999 is 5 hours.

Time type 9999 = 5.00

HRS = 4.00

ADDDB9999Z

The number of hours field of time type 9999 is overwritten with the new value

9999 = 4.00

HRS = 4.00

ADDDB9999

The new value is added to the value in the number of hours field of the time type

9999 = 9.00

HRS = 4.00

ADDDB9999-

The new value is subtracted from the value in the number of hours field of the time type

9999 = 1.00

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.