0% found this document useful (0 votes)
155 views41 pages

Determination of First C... in & Last Cloc PDF

C lient was installing time rec ording terminals whic h were not SAP CC1 certified. Only Clock In (time event type P10) and cloc k out (time event Type P20) were required to be recorded.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views41 pages

Determination of First C... in & Last Cloc PDF

C lient was installing time rec ording terminals whic h were not SAP CC1 certified. Only Clock In (time event type P10) and cloc k out (time event Type P20) were required to be recorded.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Getting Started New sletters

Hi, Gues t

Log On

Products

Services & Support

About SCN

Downloads

Indus tries

Training & Education

Partners hip

Developer Center

Lines of Business

Univers ity Alliances

Events & Webinars

Innovation

Determination of First Clock In & Last Clock


Out in Positive Time Evaluation

Version 5

created by Vivek Barnw al on Jul 18, 2013 12:27 PM, last modified by Vivek Barnw al on Sep 29, 2014 10:03 AM
1

Share

Tw e et

Like

Store

Search the Community

Join Us

Client Situation
Our c lient requirement was to implement SAP HR Positive Time Management solution to record
and evaluate the ac tual times of their blue collar workers. The c lient was installing time
rec ording terminals whic h were not SAP CC1 certified. Only Clock In (Time Event Type P10)
and Cloc k Out (Time Event Type P20) were required to be recorded.
The fac tory/plant had four produc tion shops. Eac h produc tion shop had two time rec ording
terminals mounted on the wall - one for cloc k in and another for c lock out. These time
rec ording terminals didn't have any unique way to spec ify whether a time punc hed at time
rec ording terminal is "cloc k in" or "c lock out". Henc e, there was a board mounted with the
sign "Cloc k In" above "Cloc k In Time Recording Terminal" and with the sign "Clock Out" above
"Cloc k Out Time Rec ording Terminal". Some employees had ac cess to all produc tion shops and
some had ac c ess to few of them only. An employee c ould work in multiple production shops in
the same shift. Eac h time an employee entered into a production shop, it was expec ted that
he cloc ked in at the "Cloc k In Time Rec ording Terminal" while entering into the produc tion
shop and cloc ked out at the "Cloc k Out Time Recording Terminal" while leaving the produc tion
shop.
There were no turnstiles at the entranc e of production shops and hence, there was a high
c hance that employees may forget to c loc k in or c loc k out while entering or leaving the
produc tion shops. Henc e, we c ould have sc enarios where an employee has a c loc k in data
onc e and c loc k out data multiple times for the same shift.
For evaluation purposes, c lient wanted us to c onsider the first c loc k in and the last c loc k out
sinc e it was difficult to enforc e employees to cloc k in while entering and cloc k out while
leaving the production shop in absence of a turnstile. If the first cloc k in was missing, then it
should be reported as a missing c lock in. Also, if the last cloc k out was missing, then it should
be reported as a missing cloc k out.
The time rec ording system would send a .txt file with all the time events (P10 & P20) data
rec orded for a shift for all employees in that shift in a predefined format to SAP R/3. These
time events would be uploaded in IT2011 (Table TEVEN).
Henc e, if the time events were recorded as shown in the table below, the first c lock in will be
blank and the last c lock out will be 18:00:00.
Date

P10

P20

03- Jan-2012

14:00:00

03- Jan-2012

14:15:00

18:00:00

There was no requirement to rec ord break times and employees c ould c lock in/c loc k out
multiples times for the same shift. The break time would be considered from the daily work
sc hedule.

Failed Solution Approach


For quite some time, this requirement was giving me sleepless nights. There were various
approac hes whic h I was trying out but none of them gave the desired results.
One suc h approac h tried by me was to use operation VARST to read the first time pair
(VARSTFIRST) and then use operation HRS=PBEG to capture the no. of hours and enter it

Activity
Brow se

Communications

Actions

into a time type.


Then use operation VARST to read the last time pair (VARSTLAST) and use operation
HRS=PEND to capture the no. of hours and enter it into another time type.
Using the time types, I would modify the start time and end time using operation FILLP for
the first time pair and ignore the remaining time pairs.
On the fac e of it, this solution looked good. However, it had inherent shortc omings.
Please refer the below sc reenshot for time events in IT2011 to understand the shortcomings.
The employee recorded a c loc k in at 08:00:00 and then cloc k outs at 10:30:00, 14:00:00
and 18:00:00 on 03- Jan-12.

When the time evaluation is run, the time pairs formed get sorted as shown in the sc reenshot
below:

SAP has sorted all the time pairs first by From and then by To in Table TIP. Hence, the
PBEG of first time pair comes out to be blank and the PEND of the last time pair comes out to
be 10.5000. However, the real time sc enario demands that the first c lock in should be
08.0000 and the last c lock out should be 18.0000. Henc e, this solution approach failed.

Solution Logic
I realized that I was not having clarity of thought on the logic to develop this solution and
henc e, the various attempts resulted in failure. Finally, I thought to myself that if I have to
give this requirement to an ABAPer, what would be the requirement I would give to develop a

program to find the first c loc k in and last cloc k out. Also, if the first c lock in or last cloc k out
was missing, the system would report that.
After some thinking, I came up with the below logic for ABAPer for determining the first cloc k
in and last clock out:
Find all the recorded clock ins for a shift from the time pairs formed in Table TIP from
func tion P2011. Please note the word recorded whic h I have used. It means that I am
trying to find earliest or latest rec orded times from the time events that have ac tually got
rec orded at the time rec ording terminals.
Out of the rec orded cloc k ins, find the earliest recorded clock in and latest recorded
clock in.
Find all the recorded clock outs for the shift from the time pairs formed in Table TIP from
func tion P2011.
Out of this rec orded c loc k outs, find the earliest recorded clock out and latest
recorded clock out.
Then compare the earliest recorded clock in with earliest recorded clock out. If the
earliest recorded c loc k in is less than the earliest rec orded cloc k out, then the earliest
rec orded c loc k in is the first clock in of the shift and should be c alled P10. If the earliest
rec orded c lock in is greater than the earliest rec orded c lock out, then there is a missing
c loc k in. Henc e, the first c loc k in of the shift should be blank.
Then compare the latest recorded clock out with the latest recorded clock in. If the
latest rec orded c loc k out is greater than the latest rec orded c loc k in, then the latest
rec orded c loc k out is the last c lock out of the shift and should be c alled P20. If the latest
rec orded c loc k out is less than the latest rec orded cloc k in, then there is a missing cloc k
out. Hence, the last c loc k out of the shift should be blank.
Let us now test this logic to the time events in our failed solution approach. Below table
shows the time pairs formed in Table TIP from function P2011.

Earliest Recorded Cloc k In

08.0000

Latest Rec orded Cloc k In

08.0000

Earliest Recorded Cloc k Out =

10.5000

Latest Rec orded Cloc k Out

18.0000

We see that the earliest recorded c loc k in (08.0000) is less than the earliest rec orded
c loc k out (10.5000) and henc e, the earliest recorded cloc k in is the first c loc k in of the
shift. This is c orrect.
The latest recorded c lock out (18.0000) is greater than the latest recorded c lock in
(08.0000) and hence, the latest rec orded cloc k out is the last c loc k out of the shift. This is
c orrec t too.
Henc e, the above solution logic proved c orrec t and I built c ustom PCRs and time types to
fulfill the requirement based on this logic .

Solution Design
There are two key tables whic h we would need to maintain to build this solution.
TPT_PAIRSTAT2
V_T705B

Pair Formation: Status Table


PDC Proc essing Statuses

Table TPT_PAIRSTAT2 determines how time pairs are formed in Table TIP.

