Introduction


Overtime is defined as work done outside the planned working hours. What if your client gives you a requirement where any work done in the last 2 planned working hours will be treated as Overtime during the Ramadan Period? This is contrary to the basic definition of overtime and is called Ramadan Overtime.


Client Situation


Client was implementing positive time management. Any work done in the plant in the last 2 planned working hours will be treated as Ramadan Overtime. These hours should be added to the overtime wage type for processing in payroll. Also, the overtime work done between 9 pm – 6 am will be at R2 rate (Higher Rate) and the overtime work done between 6 am – 9 pm will be at R1 rate. Ramadan overtime is not applicable for OFF days (planned working hours = 0) or on public holidays if the employee is eligible for public holiday.


Let us assume that the employee is on shift WSR with morning shift from 06:00 – 14:00, afternoon shift from 14:00 – 22:00 and night shift from 22:00 – 06:00 and is also eligible for public holiday. Hence, if the employee works at plant between 12:00 – 14:00 in morning shift, he will be paid Ramadan Overtime at R1 rate. If he works at plant between 20:00 – 22:00 in afternoon shift, he will be paid Ramadan Overtime at R1 rate for work done between 20:00 – 21:00 and at R2 rate for work done between 21:00 – 22:00. If he works at plant between 04:00 – 06:00 in night shift, he will be paid Ramadan Overtime at R2 rate. This also implies that only data from IT2011 will be used towards Ramadan Overtime. Any attendance captured in IT2002 during the last 2 planned working hours will not contribute towards Ramadan Overtime.


Also, the overtime hours would need to be rounded off as per the below logic:


  • 0 min till < 15 min to be rounded off to 0 min
  • 15 min till < 45 min to be rounded off to 30 min
  • 45 min till 60 min to be rounded off to 60 min

Solution Design


Before going through the solution design, let me give you a pictorial depiction of what will constitute Ramadan Overtime with regards to afternoon shift. The afternoon shift is from 14:00 – 22:00.

/wp-content/uploads/2015/01/1_635278.jpg

 

The above diagram depicts period for R1 and R2 rate Ramadan Overtime during an afternoon shift of 14:00 – 22:00. The orange color lines represent various continuous time pairs. For time pairs which are overlapping across R1 and R2 rates timings, we would need to write a PCR to split the timings to arrive at Ramadan Overtime Hours with R1 and R2 rates.


We will need to create a WSR for Ramadan Overtime and ensure that this WSR is maintained in IT0007 for the Ramadan Period. Below are the configuration done for Ramadan WSR.



V_T550A


/wp-content/uploads/2015/01/2_635279.jpg

V_T551A


/wp-content/uploads/2015/01/3_635280.jpg


V_T508A


/wp-content/uploads/2015/01/4_635281.jpg


Generation of Work Schedules


/wp-content/uploads/2015/01/5_635282.jpg

/wp-content/uploads/2015/01/6_635283.jpg

V_T551C


/wp-content/uploads/2015/01/7_635284.jpg

We will require the below daily time types for storing Ramadan Overtime hours R1 and R2.


V_T555A

/wp-content/uploads/2015/01/8_635288.jpg

  /wp-content/uploads/2015/01/9_635289.jpg



/wp-content/uploads/2015/01/10_635290.jpg


We will create 2 constants in Table V_T511K to define the timings where R1 changes into R2 and vice versa.


V_T511K


/wp-content/uploads/2015/01/11_635291.jpg

In the above table, we have maintained the value of ZAR12 as 21.00 because overtime rate changes from R1 to R2 at 21:00 hours in afternoon shift. For night shift, we have maintained the value of ZNR12 as 30.00 because overtime rate changes from R2 to R1 at 30:00 hours in night shift. In SAP, 6:00 hours on current date is 30:00 hours for previous day shift.


Below is the PCR which has been written to read overtime work done during the last 2 planned workings hours of the shift. This is a very big PCR and hence, I will give you an overview of its design.


/wp-content/uploads/2015/01/12_635292.jpg

/wp-content/uploads/2015/01/13_635293.jpg

/wp-content/uploads/2015/01/14_635294.jpg/wp-content/uploads/2015/01/15_635295.jpg  /wp-content/uploads/2015/01/16_635296.jpg

/wp-content/uploads/2015/01/17_635300.jpg

/wp-content/uploads/2015/01/18_635301.jpg

/wp-content/uploads/2015/01/19_635302.jpg

/wp-content/uploads/2015/01/20_635303.jpg

/wp-content/uploads/2015/01/21_635304.jpg

/wp-content/uploads/2015/01/22_635305.jpg

