Carry Forward Absence Quota

I. Purpose

     One of common and complex request involving Absence Quota is carry forward from current year to next year. There are many concerns and questions posted to find appropriate solution. Thus in this document I will give you a good solution and step by step how to CARRY FORWARD absence quota. Basing on my document, you will be more easier to adapt SAP Time Management to meet your customer's expectation.
     However, there are some basic information I have already mentioned in another documents, such as: grouping Personnel Structure (EE group and EE subgroup), Enterprise Structure (Personnel Area and Personnel Sub-Area), Grouping for Time Recording and the way to generate absence quota by using Time Type, so I will not re-write it again. Please look at link Absence Quota basing on Working Date.
II. Requirement

     Here it's the customer's expectation involving Absence Quota Type 20 - Sick Leave that should be implemented in their system:
          1. Yearly Absence Quota is 30 days.
          2. Generate 2.5 days (30/12) per month for employee at the last date of month.
          3. Start available: Hiring date or 1st Jan. End available: end of year 31st Dec.
          4. If remaining >= 10 days in this year, 10 days will be carried forward to next year.
III. Solution

     First of all, you have to create 2 Time Type and overview purpose as below
     1. Time Type 9D50 will be stored value to generate Absence Quota. Whenever Time Type is not initial, Absence Quota in IT2006 will be created automatically when accomplishing run Time Evaluation PT60.
          9D50 will be generated in a customized PCR with logic below:
                    - plus 2.5 days (30/12)
                    - plus accumulated in Time Type 9WSL
                         => assign to Time Type 9WSL
                    - Clear 9WSL immediately (to be sure that duplication 9WSL will not happen).                                                                        
     2. Time Type 9WSL check whether remaining Absence Quota bigger or equal 10 or not? If it's exactly, number 10 will be inserted into Time Type 9WSL and 9WSL is a bridge to bring this value from current year to next year.
          Note: create Time Type 9WSL 1 time per year, after accomplish generated Absence Quota on 31st Dec. So 9WSL exists only from 31st Dec to end of Jan next year. Why? because whenever last of month is coming, 9D50 will be inputted value and 9WSL will be blank So from Feb to Dec, 9WSL always equals 0.
     These are important points. From now steps by steps in configuration V_T559L and Time Schema also will be mentioned here.
1. Grouping

     As mention at the beginning, the Grouping I will use here: EE: 2, PA: 09 and Time Recording: 01.
2.Constant and Time Type

     2.1. ZPLEL Yearly absence quota is 30, it's maintained in V_T511K
     2.2. Time Type 9D50
     It's only used 1 time per month so it's configuration is really simple. Just save as day balance.
     2.3. Time Type 9WSL
     As you can see the purpose of 9WSL, storing value on last day of year and bring to next year, so you have to configure as picture below:
Activate "Transfer previous year". Without choosing this function, whenever 1st Jan comes, value in 9WSL will be blank. It means value calculated on 31st Dec will not carried to the day after - 1st Jan.
3. Configure in V_T559L
     With grouping above, there are steps for configuring in Table view Automatic Absence Quota Generation.
     3.1. Base Entitlement tab: of course it's will be assigned to Time Type 9D50.
Base entitl.png
     3.2. Transfer tab: it's important tab. Specifies the time at which the accrual entitlements are transferred to the Absence Quotas infotype (2006) to be made available for deduction. As the absence quota has to created monthly (at the last day of every month), so "Per time Evaluation Period" is necessary.
     If you choose "Per calendar year", assuming that from Jan - Nov, employee has 2.5 days Sick Leave every month, but when you open IT2006 in PA20, you cannot see Sick Leave. Why? because Transfer time to IT2006 is Calendar year, it's only transfer value in Time Type 9D50 to IT2006 on 31st Dec.

     Co-operation with Validity/deduction interval in index 3.3. It will help us accumulate Absence Quota monthly into yearly.
    3.3. Validity/deduction interval
Validity Deduction interval.png
     As mention in 3.2, both of them will create Absence Quota monthly but accumulate yearly
     Transfer time is monthly, so whenever 9D50 is not blank, Absence Quota will be generated in IT2006 with period is:
          Begin Date : Calendar Year (Start) => normally it's hiring date in 1st year, and 1st Jan from second year.
          End date: Calendar Year (End) => always 31st Dec.
    Deduction Period:
          Begin Date : Start of validity interval: it's Calendar year (chosen last step): => hiring date or 1st Jan.
          End date: End of validity interval: it's Calendar year => always 31st Dec.

     For example: employee joined company on 1st-Oct-2011
          in Oct-2011, employee has 2.5 days in 9D50, in IT2006: 1 record:
               Start 01.10.2011 - end 31.12.2011, Number 2.5, deduction: Start 01.10.2011 - end 31.12.2011.
          next month Nov-2011:
               just update record above:
               Start 01.10.2011 - end 31.12.2011, Number 5.0, deduction: Start 01.10.2011 - end 31.12.2011.
          in Dec-2011
               Start 01.10.2011 - end 31.12.2011, Number 7.5, deduction: Start 01.10.2011 - end 31.12.2011.
    3.4. Other tabs aren't important so only sharing:
Accural Period.png
Accural Entitl.png

4. Time Schema and PCR
    4.1. Time schema ZW04:
    Copy new Schema from TM04 and insert new schema with structure below:
     NOTE: you have to insert PCRs in order as same as I have done here.
     The logic already explained in this picture. Only call PCR ZW6C (creating Time Type 9D50) for generating Sick Leave Quota If EOM is true
     CUMBT: update value of time type in database.
     QUOTA: update absence quota and create new / modify records in IT2006.

     Next, check 31st Dec by ZI51, it's correct, ZW51 will be call to update value for Time Type 9WSL. After that CUMBT must be call again.
     4.2: PCR ZW6C
     ZW6C SL balance.png

HRS=CZPLELGet value ZPLEL in V_T511K, it's 30.

HRS/12Divide 12, current value is 2.5

HRS+M9WSLPlus Accumulate value of 9WSL into HRS.

ADDDB9D50ZAdd into Time Type 9D50

HRS=0HRS = 0

        4.3: PCR ZI51
     4.4. PCR ZW51
     ZW51 - Carry Absense Quota.png

HRS=FR20CGet Absence Quota left with subtype 20 in IT2006

HRS?10     Comparing with 10



ADDDB9WSLZAssign to 9WZL to carry forward


     That's all Next part is testing to be sure that solution is correct

IV. Testing

     Hiring employee on May-2011
     Running PT60 until 31st May 2011, 2.5 Absence Quota with period from 01.05.2011 to 31.12.2011
     => It's correct
     Running PT60 until 31st Dec 2011, 20 days (from May to Dec: 8 months) Absence Quota with period from 01.05.2011 to 31.12.2011
     => It's correct

     Running PT60 until 31st Jan 2012, 12.5 days (10 days in 2011 and 2.5 days in Jan 2012) Absence Quota with period from 01.01.2012 to 31.12.2012
     => ALL is correct

Note: Another solution is using UPDTQA** (update Absence Quota directly, not use Time Type). You can follow my explanations in thread

No comments:

Post a Comment