Below is a partial sc reenshot of the Pair Formation Status Table.

From State: At any time, an employee has a state. This is the state in whic h the employee
is in before the time event happens.
Time Event Type: The field shows the time event rec orded when the employee is in a given
state. It will c hange the state of the employee from From state to To State.
Unique Time Event Type: Time Event Type P01 c an be used to rec ord both cloc k in/cloc k
out. If the From state of employee is absent before c loc k in and the Time Event Type is
P01, then it means that the employee has cloc ked in. In suc h a c ase, the value of Unique
time event type will be P10. This interpretation is defined in this field. Where no unique
interpretation is required, the value of time event type is same as unique time event type. As
shown in the sc reenshot above, the value of both time event type and unique time event
type are P10 for From state Absent before Cloc k In bec ause no unique interpretation is
needed.
To State: This is the state at whic h employee reac hes from From State onc e the time
event type is rec orded.
Continue: This field is used for interim postings. Let us say that there is an interim posting
between c loc k out and cloc k in and we would like to have two c omplete pairs one from
c loc k out to interim posting and another from interim posting to cloc k in. The first two events
form the first time pair and the third event ends the new time pair taking the end event of
previous time pair as the start event of the new time pair.
Closed: Time pairs are formed by a starting time event and an ending time event. However,
if a time event is missing, then the pair wont get formed or if there are multiple time events,
incorrec t time pairs may be formed. To avoid any errors, this c hec k box should be checked
for sc enarios where the time event type is the ending time event and there is a missing
starting time event type. This implies that the time event should c reate a new closed time
pair only with To time and the From time will be blank. An example of this sc enario is
where c loc k in is missing and c loc k out is rec orded.
Close: This field is meant to close an open time pair if it exists. If the employee is at work
and a time event is rec orded and this field is checked, then the pair should be c losed. Fields
Close and Closed are mutually exclusive. Both of them c ant be maintained at the same time
for the same states and time event type.
New: This field means that a new time pair should be started.
Customer Adjustment: This field is used to spec ify PDC Proc essing Status and its reac tion
maintained in Table V_T705B.
Error: If the pair formation is not error free, it gives an error message in time evaluation run
c orresponding to the error message number maintained here.
Pair Formation Status: This field gives the status of the time pair formed whether it is
error free or not or c loc k in is missing or c lock out is missing etc .
Let us now understand the PDC Proc essing Statuses Table V_T705B.
This table spec ifies the actions to be taken in situations where time pairs c ant be formed

bec ause the time events data dont make sense.

PSGrp: This is Grouping of Personnel Subareas for Time Recording for whic h the same time
types, time transfer spec ific ations, ac cess c ontrol groups, and message types are defined.
PDC Processing Status: This field displays the PDC Proc essing Status whic h defines the
behavior to be taken into ac count during time pair formation.
Processing Status Text: This field displays the desc ription of the PDC Proc essing Status.
Start Date: This field displays the start date from whic h the PDC Proc essing Status is valid.
End Date: This field displays the end date till whic h the PDC Proc essing Status is valid.
Reaction: The return c ode in field reac tion will spec ify the reac tions to be taken for PDC
Proc essing Status.
Let us now study the values relevant for our sc enarios from Pair Formation Status Table and
the relevant values (C02 & C11) from PDC Proc essing Statuses Table.
TPT_PAIRSTAT2 Sc reenshot A This shows the values in the table relevant for our
sc enarios.

V_T705B Sc reenshot B The highlighted rows in the table show the values relevant for our
sc enarios.

Let us refer to the 2nd and 6th rows in Table TPT_PAIRSTAT2 Sc reenshot A. In both cases,
employee was not at work and there was a c lock out recorded. The system has to c reate a
time pair with the cloc k out time event bec ause the field Closed is checked. The Customer

adjustment field has PDC Proc essing Status as C02 and the error message 21 (Clock in
Missing) will get generated. The reaction field in Table V_T705B Screenshot B for PDC
Proc essing Status C02 should be left blank to allow open time pair c reation with only cloc k
out time in Table TIP from function P2011. The time pair will have From field blank and To
field with clock out time.
The other possible reac tion value for PDC Proc essing Status C02 is 1. If 1 is maintained, then
it doesnt allow even c reation of open time pair with just c loc k out data.
Below are the examples of system behavior with reac tion as blank and as 1 for PDC
Proc essing Status C02.
PDC Processing Status Scenario 1: Reaction indic ator is blank for PDC Proc essing Status
C02.
V_T705B

IT2011

P2011 Open Pair Type gets created with c loc k out data and c loc k in is missing.

Time Evaluation Result The time evaluation fails with error that c lock in is missing.

PDC Processing Status Scenario 2: Reaction indicator is 1 for PDC Proc essing Status C02.
V_T705B

IT2011

Time Evaluation Result The time evaluation fails at PCR TD20 which points out that time
pair is not error free and has c loc k in missing. It doesnt allow the system to reach func tion
P2011 whic h c reates open time pair with c loc k out time. Hence, this option is ruled out.

Let us refer to the 3rd row in Table TPT_PAIRSTAT2 Screenshot A. The employee was at
work and a c loc k in was recorded. The field Close is checked and henc e, it will c lose the
open pair. Also, the field New is checked and hence, it will start the c reation of a new time
pair. The PDC Processing Status in field Customer Adjustment is C11. The reaction indic ator
for PDC Processing Status C11 is 1. If the reac tion is 1, the system will end ongoing time pair
with the current c lock in time and also start a new time pair with the same c loc k in time. If
the reac tion for PDC Proc essing Status is blank, the system will give an error that c loc k in is
missing.
PDC Processing Status Scenario 3: Reaction indicator is 1 for PDC Proc essing Status C11.
V_T705B

IT2011 Employee is at work (Cloc k In 08:00:00) and cloc ks in again (14:00:00). It means
that there is a missing cloc k out between two c loc k ins.

P2011 There wasnt any cloc k out at 14.0000. However, the system c loses the existing
open pair with the cloc k in time and starts a new time pair with the same cloc k in time. This
is due to PDC Proc essing Status C11 and its return code as 1.

Time Evaluation Result The time evaluation run is suc cessful.

PDC Processing Status Scenario 4: Reaction indic ator is blank for PDC Proc essing Status
C11.
V_T705B

IT2011 Employee is at work (Cloc k In 08:00:00) and cloc ks in again (14:00:00). It means
that there is a missing cloc k out between two c loc k ins.

Time Evaluation Result The time evaluation fails at PCR TD20 and generates error during
pair formation. It doesnt allow system to reac h func tion P2011 for processing. Hence, this
option is ruled out.

After maintaining Pair Formation Status Table - TPT_PAIRSTAT2 and PDC Processing Statuses
Table - V_T705B, the next step is to c reate time types. Below are the daily time types which
are needed.
Earliest Recorded Cloc k In ZVB1
Latest Recorded Cloc k In ZVB2
Earliest Recorded Cloc k Out ZVB3
Latest Recorded Cloc k Out ZVB4
First Clock In ZVB5
Last Cloc k Out ZVB6
Go to TCode SM30 > Table V_T555A.
ZVB1 Earliest Rec orded Cloc k In

ZVB2 Latest Rec orded Cloc k In

ZVB3 Earliest Rec orded Cloc k Out

ZVB4 Latest Rec orded Cloc k Out

ZVB5 First Cloc k In

ZVB6 Last Clock Out

After creating the six daily time types, I created five PCRs as mentioned below:
ZVB4

Find Earliest Rec orded Cloc k In and Latest Rec orded Clock In

ZVB5

Find Earliest Rec orded Cloc k Out and Latest Rec orded Cloc k Out