/wp-content/uploads/2015/01/23_635306.jpg

We are basically trying to check each time pair in the last 2 planned working hours of the shift to see if it falls in the R1 or R2 time zone and accordingly, add these hours to daily time types ZRR1 or ZRR2.


We first determine the personnel subarea and process this PCR only personnel subarea 0001. Then we determine the pair type and process the PCR for pair types 1 only. Pair type 1 means that the data is coming from IT2011. Then we determine the work schedule rule and process the PCR for Ramadan Work Schedule S0001-01 only. Then we try to find out if planned working hours are greater than 0 or not. If the planned working hours are 0, we move the time pairs to output table. If the planned working hours are greater than 0, we read the shift end time and subtract 2 from it to determine the time 2 hours before shift end time. This time is stored in daily time type ZET2.


We then process time pairs belonging to Time Id 02 and 03 only and then check if the day is a public holiday or not. If the day is a public holiday, we check if the day type is blank (employee not eligible for public holiday) or not. If the day type is blank, we process it further for Ramadan Overtime and all hours will be R2 overtime hours because the day is a public holiday. If the day is not a public holiday, we determine the daily work schedule and based on each daily work schedule, we process it further to determine Ramadan Overtime.


In case of morning shift, all Ramadan Overtime hours will be R1 hours because overtime done between 6 am and 9 pm will be R1 hours. In case of afternoon shift, Ramadan Overtime hours may get split between R1 and R2. In case of night shift, Ramadan Overtime hours will be R2 hours only in the current scenario.


Each time pair is checked against the last 2 planned working hours of the day to see if it overlaps with that or not. If it overlaps with that, we also check if the timings fall within 6am – 9pm or 9pm – 6am to determine R1 or R2 overtime hours. These overtime hours are cumulated in time types ZRR1 (for R1 hours) and ZRR2 (for R2 hours).


We need to create another PCR to round off the hours cumulated in time types ZRR1 and ZRR2 and then add them to their respective overtime wage types.

 

/wp-content/uploads/2015/01/24_635307.jpg

/wp-content/uploads/2015/01/25_635308.jpg

The rounding rule 92 is defined as shown below:


V_T559R


/wp-content/uploads/2015/01/26_635309.jpg

The two PCRs are placed in the positive time schema ZPT1 as shown below:


/wp-content/uploads/2015/01/27_635310.jpg

Ensure that the PCRs are placed after function TIMTP because the function will be responsible for splitting time pairs, assignment of Time Ids and assignment of time types to time pair.


Also, ensure that the parameters for function P2001 and P2002 in the schema are blank as shown below:


/wp-content/uploads/2015/01/28_635311.jpg

With the solution design in place, let us proceed to testing.

Solution Testing


Please refer below the screenshots related to key infotypes before we do the testing.


IT0001

/wp-content/uploads/2015/01/29_635312.jpg

IT0007 – Ramadan Period is for the month of Aug’13 and hence, Ramadan WSR is assigned for that period.

/wp-content/uploads/2015/01/30_635313.jpg

Work Schedule

/wp-content/uploads/2015/01/31_635314.jpg

/wp-content/uploads/2015/01/32_635315.jpg

/wp-content/uploads/2015/01/33_635316.jpg

/wp-content/uploads/2015/01/34_635317.jpg

Let us capture time events in IT2011 for the given dates and it should result in Ramadan Overtime as shown below:

/wp-content/uploads/2015/01/35_635318.jpg

IT2011

/wp-content/uploads/2015/01/36_635319.jpg

/wp-content/uploads/2015/01/37_635320.jpg

/wp-content/uploads/2015/01/38_635324.jpg

PT60 – Time Evaluation Run

/wp-content/uploads/2015/01/39_635325.jpg

Time Evaluation runs successfully.

/wp-content/uploads/2015/01/40_635326.jpg

TCode PT_BAL00 – Time Types ZRR1 & ZRR2

/wp-content/uploads/2015/01/41_635327.jpg

Report Output

/wp-content/uploads/2015/01/42_635328.jpg

TCode PT_BAL00 – Ramadan Overtime Wage Types

/wp-content/uploads/2015/01/43_635329.jpg

Report Output


/wp-content/uploads/2015/01/44_635330.jpg

Here, I come to the end of this knowledge artifact. I hope this document has been beneficial for you.


Warm regards,

Vivek Barnwal

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Priya Gupta

    simply superb I can see a long pcr If sucessfactors comes in to market whatevr knowledge that we gained and experimented will that be useful in futute my main questions

    experts what are your views on SF about these scenarios in future

    (0) 

Leave a Reply