Absence Quota Basing On Working Date - SAP Blogs
Absence Quota Basing On Working Date - SAP Blogs
Like
I. Purpose
This document will provide more information about Absence Quota Generation
RSS Feed
and Time Schema. I have seen a lot of question involving Time Schema – one of the
most difficult things in SAP HCM,so I hope the document will support you better to
control Time Schema. In document, I will generate Absence Quota by using Time
Schema. I have to create many PCRs with quite complex logic and input them into
many where in Time Schema. You can find how to link mater data, controlling Time
Type and processes of Time Evaluation.
Note: before looking at the document, basic knowledge in Absence Quota must
be investigated carefully first.
II. Requirement
I will focus on 1 actual customer’s expectation. It’s one of common request
whenever implementing or supporting SAP HCM in enterprise’s system:
1. Employee will has 1 Paid Leave Quota after having 20 working days on system.
2. Working date is: when he has Attendance on IT2002 (of-course not including
the day off: Saturday or Sunday), and has full check-in and check out in Time Events
IT2011.
4. Only Available for applying from the next year, until 31.12.9999
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 1/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
III. Solution
First in Time Schema, you have to calculate Working Days by using data
from 2 Infotype: 2002 (Attendances) and 2011 (Time Events), thus we have to
copy from standards schema TM00 to our schema and modifying it. Standard
Functions in Time Schema retrieve data from 2 Infotype and post them into
internal table TIP, in Schema – useful links & T-Codes there is useful link to
understand how time data stored in TIP. In order to retreive data in TIP, standard
functions RTIP or PTIP must be used to get data and then checking it.
E = Time event
C = Attendance/absence reasons
Next checking whether the last date coming, Working Date Total divide 20 and
giving these number to Absence Quota. So in Time Evaluation, we have to check
whenever 31-Dec is run.
It’s just summarization. Now steps be steps will be shown in order from here.
1. Grouping
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 2/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
2. Base Entitlement
As you can see, 3 grouping values above will be used here (2, 08 and 01).
Thanks to time type 9D50, whenever we assign value to 9D50, Absence Quota
Type 10 (Paid Leave) in IT2006 will be created. The configuration of Type Type
9D50, nothing is important with configuration of 9D50
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 3/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
As I mention at the beginning in solution part, the PCR ZWA1 has logic as below
(using T-Code PE02 to create PCR).
Operation “OUTTPORIGS Origin status” returns Origin status in internal table TIP
(E: data inputted from IT2011, P data inputted from IT2002).
Operation “OUTTPEXTIM Times exist?” checks whether Time Event has full
check in and check out or not. Y means it’s correct, both check in and check out
exist.
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 4/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
The day fits conditions here, Time Type 9M99 will be accumulated 1. It’s
configuration of 9M99
2 Transfer previous are clear right? because we just generate on last date of year
so we have move data all months (from Jan to Nov) into Dec.
After successfully calling Function P2011, P2002, P2001, etc, ZWA1 is inserted
into Time Schema with Function RTIP.
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 5/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 6/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
As you can see, 1st check Dec, 2nd check EOM, the day fitting 2 conditions is
Dec-31st, the last date of Dec. There are many solutions for checking Dec-31st.
You can check by using Month and Day directly by using 2 operations:
HRS=BCURDY : current day; HRS=CURMO : current month period
On Dec-31st, ZWA2 will be called to generate Absence Quota. Next point will
explain the PCR. Note: these PCRs have to inserted Time Schema before 2
standard Functions: CUMBT and QUOTA.
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 7/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Other while, Accumulated Woring Days divides ZZ000 and inserts into time type
9D50. After that clearing value of 9M99.
These’s all done for calculating Working Days Yearly and updating value into
Absence Quota in IT2006 throung time type 9D50.
It’s done in Table View V_T559D with grouping 2, 08 and absence Quota 10 Paid
Leave
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 8/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Validity Interval: it’s period for Start Date and End Date in IT2006. In these picture, on
the left, it’s Start of Calendar Year (normally it’s Jan-01st), and the right it’s End of
Calendar Year( of course it’s Dec-31st).
Deduction Interval: it’s period that employee can be apply your Absence Quota.
Deduction From: End of validity interval, it means Dec-31st. But looking Relative
Position: 1 Days. So Deduction From will start from Dec-31st + 1 days, so it will be
Jan-01st of next year
Deduction To: as same as Deduction From but relative is 999 Month so it’ll be
31.12.9999.
IV. Testing
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 9/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
2nd case: Inputting more 2 days full check in and check out (for case miss check
in/ check out, I tested but not post here & moreover I have test same case in
Understanding Relationship PT and PY):
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 10/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Regards!
Woody
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 11/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Alert Moderator
Assigned Tags
Related Questions
Abscence Quoata (Time Management)
By Former Member Jul 17, 2011
16 Comments
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 12/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Former Member
January 24, 2013 at 9:29 am
excelent woody
Thanks Vibin
Former Member
February 19, 2013 at 10:39 am
Hi,
Former Member
February 19, 2013 at 12:17 pm
Hi,
John
I'd like to provide some documents involving processing Time Data, however, I am busy with new
project when having free time, I will upload it
Former Member
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 13/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Hello Woody,
Thank you very much for documents provided really it will helps to many .
Thanks&Regards
Raji
Thanks Raji!
If you are clear my documents, you will resolve your issues soon
Regards!
Woody
Former Member
April 26, 2013 at 11:49 am
Regards!
Vijay
Former Member
May 24, 2013 at 4:55 pm
Helpful docs for all sap hcm consultants...Excellent technical docs and admirable capability..
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 14/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Regards,
Woody
SAP_Learner ASPIRANT
April 11, 2014 at 4:15 pm
Hi Woody,
Yes of course. In - ve time, you don't have IT2011, so in pcr ZWA1, you need only check from
IT2002 with OUTTPORIGS Origin status = P heee
SAP_Learner ASPIRANT
October 11, 2015 at 7:28 am
Hi,
Please let me know if I want to consider days off (like SAT & SUN) how shall I modify the PCR?
Sriram Tamil
October 12, 2015 at 6:43 am
Hi SAP Learner.
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 15/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Please raise a separate thread for your query with detailed explanation. this is not the place where
you can post your query.
Thanks
Sriram
arun dev
April 26, 2017 at 7:42 am
Dear Woody,
Actually my client also having same scenario,i configure as per your process pcr's reading properly but
quota is not displaying in log
Thanks& Regard
Dev
Add Comment
Find us on
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 16/17
7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs
Newsletter Support
https://blogs.sap.com/2013/01/04/absence-quota-basing-on-working-date/ 17/17