ZVB6

Determine First Cloc k In

ZVB7

Determine Last Clock Out

ZVB9

Form Time Pair in TIP using First Clock In & Last Cloc k Out

Let us now go inside eac h PCR to understand its func tionality.

PCR ZVB4 The objec tive of PCR ZVB4 is to find the earliest rec orded c lock in and latest
rec orded c loc k in in a shift and feed the values in daily time types ZVB1 (earliest rec orded
c loc k in) and ZVB2 (latest rec orded cloc k in).
If no c lock in has been rec orded, then the daily time types ZVB1 and ZVB2 wont get
generated. If only one cloc k in has been recorded, then both ZVB1 and ZVB2 will have the
same value.
Below is a screenshot of PCR ZVB4.

Let us see how time pairs in TIP table get processed through PCR ZVB4.
The PCR c hec ks if start time exists in time pair or not using OUTTPEXBTM. If start time
doesnt exist (N), the time pair is moved to output table using COLOP *. If all time pairs of
the shift dont have start time, then time types ZVB1 and ZVB2 arent c reated. Henc e, the
values of ZVB1 and ZVB2 are 0.
If the start time exists (Y) in time pair, the value of time type ZVB1 (Earliest Rec orded
Clock In) is read using HRS=DZVB1. If it is the first time pair with start time and getting
proc essed in the rule, the value of ZVB1 will be 0. If it is not the first time pair with start
time, then there will be some value in time type ZVB1.
After reading the value of time type ZVB1, it is c ompared with 0 using HRS?0. If the value
of ZVB1 is not greater than 0, it is proc essed under * and the start time of the time pair is
read using HRS=PBEG. The start time is added to time types ZVB1 (earliest recorded cloc k
in) and ZVB2 (latest recorded c lock in) and the time pair is moved to output table using
COLOP *.
Let us assume that the first time pair with start time had start time as 10:00:00. Henc e,
the value of ZVB1 and ZVB2 will be 10.0000. Now let us assume that the next time pair
with start time has start time as 08:00:00. This time pair will get proc essed through Y
(OUTTPEXBTM). The value of time type ZVB1 is read using HRS=DZVB1 (ZVB1 = 10.0000).

This value is c ompared with 0 using HRS?0 and since the value of ZVB1 (10.0000) is
greater than 0, the time pair gets proc essed under >. Then the start time of the time pair
is read using HRS=PBEG (HRS = 08.0000) and it is compared with earliest recorded cloc k
in time type ZVB1 (10.0000) using HRS?DZVB1. Sinc e the value of HRS=PBEB (08.0000) is
not greater than ZVB1 (10.0000), the start time of this time pair is the new earliest
rec orded c loc k in for this shift and gets proc essed under *. Hence, the start time
(08.0000) of the c urrent time pair is fed into daily time type ZVB1 after removing its old
value 10.0000 using ADDDBZVB1Z and the time pair is moved to output table using COLOP
*.
Currently, the value of ZVB1 and ZVB2 are 08.0000 and 10.0000 respec tively. Let us
assume now that the next time pair with start time has start time as 15:00:00. This time
pair will get proc essed through Y (OUTTPEXBTM). The value of time type ZVB1 is read
using HRS=DZVB1 (ZVB1 = 08.0000). This value is compared with 0 using HRS?0 and since
the value of ZVB1 (08.0000) is greater than 0, the time pair gets processed under >. Then
the start time of the time pair is read using HRS=PBEG (HRS = 15.0000) and it is compared
with earliest rec orded cloc k in time type ZVB1 (08.0000) using HRS?DZVB1. Sinc e the
value of HRS=PBEG (15.0000) is greater than earliest recorded c loc k in time type ZVB1
(08.0000), the time pair gets processed under >. Then the value of HRS=PBEG (15.0000) is
c ompared with latest recorded c loc k in time type ZVB2 (10.0000). Sinc e the value of
HRS=PBEB (15.0000) is greater than ZVB2 (10.0000), the start time of this time pair is the
new latest recorded c loc k in for this shift and it gets proc essed under >. Henc e, the
start time (15.0000) of the c urrent time pair is fed into daily time type ZVB2 after
removing its old value 10.0000 using ADDDBZVB2Z and the time pair is moved to output
table using COLOP *.
Currently, the value of ZVB1 and ZVB2 are 08.0000 and 15.0000 respec tively. Let us
assume now that the next time pair with start time has start time as 13:00:00. This time
pair will get proc essed through Y (OUTTPEXBTM). The value of time type ZVB1 is read
using HRS=DZVB1 (ZVB1 = 08.0000). This value is compared with 0 using HRS?0 and since
the value of ZVB1 (08.0000) is greater than 0, the time pair gets processed under >. Then
the start time of the time pair is read using HRS=PBEG (HRS = 13.0000) and it is compared
with earliest rec orded cloc k in time type ZVB1 (08.0000) using HRS?DZVB1. Sinc e the
value of HRS=PBEG (13.0000) is greater than earliest recorded c loc k in time type ZVB1
(08.0000), the time pair gets processed under >. Then the value of HRS=PBEG (13.0000) is
c ompared with latest recorded c loc k in time type ZVB2 (15.0000). Sinc e the value of
HRS=PBEB (13.0000) is not greater than ZVB2 (15.0000), the start time of this time pair is
not the new latest recorded c lock in for this shift and it gets proc essed under *. Henc e,
this time pair is moved into output table using COLOP *.
Finally, the value of earliest recorded cloc k in time type ZVB1 and latest recorded cloc k
in time type ZVB2 are 08.0000 and 15.0000 respec tively.

PCR ZVB5 The objec tive of PCR ZVB5 is to find the earliest recorded c loc k out and
latest rec orded c lock out in a shift and feed the values into daily time types ZVB3 (earliest
rec orded c loc k out) and ZVB4 (latest recorded c lock out).
If no c loc k out has been recorded, then the daily time types ZVB3 and ZVB4 wont get
generated. If only one cloc k out has been rec orded, then both ZVB3 and ZVB4 will have the
same value.
Below is a screenshot of PCR ZVB5.

