Вы находитесь на странице: 1из 45

Increase the Accuracy of Time

Management Using Custom


Schemas and Rules

Cindy Lumbert
HR Focal Point
Produced by Wellesley Information Services,
LLC, publisher of SAPinsider. 2015 Wellesley
Information Services. All rights reserved.

In This Session

We will walk through a simple configuration


This simple configuration will be instantly re-useable
We will walk through a complex configuration
Complex use of counters will allow checking before and after a
holiday
This is re-useable configuration for requirements that have
become common practice
We will review how this configuration integrates and re-uses SAP
Standard

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

Overview

Time Evaluation is complex


Make it simple by using the standard
Make minor adjustments to make major changes
Copying standard functionality is expected and encouraged
Most of what you will see today started as standard
Time Evaluation works
Use what works the way it was intended
Dont recreate the wheel with Personnel Calculation Rules
(PCRs) when the standard uses configuration
Use Simple PCRs to interact with the standard configuration

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

Functions and Operations (Within the Rules


of Time Evaluation)

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

Functions and Operations (Within the Rules


of Time Evaluation) (cont.)

Operation OUTWP
Operation OUTWP is only used as a decision operation
You can use it to query work center data or to enter them
in the variable key of the personnel calculation rule
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 ADDZL
Operation ADDZL adds the current number field to the internal
table ZL
6

Functions and Operations (Within the Rules


of Time Evaluation) (cont.)

Function IF
Execute Function If a Condition Is Fulfilled
Function COPY
Copies front-end sub-schema
Function PTIP
Process Time Data Table TIP
Function ACTIO
Rule-controlled execution of an action

Functions and Operations (Within the Rules


of Time Evaluation) (cont.)

Help for functions and operations


Transaction PDSY
Click F1 on any function or operation

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

Writing a Simple Personnel Calculation


Rule (PCR)

California Overtime
A new Personnel Calculation Rule and a Sub-Schema have
been incorporated here to distinguish Overtime Rules for
California vs. the rest of the U.S.

This is a Rule to determine


a qualifying condition

10

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

California Overtime
A new Personnel Calculation Rule and a Sub-Schema have
been incorporated here to distinguish Overtime Rules for
California vs. the rest of the U.S. (cont.)

This is a sub-schema to
calculate overtime

11

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

PCR = ZCAL
This Rule verifies that we are looking at employees in a
California Personnel Area

OUTWPEMPLR asks what


is the value in Work
Contract field

12

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

PCR = ZCAL
This Rule verifies that we are looking at employees in a
California Personnel Area (cont.)

OUTWPPLANT asks what


is the value in Personnel
Area field

13

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

Sub-Schema = ZW15
This contains 2 modified rules for further processing of
overtime after 8 or 12 hours
This is a copy of standard sub-schema TW15

14

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

Sub-Schema = ZW15
This contains 2 modified rules for further processing of
overtime after 8 or 12 hours
This is a copy of standard sub-schema TW15 (cont.)

This is a Rule to determine


a qualifying condition
15

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

Sub-Schema = ZW15
This contains 2 modified rules for further processing of
overtime after 8 or 12 hours
This is a copy of standard sub-schema TW15 (cont.)

This is a Rule that executes


a calculation
16

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

PCR = ZOTC
This rule distinguishes working day vs. holidays or days off for
8 hour daily overtime
VARSTDAYTY asks what is
the value in Day Type field
such as working day, day
off, holiday

17

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

PCR = ZOTC
This rule distinguishes working day vs. holidays or days off for
8 hour daily overtime (cont.)

VARSTFREE asks whether


we are scheduled to work
this day
18

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

PCR = ZO02
This rule determines daily double time. It is a modified copy of
the delivered daily over time rule.
Time Type and Processing
Type are changed for new
processing

19

Writing a Simple Personnel Calculation


Rule (PCR) (cont.)

The result of these rules is:


We qualify whether our employee is in the appropriate
Personnel Area
We determine what type of day it is so we can pay OT over 8
hours in the day
We calculate time over 12 hours in a day so we can pay double
time over 12 hours
Therefore we satisfy California Overtime rules

20

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

21

Writing a Complex Series of PCRs

Main Schema
New Personnel Calculation Rules have been incorporated here
to query time worked before and after a holiday
This is a Rule to determine
a qualifying condition

22

Writing a Complex Series of PCRs (cont.)

Main Schema
New Personnel Calculation Rules have been incorporated here
to query time worked before and after a holiday (cont.)
This is a Rule that checks
whether we worked the day
after the holiday

23

Writing a Complex Series of PCRs (cont.)

Main Schema
New Personnel Calculation Rules have been incorporated here
to query time worked before and after a holiday (cont.)

This is a Rule that has


further processing for the
day after a holiday

24

Writing a Complex Series of PCRs (cont.)

