0% found this document useful (0 votes)
55 views4 pages

Operations VARST, HRS, and ADDDB

Uploaded by

pankaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views4 pages

Operations VARST, HRS, and ADDDB

Uploaded by

pankaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Processing the Number of Hours Field

Object

Additional operation documentation

Explanation

Variable1 o Operator

= Equals

+ Addition

- Subtraction

* Multiplication

/ Division

% Percentage

< Minimum formation

> Maximum formation

S Subtraction to 0

(not negative)

? Comparison with the number of hours field

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.
Example
D VARSTPRSNT : Decision operation (indicator D): Was the employee at
work on the day in question?
Depending on whether or not there is an attendance record for the day, a Y or
an N is entered in the variable key and processing continues accordingly.
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
Example
HRS=0.00: This operation sets the value of the number of hours field to zero.
HRS*0.5: This operation halves the value in the number of hours field.
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
Example
HRS=S : This operation is used to fill the number of hours field with the value
of the planned working hours in the daily work schedule.

The origin indicator of the operand is not mandatory for operation HRS. You
can enter values directly (see above) and use them to redetermine the value
in the number of hours field.
You can use a time type, number of hours or a field name as operands .
Example
HRS=D0041 : Time type 0041 (overtime to be compensated) is read from
table TES.
D HRS?CGLMAX : This operation compares the number of hours field - the
monthly flextime balance in this case - with constant flextime maximum from
the Payroll Constants table (T511K). Operation HRS is used here as a
decision operation.
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 Control
type indicator

ADDDB xxxxx T = planned enters planned working hours from daily work schedule in
hours a time type

Z= sets time type to zero


initialization

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

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

The value of the number of hours field in time type 9999 is 5 hours.
Time type 9999 = 5.00
HRS = ADDDB9999Z
4.00 The number of hours field of time type 9999 is overwritten with the new value
9999 = 4.00

HRS = ADDDB9999
4.00 The new value is added to the value in the number of hours field of the time type
9999 = 9.00

HRS = ADDDB9999-
4.00 The new value is subtracted from the value in the number of hours field of the time
type
9999 = 1.00

You might also like