Let us see how time pairs in TIP table get processed through PCR ZVB5.
The PCR checks if end time exists in time pair or not using OUTTPEXETM. If end time
doesnt exist (N), the time pair is moved to output table using COLOP *. If all time pairs of
the shift dont have end time, then time types ZVB3 and ZVB4 arent c reated. Hence, the
values of ZVB3 and ZVB4 are 0.
If the end time exists (Y) in time pair, the value of time type ZVB3 (Earliest Recorded Cloc k
Out) is read using HRS=DZVB3. If it is the first time pair with end time and getting
proc essed in the rule, the value of ZVB3 will be 0. If it is not the first time pair with end
time, then there will be some value in time type ZVB3.
After reading the value of time type ZVB3, it is c ompared with 0 using HRS?0. If the value
of ZVB3 is not greater than 0, then the time pair gets proc essed under * and the end time
of the time pair is read using HRS=PEND. The end time is added to time types ZVB3
(earliest recorded c loc k out) and ZVB4 (latest rec orded cloc k out) and the time pair is
moved to output table using COLOP *.
Let us assume that the first time pair with end time had end time as 12:00:00. Henc e, the
value of ZVB3 and ZVB4 will be 12.0000. Now let us assume that the next time pair with
end time has end time as 10:00:00. This time pair will get processed through Y
(OUTTPEXETM). The value of time type ZVB3 is read using HRS=DZVB3 (ZVB3 = 12.0000).
This value is c ompared with 0 using HRS?0 and since the value of ZVB3 (12.0000) is
greater than 0, the time pair gets proc essed under >. Then the end time of the time pair is
read using HRS=PEND (HRS = 10.0000) and it is c ompared with earliest rec orded cloc k
out time type ZVB3 (12.0000) using HRS?DZVB3. Sinc e the value of HRS=PEND (10.0000)
is not greater than ZVB3 (12.0000), the end time of this time pair is the new earliest
rec orded cloc k out for this shift and it gets proc essed under *. Hence, the end time
(10.0000) of the current time pair is fed into daily time type ZVB3 after removing its old
value 12.0000 using ADDDBZVB3Z and the time pair is moved to output table using COLOP
*.
Currently, the value of ZVB3 and ZVB4 are 10.0000 and 12.0000 respec tively. Let us
assume now that the next time pair with end time has end time as 18:00:00. This time pair
will get proc essed through Y (OUTTPEXETM). The value of time type ZVB3 is read using
HRS=DZVB3 (ZVB3 = 10.0000). This value is c ompared with 0 using HRS?0 and sinc e the
value of ZVB3 (10.0000) is greater than 0, the time pair gets processed under >. Then the
end time of the time pair is read using HRS=PEND (HRS = 18.0000) and it is c ompared with
earliest rec orded c loc k out time type ZVB3 (10.0000) using HRS?DZVB3. Since the value
of HRS=PEND (18.0000) is greater than earliest rec orded c loc k out time type ZVB3
(10.0000), the time pair gets processed under >. Then the value of HRS=PEND (18.0000) is
c ompared with latest rec orded cloc k out time type ZVB4 (12.0000). Since the value of
HRS=PEND (18.0000) is greater than ZVB4 (12.0000), the end time of this time pair is the
new latest rec orded cloc k out for this shift and the time pair is processed under *.
Henc e, the end time (18.0000) of the c urrent time pair is fed into daily time type ZVB4
after removing its old value 12.0000 using ADDDBZVB4Z and the time pair is moved to

output table using COLOP *.


Currently, the value of ZVB3 and ZVB4 are 10.0000 and 18.0000 respec tively. Let us
assume now that the next time pair with end time has end time as 16:00:00. This time pair
will get proc essed through Y (OUTTPEXETM). The value of time type ZVB3 is read using
HRS=DZVB3 (ZVB1 = 10.0000). This value is c ompared with 0 using HRS?0 and sinc e the
value of ZVB3 (10.0000) is greater than 0, the time pair gets processed under >. Then the
start time of the time pair is read using HRS=PEND (HRS = 16.0000) and it is compared with
earliest rec orded c loc k out time type ZVB3 (10.0000) using HRS?DZVB3. Since the value
of HRS=PEND (16.0000) is greater than earliest rec orded c loc k out time type ZVB3
(10.0000), the time pair gets processed under >. Then the value of HRS=PEND (16.0000) is
c ompared with latest rec orded cloc k out time type ZVB4 (18.0000). Since the value of
HRS=PEND (16.0000) is less than ZVB4 (18.0000), the end time of this time pair is not the
new latest rec orded cloc k out for this shift and the time pair gets proc essed under <.
Henc e, this time pair is moved into output table using COLOP *.
Finally, the value of earliest rec orded c loc k out time type ZVB3 and latest rec orded
c loc k out time type ZVB4 are 10.0000 and 18.0000 respectively.

PCR ZVB6 The objective of PCR ZVB6 is to find the first cloc k in by c omparing earliest
c loc k in time type ZVB1 with earliest c lock out time type ZVB3. If the value of ZVB1 is less
than ZVB3, then ZVB1 is the first cloc k in and its value should be fed in time type ZVB5
First Cloc k In.
If the value of ZVB1 is more than ZVB3, then there is a missing c lock in. The missing cloc k
in is the first c lock in and henc e, the value of ZVB5 will be 0.0000.
If ZVB1 was not created due to missing c loc k in, then the value of ZVB5 will be 0.0000
implying that there is a missing clock in.
Below is a screenshot of PCR ZVB6.

Scenario 1: Earliest Recorded Cloc k In Time Type ZVB1 not created and Earliest
Rec orded Clock Out Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the value
of earliest recorded c lock in time type ZVB1 (blank) using HRS=DZVB1 and then subtrac ts
the value of earliest rec orded c loc k out time type ZVB3 (10.0000) using HRS-DZVB3. The
result is c ompared with 0 using HRS?0 and since this is not greater than 0, it gets
proc essed under *. The value of earliest rec orded c lock in time type ZVB1 is read using
HRS=DZVB1 and is fed into first c loc k in time type ZVB5 using ADDDBZVB5Z. The value of
ZVB5 is 0.0000 implying that the first c lock in is missing.
Scenario 2: Earliest Rec orded Cloc k In Time Type ZVB1 has value 08.0000 and Earliest
Rec orded Clock Out Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the value
of earliest recorded cloc k in time type ZVB1 (08.0000) using HRS=DZVB1 and then
subtracts the value of earliest rec orded c loc k out time type ZVB3 (10.0000) using HRSDZVB3. The result is compared with 0 using HRS?0 and sinc e this is not greater than 0, it

gets proc essed under *. The value of earliest rec orded cloc k in time type ZVB1 (08.0000)
is read using HRS=DZVB1 and is fed into first cloc k in time type ZVB5 using ADDDBZVB5Z.
Henc e, the value of ZVB5 is 08.0000.

Scenario 3: Earliest Rec orded Cloc k In Time Type ZVB1 has value 12.0000 and Earliest
Rec orded Clock Out Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the value
of earliest recorded cloc k in time type ZVB1 (12.0000) using HRS=DZVB1 and then
subtracts the value of earliest rec orded c loc k out time type ZVB3 (10.0000) using HRSDZVB3. The result is c ompared with 0 using HRS?0 and since this is greater than 0, it gets
proc essed under >. The result is c ompared with earliest rec orded cloc k in time type ZVB1
(12.0000) using operation HRS?DZVB1 and sinc e the result is less than the value of ZVB1,
it gets processed under <. Using HRS=0.00, the value is set to 0 and then fed into first
c loc k in time type ZVB5 using ADDDBZVB5Z. Henc e, the value of ZVB5 is 0.0000 implying
that the first c loc k in is missing.

Scenario 4: Earliest Rec orded Cloc k In Time Type ZVB1 has value 08.0000 and Earliest
Rec orded Cloc k Out Time Type ZVB3 has value 0.0000 - The PCR ZVB6 reads the value of
earliest recorded c lock in time type ZVB1 (08.0000) using HRS=DZVB1 and then subtrac ts
the value of earliest rec orded c loc k out time type ZVB3 (0.0000) using HRS- DZVB3. The
result is compared with 0 using HRS?0 and sinc e this is greater than 0, it gets processed
under >. The result is compared with earliest recorded c loc k in time type ZVB1 (08.0000)
using operation HRS?DZVB1 and sinc e the result is equal to the value of ZVB1, it gets
proc essed under =. The value of earliest rec orded c loc k in time type ZVB1 (08.0000) is
read using HRS=DZVB1 and then fed into first cloc k in time type ZVB5 using
ADDDBZVB5Z. Henc e, the value of ZVB5 is 08.0000.

PCR ZVB7 The objec tive of PCR ZVB7 is to find the last c loc k out by c omparing latest
c loc k out time type ZVB4 with latest c loc k in time type ZVB2. If the value of ZVB4 is
greater than ZVB2, then ZVB4 is the last cloc k out and its value should be fed in time type
ZVB6 Last Clock Out.
If the value of ZVB4 is less than ZVB2, then there is a missing c loc k out. The missing cloc k
out is the last c lock out and hence, the value of ZVB6 will be 0.0000.
If ZVB4 was not c reated due to missing c lock out, then the value of ZVB6 will be 0.0000
implying that there is a missing clock out.
Below is a screenshot of PCR ZVB7.