PCR=ZHOL
This rules verifies that the employee worked the day before the
Holiday
Here we check conditions
today vs. whether we set a
counter indicating we did
work the day before the
holiday

25

Writing a Complex Series of PCRs (cont.)

PCR=ZHOL
This rules verifies that the employee worked the day before the
Holiday (cont.)
Then we check if the
counter is set indicating we
worked the day before the
holiday

26

Writing a Complex Series of PCRs (cont.)

PCR=ZHOL
This rules verifies that the employee worked the day before the
Holiday (cont.)

And if we had an excused


absence, we move the
counter forward

27

Writing a Complex Series of PCRs (cont.)

PCR=ZHO2
This rule checks if we were paid for the Holiday
Here we check if its a
holiday today and if the
employee was paid the
holiday wage type

28

Writing a Complex Series of PCRs (cont.)

PCR=ZHO4
This rule directs processing to an additional rule if today is not
a holiday or continues the counter if it is a holiday

Here we check if its a


holiday today and moves
the holiday hours paid
counter along for future
processing

29

Writing a Complex Series of PCRs (cont.)

PCR=ZHO3
The combination of ZHO4 and ZHO3 verify if we worked the day
after the Holiday and if we already got paid the Holiday
If we got paid for the Holiday but then did not work the
following day after the Holiday we reverse the Holiday hours

These absence types are


considered excused and
therefore are considered as
worked on the day before
and after the holiday
30

Writing a Complex Personnel Calculation Rule (PCR)

The result of these rules is:


We look at the day before the holiday to make sure we pay the
holiday time
We pay the holiday time if appropriate
We check the day after the holiday using counters to get past
multiple holidays and weekend(or non-working) days
We allow the holiday to be paid or reverse the pay if we did not
work the next working day after the holiday
Therefore we satisfy worked before/after the holiday criteria

31

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

32

How to Integrate with SAP Standard

Much of what youve seen today integrates directly with SAP


standard or is a copy of standard
Standard
Modified

On the left are sections we reuse.


On the right is what we modified.

33

How to Integrate with SAP Standard (cont.)

Much of what youve seen today integrates directly with SAP


standard or is a copy of standard (cont.)
Standard
Modified

On the left are sections we reuse. On the right is what we modified.

34

How to Integrate with SAP Standard (cont.)

Much of what youve seen today integrates directly with SAP


standard or is a copy of standard (cont.)
Standard
Modified

On the left are delivered values.


On the right is what we modified.

35

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

36

Using Custom Functions and Operations

Use a custom function or operation when:


Standard does not meet the requirement
Standard is overly complex
Standard may not apply to all scenarios
Custom code is straightforward

37

Using Custom Functions and Operations

The examples below illustrate determining an anniversary date


Standard depends on storing balances over long periods
Standard
Custom

On the left, standard operations make this complex.


On the right, a custom operation simplifies the logic.

38

What Well Cover

Overview
Functions and operations within the rules of time evaluation
Writing a simple Personnel Calculation Rule (PCR)
Writing a complex series of PCRs
How to integrate with SAP standard
Using custom functions and operations
Wrap-up

39

Where to Find More Information

http://help.sap.com/erp2005_ehp_07/helpdata/en/da/34e153a21742
4de10000000a174cb4/content.htm?frameset=/en/0e/36e153a21742
4de10000000a174cb4/frameset.htm&current_toc=/en/0e/36e153a2
17424de10000000a174cb4/plain.htm&node_id=301
SAP Help Portal Personnel Calculation Rules and Operations
in Time Evaluation
http://help.sap.com/erp2005_ehp_07/helpdata/en/e6/34e153a21742
4de10000000a174cb4/content.htm?frameset=/en/da/34e153a21742
4de10000000a174cb4/frameset.htm&current_toc=/en/0e/36e153a2
17424de10000000a174cb4/plain.htm&node_id=302
SAP Help Portal Operations VARST, HRS, and ADDDB

40

Where to Find More Information (cont.)

http://help.sap.com/erp2005_ehp_03/helpdata/EN/8a/98550346c41
1d189470000e829fbbd/content.htm?frameset=/en/8a/9854c246c41
1d189470000e829fbbd/frameset.htm
SAP Help Portal Using Functions and Operations to Edit Work
Tables
http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=62259
Time Management (Schema, PCR, Functions and Operations)
(SAP Community Network, February 2013).

41

7 Key Points to Take Home

Use standard configuration first


Copy standard configuration next
When using rules, do as little as possible then let standard
configuration take over
Copy standard rules and modify to your needs
Use the system, automation takes manual entry errors out of the
equation
Know your operations
Know your functions

42

Your Turn!

How to contact me:


Cindy Lumbert
cindy.lumbert@hrfocalpoint.com
Please remember to complete your session evaluation
43

Disclaimer
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or
an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective
companies. Wellesley Information Services is neither owned nor controlled by SAP SE.

44

Вам также может понравиться