Generated by Jive on 2014-08-12+02:00 1 Determination of First Clock In & Last Clock Out in Positive Time Evaluation Client Situation Our client requirement was to implement SAP HR Positive Time Management solution to record and evaluate the actual times of their blue collar workers. The client was installing time recording terminals which were not SAP CC1 certified. Only Clock In (Time Event Type P10) and Clock Out (Time Event Type P20) were required to be recorded. The factory/plant had four production shops. Each production shop had two time recording terminals mounted on the wall - one for clock in and another for clock out. These time recording terminals didn't have any unique way to specify whether a time punched at time recording terminal is "clock in" or "clock out". Hence, there was a board mounted with the sign "Clock In" above "Clock In Time Recording Terminal" and with the sign "Clock Out" above "Clock Out Time Recording Terminal". Some employees had access to all production shops and some had access to few of them only. An employee could work in multiple production shops in the same shift. Each time an employee entered into a production shop, it was expected that he clocked in at the "Clock In Time Recording Terminal" while entering into the production shop and clocked out at the "Clock Out Time Recording Terminal" while leaving the production shop. There were no turnstiles at the entrance of production shops and hence, there was a high chance that employees may forget to clock in or clock out while entering or leaving the production shops. Hence, we could have scenarios where an employee has a clock in data once and clock out data multiple times for the same shift. For evaluation purposes, client wanted us to consider the first clock in and the last clock out since it was difficult to enforce employees to clock in while entering and clock out while leaving the production shop in absence of a turnstile. If the first clock in was missing, then it should be reported as a missing clock in. Also, if the last clock out was missing, then it should be reported as a missing clock out. The time recording system would send a .txt file with all the time events (P10 & P20) data recorded 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). Hence, if the time events were recorded as shown in the table below, the first clock in will be blank and the last clock out will be 18:00:00. Date P10 P20 03-Jan-2012 - 14:00:00 03-Jan-2012 14:15:00 18:00:00
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
4
earliest or latest recorded times from the time events that have actually got recorded at the time
recording terminals.• Out of the recorded clock 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 functionP2011.
• Out of this recorded clock 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 earliestrecorded clock in is less than the earliest recorded clock out, then the earliest recorded clock in is the
first clock in of the shift and should be called P10. If the earliest recorded clock in is greater than theearliest recorded clock out, then there is a missing clock in. Hence, the first clock in of the shift should
be blank.• Then compare the latest recorded clock out with the latest recorded clock in. If the latest
recorded clock out is greater than the latest recorded clock in, then the latest recorded clock out isthe last clock out of the shift and should be called P20. If the latest recorded clock out is less than thelatest recorded clock in, then there is a missing clock out. Hence, the last clock 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 Clock In = 08.0000
Latest Recorded Clock In = 08.0000
Earliest Recorded Clock Out = 10.5000
Latest Recorded Clock Out = 18.0000
We see that the “earliest recorded clock in” (08.0000) is less than the “earliest recorded clock
out” (10.5000) and hence, the “earliest recorded clock in” is the first clock in of the shift. This is
correct. The “latest recorded clock out” (18.0000) is greater than the “latest recorded clock in” (08.0000)
and hence, the “latest recorded clock out” is the last clock out of the shift. This is correct too.
Hence, the above solution logic proved correct and I built custom PCRs and time types to fulfill the requirement
based on this logic.
Solution Design
8/12/2019 Determination of First Clock in & Last Clock
Table TPT_PAIRSTAT2 determines how time pairs are formed in Table TIP.
Below is a partial screenshot of the Pair Formation Status Table.
From State: At any time, an employee has a state. This is the state in which the employee is in before the timeevent happens.
Time Event Type: The field shows the time event recorded when the employee is in a given state.
It will change the state of the employee from “From state” to “To State”.
Unique Time Event Type: Time Event Type P01 can be used to record both clock in/clock out. If
the “From state” of employee is absent before clock in and the “Time Event Type” is P01, then it
means that the employee has clocked in. In such a case, 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 screenshot
above, the value of both time event type and unique time event type are P10 for “From state” –Absent before Clock In because no unique interpretation is needed.
To State: This is the state at which employee reaches from “From State” once the time event type
is recorded.
Continue: This field is used for interim postings. Let us say that there is an interim posting
between clock out and clock in and we would like to have two complete pairs – one from clock out
to interim posting and another from interim posting to clock in. The first two events form the first
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
7
PSGrp: This is Grouping of Personnel Subareas for Time Recording for which the same time types, time
transfer specifications, access control groups, and message types are defined.
PDC Processing Status: This field displays the PDC Processing Status which defines the behavior to be
taken into account during time pair formation.
Processing Status Text: This field displays the description of the PDC Processing Status.Start Date: This field displays the start date from which the PDC Processing Status is valid.
End Date: This field displays the end date till which the PDC Processing Status is valid.
Reaction: The return code in field reaction will specify the reactions to be taken for PDC Processing Status.
Let us now study the values relevant for our scenarios from Pair Formation Status Table and the relevant
values (C02 & C11) from PDC Processing Statuses Table.
TPT_PAIRSTAT2 Screenshot A – This shows the values in the table relevant for our scenarios.
V_T705B Screenshot B – The highlighted rows in the table show the values relevant for our
scenarios.
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
16
After maintaining Pair Formation Status Table - TPT_PAIRSTAT2 and PDC Processing Statuses Table -
V_T705B, the next step is to create time types. Below are the daily time types which are needed.
• Earliest Recorded Clock In – ZVB1• Latest Recorded Clock In – ZVB2• Earliest Recorded Clock Out – ZVB3• Latest Recorded Clock Out – ZVB4• First Clock In – ZVB5• Last Clock Out – ZVB6
Go to TCode SM30 > Table V_T555A.
ZVB1 – Earliest Recorded Clock In
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
22
After creating the six daily time types, I created five PCRs as mentioned below:
• ZVB4 - Find Earliest Recorded Clock In and Latest Recorded Clock In• ZVB5 - Find Earliest Recorded Clock Out and Latest Recorded Clock Out• ZVB6 - Determine First Clock In
• ZVB7 - Determine Last Clock Out• ZVB9 - Form Time Pair in TIP using First Clock In & Last Clock Out
Let us now go inside each PCR to understand its functionality.
PCR ZVB4 – The objective of PCR ZVB4 is to find the “earliest recorded clock in” and “latest
recorded clock in” in a shift and feed the values in daily time types ZVB1 (earliest recorded clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
23
If no clock in has been recorded, then the daily time types ZVB1 and ZVB2 won’t get generated.
If only one clock 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 checks if start time exists in time pair or not using OUTTPEXBTM. If start time
doesn’t exist (N), the time pair is moved to output table using COLOP *. If all time pairs
of the shift don’t have start time, then time types ZVB1 and ZVB2 aren’t created. Hence,
the values of ZVB1 and ZVB2 are 0.
• If the start time exists (Y) in time pair, the value of time type ZVB1 (Earliest Recorded Clock In) isread using HRS=DZVB1. If it is the first time pair with start time and getting processed in the rule, thevalue 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.
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
24
• After reading the value of time type ZVB1, it is compared with 0 using HRS?0. If the value of
ZVB1 is not greater than 0, it is processed under * and the start time of the time pair is read usingHRS=PBEG. The start time is added to time types ZVB1 (earliest recorded clock in) and ZVB2 (latest
recorded clock 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. Hence,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 processed through
Y (OUTTPEXBTM). The value of time type ZVB1 is read using HRS=DZVB1 (ZVB1 =
10.0000). This value is compared with 0 using HRS?0 and since the value of ZVB1
(10.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 = 08.0000) and it is compared with “earliest
recorded clock in” time type ZVB1 (10.0000) using HRS?DZVB1. Since 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 recorded clock in” for this shift and gets processed under *. Hence,
the start time (08.0000) of the current 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 respectively. Let us
assume now that the next time pair with start time has start time as 15:00:00. This time
pair will get processed 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 recorded clock in” time type ZVB1 (08.0000) using HRS?
DZVB1. Since the value of HRS=PBEG (15.0000) is greater than “earliest recorded clock
in” time type ZVB1 (08.0000), the time pair gets processed under >. Then the value
of HRS=PBEG (15.0000) is compared with “latest recorded clock in” time type ZVB2(10.0000). Since 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 clock in” for this shift and it gets
processed under >. Hence, the start time (15.0000) of the current 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 respectively. Let us
assume now that the next time pair with start time has start time as 13:00:00. This time
pair will get processed 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 recorded clock in” time type ZVB1 (08.0000) using HRS?
DZVB1. Since the value of HRS=PBEG (13.0000) is greater than “earliest recorded clock
in” time type ZVB1 (08.0000), the time pair gets processed under >. Then the value
of HRS=PBEG (13.0000) is compared with “latest recorded clock in” time type ZVB2
(15.0000). Since 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 clock in” for this shift and
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
26
• The PCR checks if end time exists in time pair or not using OUTTPEXETM. If end time
doesn’t exist (N), the time pair is moved to output table using COLOP *. If all time pairs of
the shift don’t have end time, then time types ZVB3 and ZVB4 aren’t created. 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 Clock Out) isread using HRS=DZVB3. If it is the first time pair with end time and getting processed 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 intime type ZVB3.
• After reading the value of time type ZVB3, it is compared with 0 using HRS?0. If the value of ZVB3 is
not greater than 0, then the time pair gets processed under * and the end time of the time pair is readusing HRS=PEND. The end time is added to time types ZVB3 (earliest recorded clock out) and ZVB4
(latest recorded clock 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. Hence,
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 compared with 0 using HRS?0 and since the value of ZVB3
(12.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 = 10.0000) and it is compared with “earliest
recorded clock out” time type ZVB3 (12.0000) using HRS?DZVB3. Since 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 recorded clock out” for this shift and it gets processed 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 respectively. Let us
assume now that the next time pair with end time has end time as 18:00:00. This time
pair will get processed through Y (OUTTPEXETM). The value of time type ZVB3 is read
using HRS=DZVB3 (ZVB3 = 10.0000). This value is compared with 0 using HRS?0 and
since 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 compared with “earliest recorded clock out” time type ZVB3 (10.0000) using HRS?
DZVB3. Since the value of HRS=PEND (18.0000) is greater than “earliest recorded clock
out” time type ZVB3 (10.0000), the time pair gets processed under >. Then the value
of HRS=PEND (18.0000) is compared with “latest recorded clock 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 recorded clock out” for this shift and the time
pair is processed under *. Hence, the end time (18.0000) of the current 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 *.
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
27
• Currently, the value of ZVB3 and ZVB4 are 10.0000 and 18.0000 respectively. Let us
assume now that the next time pair with end time has end time as 16:00:00. This time
pair will get processed through Y (OUTTPEXETM). The value of time type ZVB3 is read
using HRS=DZVB3 (ZVB1 = 10.0000). This value is compared with 0 using HRS?0 and
since 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 recorded clock out” time type ZVB3 (10.0000) using HRS?DZVB3. Since the value of HRS=PEND (16.0000) is greater than “earliest recorded clock
out” time type ZVB3 (10.0000), the time pair gets processed under >. Then the value
of HRS=PEND (16.0000) is compared with “latest recorded clock 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 recorded clock out” for this shift and the
time pair gets processed under <. Hence, this time pair is moved into output table using
COLOP *.
• Finally, the value of “earliest recorded clock out” time type ZVB3 and “latest recorded
clock out” time type ZVB4 are 10.0000 and 18.0000 respectively.
PCR ZVB6 – The objective of PCR ZVB6 is to find the “first clock in” by comparing “earliest clock
in” time type ZVB1 with “earliest clock out” time type ZVB3. If the value of ZVB1 is less than
ZVB3, then ZVB1 is the “first clock in” and its value should be fed in time type ZVB5 – First Clock
In.
If the value of ZVB1 is more than ZVB3, then there is a “missing clock in”. The “missing clock in”
is the “first clock in” and hence, the value of ZVB5 will be 0.0000.
If ZVB1 was not created due to “missing clock 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.
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
28
• Scenario 1: “Earliest Recorded Clock In” Time Type ZVB1 not created and “Earliest
Recorded Clock Out” Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the
value of “earliest recorded clock in” time type ZVB1 (blank) using HRS=DZVB1 and then
subtracts the value of “earliest recorded clock out” time type ZVB3 (10.0000) using HRS-DZVB3. The result is compared with 0 using HRS?0 and since this is not greater than 0, it
gets processed under *. The value of “earliest recorded clock in” time type ZVB1 is read
using HRS=DZVB1 and is fed into “first clock in” time type ZVB5 using ADDDBZVB5Z.
The value of ZVB5 is 0.0000 implying that the “first clock in” is missing.
• Scenario 2: “Earliest Recorded Clock In” Time Type ZVB1 has value 08.0000 and “Earliest
Recorded Clock Out” Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the value
of “earliest recorded clock in” time type ZVB1 (08.0000) using HRS=DZVB1 and then
subtracts the value of “earliest recorded clock out” time type ZVB3 (10.0000) using HRS-
DZVB3. The result is compared with 0 using HRS?0 and since this is not greater than
0, it gets processed under *. The value of “earliest recorded clock in” time type ZVB1(08.0000) is read using HRS=DZVB1 and is fed into “first clock in” time type ZVB5 using
ADDDBZVB5Z. Hence, the value of ZVB5 is 08.0000.
• Scenario 3: “Earliest Recorded Clock In” Time Type ZVB1 has value 12.0000 and “Earliest
Recorded Clock Out” Time Type ZVB3 has value 10.0000 - The PCR ZVB6 reads the value
of “earliest recorded clock in” time type ZVB1 (12.0000) using HRS=DZVB1 and then
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
31
• Scenario 4: “Latest Recorded Clock Out” Time Type ZVB4 has value 18.0000 and “Latest
Recorded Clock In” Time Type ZVB2 not created - The PCR ZVB7 reads the value of
“latest recorded clock out” time type ZVB4 (18.0000) using HRS=DZVB4 and then
subtracts the value of “latest recorded clock in” time type ZVB2 (0.0000) using HRS-
DZVB2. The result is compared with 0 using HRS?0 and since this is greater than 0,it gets processed under >. The value of “latest recorded clock out” time type ZVB4
(18.0000) is read using HRS=DZVB4 and then fed into “last clock out” time type ZVB6
using ADDDBZVB6Z. Hence, the value of ZVB6 is 18.0000.
By now, we have identified the “first clock in” and “last clock out” of a shift. We also have the
solution logic in place to identify if the “first clock in” or “last clock out” of any shift is missing or
not.
PCR ZVB9 - The next step is to create a time pair using the “first clock in” and “last clock out”
that we have determined and process only this time pair for further evaluation. Any other time
pair if present gets eliminated from further processing.
Below is the screenshot of PCR ZVB9.
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
33
• The start time of the time pair is deleted using FILLPB-
• The start of record type (P10) is deleted using FILLPF• The no. of hours is reduced to 0.0000 using FILLPN
Then the value of the “last clock out” time type ZVB6 (0.0000) is read using HRS=DZVB6 and
then compared with 0 using HRS?0. Since 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 FILLPE-
• The 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 processing using COLOP *.• Hence, the time pair has both “From” time and “To” time as blank.
Scenario 2: “First Clock In” (ZVB5) and “Last Clock Out” (ZVB6) have value as 0.0000 and 18.0000
respectively – The first time pair moves for processing under Y. The value of “first clock in” time
type ZVB5 (0.0000) is read using HRS=DZVB5 and then compared with 0 using HRS?0. Since 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 FILLPB-• The start of record type (P10) is deleted using FILLPF• The no. of hours is reduced to 0.0000 using FILLPN
Then the value of the “last clock out” time type ZVB6 (18.0000) is read using HRS=DZVB6 and
then compared with 0 using HRS?0. Since 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 clock 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 changed to 2 using FILLP12 implying that clock in time is missing fromtime pair.
• The time pair is moved to output table for further processing using COLOP *.• Hence, the time pair has “From” time and “To” time as blank and 18.0000 respectively.
Scenario 3: “First Clock In” (ZVB5) and “Last Clock Out” (ZVB6) have value as 08.0000 and 0.0000
respectively – The first time pair moves for processing under Y. The value of “first clock 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 processing happens under >. Below things happen for the first
time pair:
8/12/2019 Determination of First Clock in & Last Clock
Determination of First Clock In & Last Clock Out in Positive Time Evaluation
Generated by Jive on 2014-08-12+02:00
34
• The start time of the time pair is set from “first clock in” time type ZVB5 using FILLPB.• The start of record type (P10) is set for time pair using FILLPFP10.
Then the value of the “last clock out” time type ZVB6 (0.0000) is read using HRS=DZVB6 and
then compared with 0 using HRS?0. Since 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 FILLPE-• The 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 changed to 3 using FILLP13 implying that clock out time is missing from
time pair.
• The time pair is moved to output table for further processing using COLOP *.• Hence, the time pair has “From” time and “To” time as 08.0000 and blank respectively.
Scenario 4: “First Clock In” (ZVB5) and “Last Clock Out” (ZVB6) have value as 08.0000 and
18.0000 – The first time pair moves for processing under Y. The value of “first clock 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 processing happens under >. Below things happen for the first time
pair:
• The start time of the time pair is set from “first clock in” time type ZVB5 using FILLPB.• The start of record type (P10) is set for time pair using FILLPFP10.
Then the value of the “last clock out” time type ZVB6 (18.0000) is read using HRS=DZVB6 and
then compared with 0 using HRS?0. Since 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 clock 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 processing using COLOP *.
• Hence, the time pair has “From” time and “To” time as 08.0000 and 18.0000respectively.
The next step is to include these PCRs ZVB4, ZVB5, ZVB6, ZVB7 and ZVB9 in positive time management
schema.
8/12/2019 Determination of First Clock in & Last Clock