Scenario 1: Latest Recorded Cloc k Out Time Type ZVB4 not created and Latest
Rec orded Clock In Time Type ZVB2 has value 12.0000 - The PCR ZVB7 reads the value of
latest rec orded c loc k out time type ZVB4 (blank) using HRS=DZVB4 and then subtrac ts
the value of latest rec orded c lock in time type ZVB2 (12.0000) using HRS-DZVB2. The
result is c ompared with 0 using HRS?0 and since this is not greater than 0, it gets
proc essed under *. Using HRS=0.00, the value is set to 0 and then fed into last cloc k out
time type ZVB6 using ADDDBZVB6Z. Henc e, the value of ZVB6 is 0.0000 implying that the
last clock out is missing.

Scenario 2: Latest Rec orded Cloc k Out Time Type ZVB4 has value 18.0000 and Latest
Rec orded Clock In Time Type ZVB2 has value 12.0000 - The PCR ZVB7 reads the value of
latest rec orded c loc k out time type ZVB4 (18.0000) using HRS=DZVB4 and then subtrac ts
the value of latest rec orded c lock in time type ZVB2 (12.0000) using HRS-DZVB2. The
result is compared with 0 using HRS?0 and sinc e this is greater than 0, it gets processed
under >. The value of latest rec orded c loc k out time type ZVB4 (18.0000) is read using
HRS=DZVB4 and then fed into last c lock out time type ZVB6 using ADDDBZVB6Z. Henc e,
the value of ZVB6 is 18.0000.

Scenario 3: Latest Rec orded Cloc k Out Time Type ZVB4 has value 14.0000 and Latest
Rec orded Clock In Time Type ZVB2 has value 16.0000 - The PCR ZVB7 reads the value of
latest rec orded c loc k out time type ZVB4 (14.0000) using HRS=DZVB4 and then subtrac ts
the value of latest rec orded c lock in time type ZVB2 (16.0000) using HRS-DZVB2. The
result is c ompared with 0 using HRS?0 and since this is not greater than 0, it gets
proc essed under *. Using HRS=0.00, the value is set to 0 and then fed into last cloc k out
time type ZVB6 using ADDDBZVB6Z. Henc e, the value of ZVB6 is 0.0000 implying that the
last clock out is missing.

Scenario 4: Latest Rec orded Cloc k Out Time Type ZVB4 has value 18.0000 and Latest
Rec orded Cloc k In Time Type ZVB2 not created - The PCR ZVB7 reads the value of latest
rec orded c lock out time type ZVB4 (18.0000) using HRS=DZVB4 and then subtrac ts the
value of latest rec orded cloc k in time type ZVB2 (0.0000) using HRS-DZVB2. The result is
c ompared with 0 using HRS?0 and since this is greater than 0, it gets processed under >.
The value of latest recorded c loc k out time type ZVB4 (18.0000) is read using
HRS=DZVB4 and then fed into last c lock out time type ZVB6 using ADDDBZVB6Z. Henc e,
the value of ZVB6 is 18.0000.
By now, we have identified the first cloc k in and last cloc k out of a shift. We also have
the solution logic in plac e to identify if the first cloc k in or last c loc k out of any shift is
missing or not.

PCR ZVB9 - The next step is to create a time pair using the first cloc k in and last cloc k
out that we have determined and proc ess only this time pair for further evaluation. Any
other time pair if present gets eliminated from further processing.
Below is the sc reenshot of PCR ZVB9.

The PCR ZVB9 uses VARSTFIRST to read the first time pair. If it is the first time pair, it gets
proc essed under Y. Any other time pair gets stopped at N and doesnt move to output table.
In this way, we are ensuring that only one time pair will move to output table for further
proc essing.
The first time pair will be modified with the first c lock in and last c loc k out data and will
be moved to output for further proc essing.
Below are the four possible sc enarios that may happen.
Scenario 1: Both First Cloc k In (ZVB5) and Last Cloc k Out (ZVB6) have value as 0.0000
The first time pair moves for processing under Y. The value of first c lock in time type ZVB5
(0.0000) is read using HRS=DZVB5 and then c ompared with 0 using HRS?0. Sinc e the result is
not greater than 0, the processing happens under *. Below things happen for the first time
pair:
The start time of the time pair is deleted using FILLPBThe start of rec ord type (P10) is deleted using FILLPF
The no. of hours is reduced to 0.0000 using FILLPN
Then the value of the last cloc k out time type ZVB6 (0.0000) is read using HRS=DZVB6 and
then compared with 0 using HRS?0.
Sinc e the result is not greater than 0, the
proc essing happens under *. Below things happen for the first time pair:
The end time of the time pair is deleted using FILLPEThe end of record type (P20) is deleted using FILLPG
The status of the time pair is changed to 1 using FILLP11 implying that both start and end
times are missing from the time pair
The time pair is moved to output table for further proc essing using COLOP *.
Henc e, the time pair has both From time and To time as blank.
Scenario 2: First Cloc k In (ZVB5) and Last Clock Out (ZVB6) have value as 0.0000 and
18.0000 respectively The first time pair moves for proc essing under Y. The value of first
c loc k in time type ZVB5 (0.0000) is read using HRS=DZVB5 and then c ompared with 0 using
HRS?0. Sinc e the result is not greater than 0, the processing happens under *. Below things
happen for the first time pair:

The start time of the time pair is deleted using FILLPBThe start of rec ord type (P10) is deleted using FILLPF
The no. of hours is reduced to 0.0000 using FILLPN
Then the value of the last cloc k out time type ZVB6 (18.0000) is read using HRS=DZVB6
and then compared with 0 using HRS?0. Sinc e the result is greater than 0, the processing
happens under >. Below things happen for the first time pair:
The end time of the time pair is filled with value of last cloc k out time type ZVB6
(18.0000) using FILLPE.
The end of record type (P20) is added to time pair using FILLPG
The status of the time pair is c hanged to 2 using FILLP12 implying that c lock in time is
missing from time pair.
The time pair is moved to output table for further proc essing using COLOP *.
Henc e, the time pair has From time and To time as blank and 18.0000 respectively.
Scenario 3: First Clock In (ZVB5) and Last Cloc k Out (ZVB6) have value as 08.0000 and
0.0000 respec tively The first time pair moves for processing under Y. The value of first cloc k
in time type ZVB5 (08.0000) is read using HRS=DZVB5 and then c ompared with 0 using HRS?0.
Since the result is greater than 0, the proc essing happens under >. Below things happen for the
first time pair:
The start time of the time pair is set from first cloc k in time type ZVB5 using FILLPB.
The start of rec ord type (P10) is set for time pair using FILLPFP10.
Then the value of the last c loc k out time type ZVB6 (0.0000) is read using HRS=DZVB6 and
then c ompared with 0 using HRS?0. Sinc e the result is not greater than 0, the processing
happens under *. Below things happen for the first time pair:
The end time of the time pair is deleted using FILLPEThe end of record type (P20) is deleted using FILLPG
The no. of hours is reduced to 0.0000 using FILLPN
The status of the time pair is c hanged to 3 using FILLP13 implying that clock out time is
missing from time pair.
The time pair is moved to output table for further proc essing using COLOP *.
Henc e, the time pair has From time and To time as 08.0000 and blank respectively.
Scenario 4: First Cloc k In (ZVB5) and Last Cloc k Out (ZVB6) have value as 08.0000 and
18.0000 The first time pair moves for proc essing under Y. The value of first c lock in time
type ZVB5 (08.0000) is read using HRS=DZVB5 and then compared with 0 using HRS?0. Since
the result is greater than 0, the proc essing happens under >. Below things happen for the first
time pair:
The start time of the time pair is set from first cloc k in time type ZVB5 using FILLPB.
The start of rec ord type (P10) is set for time pair using FILLPFP10.
Then the value of the last cloc k out time type ZVB6 (18.0000) is read using HRS=DZVB6
and then compared with 0 using HRS?0. Sinc e the result is greater than 0, the processing
happens under >. Below things happen for the first time pair:
The end time of the time pair is set from last c lock out time type ZVB6 (18.0000) using
FILLPE.
The end of record type (P20) is set for time pair using FILLPGP20.
The status of the time pair is changed to 0 using FILLP10 implying that the pair is error free
with both start time and end time.
The time pair is moved to output table for further proc essing using COLOP *.
Henc e, the time pair has From time and To time as 08.0000 and 18.0000 respec tively.
The next step is to inc lude these PCRs ZVB4, ZVB5, ZVB6, ZVB7 and ZVB9 in positive time
management schema.
A custom sc hema ZTCN is c reated by copying from standard time sc hema TM00 Time
Evaluation with Personnel Time Events.
Below is a screenshot of the custom time schema ZTCN.

The PCRs ZVB4, ZVB5, ZVB6, ZVB7 and ZVB9 are included in time sc hema ZTCN as per the
sequence shown in the above screenshot.
PCRs ZVB4, ZVB5 and ZVB9 are being proc essed by function PTIP because TIP table is being
proc essed in these PCRs. Par 2 is GEN bec ause it is called for all time types.
PCRs ZVB6 and ZVB7 are being proc essed by function ACTIO because TIP table is not being
proc essed in these PCRs.
I have inc luded func tion PRINT after PCRs ZVB4 and ZVB5 to print table TES to display the
value of time types ZVB1, ZVB2, ZVB3 and ZVB4 whic h get generated in these PCRs.
In the same way, I have included func tion PRINT after PCRs ZVB6 and ZVB7 to print table
TES to display the value of time types ZVB5 and ZVB6 which get generated in these PCRs.
I tested around 22 different scenarios for this solution and all the sc enarios passed with the
desired result.
Please refer the below sc reenshots for the results.

I will now pic k up some sc enarios from the 22 sc enarios that I tested and show how the time
events got proc essed in system.
Testing Scenario 1:
IT2011

P2011

Table TES

Final Pair Formed

Time Evaluation Result It fails since last c lock out is missing.

Testing Scenario 2:
IT2011

P2011

Table TES

Final Pair Formed

Time Evaluation Result It fails since first c loc k in is missing.

Testing Scenario 3:
IT2011

P2011

Table TES

Final Pair Formation

Time Evaluation Result It fails sinc e last c loc k out is missing

Testing Scenario 4:
IT2011

P2011

Table TES

Final Pair Formation

Time Evaluation Result It is suc cessful.

Here I come to the end of this know ledge artifact. Thank you for your patience for going through
this document. I hope this know ledge artifact has been beneficial for you.
Warm regards,

Vivek Barnwal
************************************************************************
You c an also refer to other knowledge artifac ts created by me at the below link:
One Stop Shop of my Knowledge Artifacts in SAP HCM

Categories: Time Management


5316 View s
Tags: hcm, human_capital_management, hr, time_events, positive_time_management, f irst_clock_in, last_clock_out,
time_recording_terminals, positive_time_evaluation

Average User Rating


(27 ratings )
1

Share

Tw e et

Like

68 Comments
omid daghdar Jul 20, 2013 2:14 PM

Dear Vivek,
It's a great job! Thank you for s haring it.
Just a question. Why you have s uch a cases: "The employee recorded a clock in at 08:00:00 and
then clock outs at 10:30:00, 14:00:00 and 18:00:00 on 03-Jan-12."?
How they s pecify on devices a clock is in or out?
How employees record clock-in/out? Is there any button which employee us e to s pecify clock-in/out
and they us e them in a mistake which you see such a records?
Regards ,
Omid
Like (1)

Vivek Barnw al Jul 20, 2013 2:37 PM (in response to omid daghdar)

Hi Omid,
The client has time recording terminals mounted on the wall.
They don't have turns tiles where the employee must clock in while entering the plant and
must clock out while leaving the plant.

There are 2 terminals mounted on the wall. One is marked as "Clock In" and the next
one as "Clock Out".
All the punch in recorded at terminal clock in will be considered as P10 and all punch
in recorded at terminal clock out will be considered as P20.
Since the terminals are mounted on wall, hence, employee may miss on swipe in or swipe
out while entering or leaving the premises .
As a result, the requirement was to build a solution which will be automatic and work in all
s cenarios except if first clock in or last clock out is miss ing.
Regards,
Vivek
Like (2)

omid daghdar Jul 22, 2013 6:00 AM (in response to Vivek Barnw al)

Dear Vivek,
Thanks for your reply. Just s ome questions for my information.
Which brand of terminals the client has?
What is the clock-in/out records transfer interval from terminals into SAP?
Regards,
Omid
Like (1)

Vivek Barnw al Jul 22, 2013 6:12 AM (in response to omid daghdar)

Hi,
The client is using Honeywell Prowatch as the time recording terminals
and the client would like 2 transfer per shift. One during the middle of the
shift and another 4 hours after the end of the shift.
Thanks and regards ,
Vivek Barnwal
Like (2)

Ramesh Jakkula Jul 20, 2013 3:07 PM

Dear Vivek,
Thanks for sharing this excellent document.

Regards
Ramesh
Like (0)

Vivek Barnw al Jul 20, 2013 3:09 PM (in response to Ramesh Jakkula)

Thanks Ramesh.
You are welcome.
Regards,
Vivek
Like (1)

Siva Prasad Jul 22, 2013 7:03 AM

Good Work Vivek , Pleas e keep on post further cus tom requirements in positive time management.
Thanks for sharing again!!!!!
Siva Pras ad
Like (0)

Vivek Barnw al Jul 22, 2013 7:47 AM (in response to Siva Prasad)

Thanks so much Siva.


Regards
Vivek
Like (1)

Anand Jalan Jul 22, 2013 12:31 PM

Great work Vivek. It is a great piece of information for all who are looking to implement positive time
management having similar scenarios .
Like (0)

Vivek Barnw al Jul 22, 2013 7:23 PM (in response to Anand Jalan)

Thanks Anand.
Regards,
Vivek
Like (1)

DVD Raju Jul 23, 2013 5:26 AM

It's analyzed and narated very well, Thank you vivek for s haring such an good article.
Brs
DVD Raju
Like (0)

Vivek Barnw al Jul 23, 2013 5:51 AM (in response to DVD Raju)

Thank you.
Regards,
Vivek
Like (1)

Vivek Barnw al Jul 23, 2013 5:52 AM (in response to DVD Raju)

I would be good if you could kindly rate the document for the benefit of other us ers . It will
help them to ascertain the us efulness of the document.
Thanks and regards,
Vivek Barnwal
Like (1)

Vijay Shankar Jul 23, 2013 7:41 AM

Thanks Vivek with a good explanation...


Vijay
Like (0)

Vivek Barnw al Jul 23, 2013 8:07 AM (in response to Vijay Shankar)

Thanks Vijay. Request you to please rate the document as it will be helpful for others during
future reference.
Like (1)

Sri P Oct 2, 2013 1:40 PM

Excellent Vivek.
Sri..
Like (0)

Vivek Barnw al Oct 3, 2013 6:15 PM (in response to Sri P)

Thanks Sri
Like (1)

vijay kumar Oct 4, 2013 3:23 AM

Dear Vivek,
Superub document...
Regards ,
Vijay Kumar
Like (0)

Upendra Krishna Oct 4, 2013 7:41 AM

An exhaus tive and detailed approach, excellent doc. Good Job Vivek!
BR
Upen
Like (0)

Vivek Barnw al Oct 8, 2013 6:13 PM (in response to Upendra Krishna)

Thanks Upendra.
Like (1)

Pramod K Varma Nov 14, 2013 1:35 PM

Vivek - Good document. Are/Were you in Infosys? Had a colleague by the same name.
Pramod
Like (0)

Vivek Barnw al Nov 14, 2013 1:42 PM (in response to Pramod K Varma)

Hi Pramod,
Yes, I am the same Vivek.
Regards,
Vivek
Like (1)

Christopher Solomon Nov 14, 2013 2:23 PM

WOW! Excellent blog!!!! Serious ly....great job!!!


I had to do something s imilar for a client LONG ago, so I know what all you had to go through. You
have described and laid it out perfectly. This will be invaluable for those facing the same issue (and it
is jus t a good read for others as well).
Thanks and KEEP BLOGGING!
Like (0)

Vivek Barnw al Nov 14, 2013 3:06 PM (in response to Christopher Solomon)

Thanks so much Christopher....


Like (1)

Rajesh Kumar Burra Nov 26, 2013 12:54 PM

Hi Vivek,

Really an excellent document.


Valuable information!!!! This will help Peers in the forum to understand the importance of PCR for
Time Recording Machines ..
If Iam Moderator of SAP, I would given 100 points for this document. It is more like a Project This
information covers entire project of Time Management
Thanks again
Keep s haring!!!
Regards
Rajes h Kumar Burra
Like (1)

Vivek Barnw al Nov 27, 2013 8:53 AM (in response to Rajesh Kumar Burra)

Thanks for your feedback Rajesh.


Regards,
Vivek
Like (1)

Vivek Barnw al Nov 27, 2013 9:03 AM (in response to Rajesh Kumar Burra)

You may als o go through this document.


http://scn.s ap.com/docs/DOC-44521
Like (1)

prashanti sw ain Nov 26, 2013 2:00 PM

Hi Vivek,
This is a brilliant work. Conceptually very clear so eas y to unders tand the requirement and the logic
written for it.
Please keep on posting such real time business s cenario on positive time management which
helps us immensely.
Thanks a lot for such an awesome blog & thanks for helping us to update our knowledge and
strength in SAP.
Thanks &Regards,
Prashanti s wain
Like (0)

Vivek Barnw al Nov 27, 2013 8:54 AM (in response to prashanti sw ain)

Thanks for your feedback Pras hanti.


Warm regards ,
Vivek
Like (1)

Vivek Barnw al Nov 27, 2013 9:02 AM (in response to prashanti sw ain)

You may als o go through this document.


http://scn.s ap.com/docs/DOC-44521
Like (1)

Rajesh Kumar Burra Nov 27, 2013 9:15 AM

All I can do now is to Like each comment posted by you


Thanks a lot!!!
Like (0)

Vivek Barnw al Nov 27, 2013 9:17 AM (in response to Rajesh Kumar Burra)

Thanks much
Like (1)

Elnoosh Olyaii Dec 13, 2013 8:15 AM

Thanks Vivek for your us eful and s o detailed document .


Like (0)

Pradyp Parakala Dec 13, 2013 8:26 AM

Excellent work Vivek


It will be more helpful if u can let us know how to integrate 3rd party data(Kronos) to system directly
into portal on Clock-in/out but not via uploading the Template every time. any s uggestions!!!!
Cheers
Pradyp
Like (0)

Rajesh Kumar Burra Dec 13, 2013 8:35 AM (in response to Pradyp Parakala)

You can do that with BAPIS


Like (0)

Vivek Barnw al Dec 13, 2013 9:03 AM (in response to Pradyp Parakala)

Sorry Pradyp, I didn't get your ques tion about integrating 3rd party data to system direclty
into portal on clock in/out.
Our client has installed Honeywell Prowatch Badge Readers and we have built cus tom
inbound and outbound interfaces (SAP PI) to transfer data between SAP R/3 and Honeywell
Pro-Watch.
Honeywell Prowatch is not a CC certified time recording s ys tem.
Warm regards ,
Vivek
Like (0)

Ketul Patel Jan 28, 2014 3:11 PM

HI,
Really Helpful!!!
Great Job.
Thanks for sharing the same.
Best Regards,
Ketul Patel
Like (0)

Vivek Barnw al Jan 29, 2014 6:02 AM (in response to Ketul Patel)

Thanks Ketul.
Regards,
Vivek
Like (1)

Shai Sinai Mar 18, 2014 10:18 AM

Great job!
Thanks for sharing this excellent most detailed pos t.
Like (0)

Vivek Barnw al Mar 18, 2014 1:21 PM (in response to Shai Sinai)

Thank you Shai


Like (0)

Sriram Tamil Mar 18, 2014 12:39 PM

Hi Vivek,
Awes omeeeeeeeeeeeeeee one , almost you given us all the parts of Positive Time Management.
Great work dear,
But would you help me to understand these standard tables.

TPT_PAIRSTAT2
V_T705B
Bec ause currently i am working on positive time management where i dont get
how these two tables have been c onfigured on this
thanks
Sri
Like (0)

Vivek Barnw al Mar 18, 2014 1:16 PM (in response to Sriram Tamil)

Hi Sriram,
I have given the explanation for these tables in the document. However, if you s till need a
detailed explanation, please refer to PK Agarwal's book on Time Management.
Thanks and regards,
Vivek Barnwal
Like (0)

Sriram Tamil Mar 20, 2014 8:53 AM (in response to Vivek Barnw al)

Hi Vivek,
Thanks for your guidance. i have bought the book as soon as you said.its well
explained.
thanks once again. i appreicate your great job.
Regards,
Sri
Like (0)

Vivek Barnw al Mar 20, 2014 9:27 AM (in response to Sriram Tamil)

Thanks Sriram
Like (0)

YF Hou Mar 19, 2014 5:29 AM

Hi Vivek,
I'm doing a study on your "one stop shop" and I'm really appreciate you s haring knowledge.
I read this article, and I unders tand the business requirement is once there is a first clock in and a
last clock out, other unmatched time data (no matter clock in or out) will be ignored. The hour that an
employee worked would be counted using first clock in and las t clock out. Am I right?
Here I have a question about real business requirement. How the most companies process leakage
card situation? It must have lots of pos sibilities of miss ing clock in or clock out. Do companies like
giving error hints and stop evaluation once there's missing time data, or do they like ignoring it as
long as there is a first clock in and a las t clock out?
Is it possible to have a requirement like this ?
08:00 clock in
10:00 clock out
14:00 clock out
15:00 clock in
16:00 clock out
The requirement is ignoring 14:00 clock out but calulate hours using all other matched data (08:0010:00 and 15:00-16:00)?
I only want to know some real poss ibilities in business requirement since I havn't done any real one
yet
Thank you very much!!
Like (0)

Vivek Barnw al Mar 19, 2014 5:51 AM (in response to YF Hou)

Hi,
It all depends on client requirements. But I am surprised a client will have a requirement to
calculate hours only using completed time pairs . If there is a clock in miss ing, it means that
the employee was in the plant and that s hould be corrected to arrive at the correct hours
employee has worked.
In my current client, they would like every miss ing time s tamp to be pointed out s o that they
can as k their employees to update them. So we are building a solution to let the time
evaluation fail if there is a miss ing time s tamp.
Thanks and regards,
Vivek Barnwal
Like (0)

YF Hou Mar 19, 2014 7:13 AM (in response to Vivek Barnw al)

Hi Vivek,
Thank you for you quick reply!
It's quite clear and us eful.
Thank you!!
Like (0)

Shai Sinai Mar 19, 2014 7:38 AM

Hi,
I did some tests of the pairing mechanism.
Two short insights of my checks:
1. It seems that TPT_PAIRSTAT2 contents cannot really be modified.
Surpris ingly, TPT_PAIRSTAT2 is n't being us ed at all. All the logic/values are hard-coded in report
RPTIME00 subroutine DET_NEXT_COGOS.
2. In alternative to cus tomizing table V_T705B, you may use us er-exit: Enhancement HRPTIM05 FM
EXIT_SAPLRPPD_001 for the same purpose (in employee/date level).
FYI,
Shai
Like (0)

Vivek Barnw al Mar 19, 2014 8:47 AM (in response to Shai Sinai)

Thanks Shai for sharing this input. I am sure it will be useful for all.
Like (0)

Paula Barreira Santiago Jul 9, 2014 9:49 PM

Vivek,
This document is really amazing, amazing!. I studied him very much, but not being an expert in TIME
and only one support, I got s ome questions .... I als o wrote on the forum ....

Here I am on the client, there marking there is no Input and Output, however, he takes the mark the
next day for the previous day and often creates lack us ed for the next day (even if there P10 and P20)
and then the employee is deducted on your payroll. Here we also used the Honeywell.

Can you understand my question? For thes e two tables :


TPT_PAIRSTAT2 V_T705B and I can configure the system to understand that even if the employee
has an entry and has no output, it will not be with payroll deduction?

I appreciate attention ....


Thanks:
Paula
Like (0)

Vivek Barnw al Jul 10, 2014 7:10 AM (in response to Paula Barreira Santiago)

Apologies Paula, I didn't understand your question.


Can you please rephras e it with an example? That will make things more clear.
Regards,
Vivek Barnwal
Like (0)

Paula Barreira Santiago Jul 10, 2014 8:41 AM (in response to Vivek Barnw al)

Vivek,
Firs t, the problem I have is that the marking <'re as suming for the previous day

And in TIP creates these values ... 34, 36 ... 38 .... that does not reflect the IT2011

It was best to understand?


The employee is being deducted from payroll!
SM30: TPT_PAIRSTAT2

And
SM30: V_T705B

And I can not configure not to receive the mark of the previous day.
Thank you for you attention.
Regards,
Paula

Like (0)

Vivek Barnw al Jul 10, 2014 9:17 AM (in response to Paula Barreira Santiago)

Hi Paula,
This is standard SAP functionality in case of night shift or if the employee
doesn't clock out in a day shift.
I had reported same issue to SAP and this is the standard functionality
as per SAP. We can't do anything about it. You will have to update the
mis sing time stamp for the first day.
Please refer the below thread.
Pair Formation Is sue in Positive Time Management with Time Events
I hope this helps.
Kindly log any question in future in a separate thread so that other SAP
HCM cons ultants in SCN network can view your question and also
provide their inputs.
Also, I would appreciate if you kindly rate this document quality for the
benefit of SCN us ers .
Thanks and regards ,
Vivek Barnwal
Like (0)

Paula Barreira Santiago Jul 10, 2014 9:42 AM (in response to Vivek
Barnw al)

Hi Vivek!
Thank you again.

My question is that before we had a s etup that did not receive


the previous day in the marking of IT2011.

The day was unmarked in IT2011 peerless and thus, had the
warning mess age to inform the miss ing pair. And now, it's so
.... assuming the following day to the previous day!

So I was confused and did not already have here the Expert
Advisor and many problems in the payroll of employees.
Like (0)

Vivek Barnw al Jul 10, 2014 11:10 AM (in response to Paula


Barreira Santiago)

SAP cons iders time events of current day and next day
to form time pair.
Let us s ay that the shift timing are 7:00 - 15:00 on 02Jan and 03-Jan. The employee clocks in at 7:00 am on
02-Jan. He forgot to clock out on 02-Jan and the time

evaluation will point out that employee didn't clock out.


This error should be fixed.
The employee came to office on 03-Jan and forgot to
clock in on 03-Jan. He clocked out at 15:00 on 03-Jan.
The s ys tem during time evaluation run for 02-Jan will
s ee a clock in at 7 am on 02-Jan and a clock at 3 pm
on 03-Jan. It will form a time pair for 02-Jan saying that
the employee was at work for 32 hours and will report
an error that the employee is not at work on 03-Jan.
SAP advis ed that this is the s tandard behavior and
time administrator s hould go and get the record
corrected.
I hope this clarifies.
Thanks and regards,
Vivek Barnwal
Like (0)

Gopal HR Jul 11, 2014 1:23 PM (in response to


Vivek Barnw al)

Hi Vivek,
Could you please res pond to the below
mentioned thread:
http://scn.sap.com/thread/3585358
Thanks,
Gopal
Like (0)

Bhagyashree Naik Jul 19, 2014 9:54 AM


(in response to Gopal HR)

Hi Vivek,
Excellent, awes ome, brilliant
document prepared by you. Hats off
to your patience als o for this
document.
Regards,
Bhagyashree
Like (0)

Vivek Barnw al Jul 19, 2014


10:01 AM (in response to
Bhagyashree Naik)

Thank you Bhagyashree.


You can go through other
time management
documents from the link
below:
One Stop Shop of my
Knowledge Artifacts in SAP
HCM
Regards,
Vivek
Like (1)

Sandeep Turkar Aug 2, 2014


12:06 PM (in response to
Vivek Barnw al)

Hello Vivek ,
These document is very
gud . I did all the above
steps its working fine for
me , but on weekdays its
calculate the p10 and p20
for next day . I am not able
to control these I feel its
becaus e of c11 .
Can you please help me to

come out .
Like (0)

Vivek Barnw al Aug 2, 2014


1:54 PM (in response to
Sandeep Turkar)

I didn't get your question


about it not working on
weekday. It is working fine
for me for all pos sible
scenarios.
Pleas e share your
screenshots where it is not
working.
Thanks and regards,
Vivek Barnwal
Like (0)

Surya Prakash Aug 19, 2014 4:44 PM

Good one
Like (0)

Vivek Barnw al Aug 19, 2014 7:04 PM (in response to Surya Prakash)

Thanks Surya...
Regards,
Vivek
Like (0)

Bhagyashree Naik Aug 20, 2014 7:02 AM (in response to Vivek Barnw al)

Again another great Document Vivek...I must s ay...I am dying to work with you
now....
Like (0)

Vivek Barnw al Aug 20, 2014 7:27 AM (in response to Bhagyashree Naik)

Thanks Bhagyashree...
Like (1)

Senthu K Sep 29, 2014 7:48 AM (in response to Vivek Barnw al)

Hello Vivek
This is a great Document and has complete s et of info.
I can rate this 25 out of 10.
Reg
Zen
Like (0)

Vivek Barnw al Sep 29, 2014 8:35 AM (in response to Senthu


K)

That is kind of you to say s o Zen. Kindly rate the


document by providing your rating at the end of the
document.
Regards,
Vivek
Like (0)

Dheeraj Gupta Oct 29, 2014 8:38 AM

Thanks for a great document.


Like (0)

Vivek Barnw al Oct 29, 2014 10:21 AM (in response to Dheeraj Gupta)

Thanks Dheeraj.
Regards,

Vivek
Like (0)

Site Inde x
Privacy

Contact Us
Terms of Use

SAP Help Portal


Legal Disclosure

Copyright

Follow SCN

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy