0% found this document useful (0 votes)
146 views17 pages

Absence Quota Basing On Working Date - SAP Blogs

1) The document discusses generating absence quotas in SAP HCM based on an employee's working days. 2) It describes counting an employee's working days by checking their attendance data and time event entries, and accumulating those working days into a time type. 3) On December 31st of each year, it checks the accumulated working days and assigns the employee an absence quota by dividing the working days by 20.

Uploaded by

p jaya
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)
146 views17 pages

Absence Quota Basing On Working Date - SAP Blogs

1) The document discusses generating absence quotas in SAP HCM based on an employee's working days. 2) It describes counting an employee's working days by checking their attendance data and time event entries, and accumulating those working days into a time type. 3) On December 31st of each year, it checks the accumulated working days and assigns the employee an absence quota by dividing the working days by 20.

Uploaded by

p jaya
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/ 17

7/20/22, 3:21 PM Absence Quota basing on Working Date | SAP Blogs

Community Topics Groups Answers Blogs Events Programs Resour

Ask a Question Write a Blog Post

Trong Minh (Woody) Nguyen


January 4, 2013 | 7 minute read

Absence Quota basing on Working


Date
 16  12  12,613
Follow

 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.

3. Absence Quota’ll generated yearly.

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.

Origin indicator of TIP as below

E = Time event

O = Overtime from Overtime infotype (2005)

A = Absence from Absences infotype (2001)

P = Attendance from Attendances infotype (2002)

R = Availability from Availability infotype (2004)

D = Generated planned pair

C = Attendance/absence reasons

So we will check: if origin indicator is P, 1 working day will be counted. If origin


indicator is E, next step is checking whether in that day employee has full check in
check out or not. These points above will accumulate Working Date Total into 1 Time
Type.

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

Personnel Structure (EE group and EE subgroup)

Using Table View V_503_E in T-Code SM31 / SM30. My grouping is 2.

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

Enterprise Structure (Personnel Area and Personnel Sub-Area).

Using Table View V_001P_I. It’s 08

Grouping for Time Recording:

Using Table View V_001P_H

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

3. Counting Working Days

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

Cumulate in period balance is 1: The time type is cumulated in a period balance.


Our period here is month.

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.

Transfer previous year is up to you. In my schema, it isn’t necessary because in


31st Dec, Absence Quota is generated, so Accumulated working days will be
blank.

Now using with Function RTIP / PTIP in Time schema (IMPORTANT)

I copied schema ZW01 from TM00 in T-Code PE01.

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

This is these all logic to calculate Working Days.

4. Checking EOY (Dec-31st)


Creating 1 PCR to check whether month is Dec or not.

VARSTCURMO Current period: it returns current period (not current system ,


current period is the month that Time Evaluation is running. For example if you
are running PT60 for 2 months: Jan to Feb, so the first current period is Jan, after
accomplish running for all days in Jan, current period will be Feb).

Next ZI15 is inserted into Time Schema ZW01.

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.

5. Generate Absence Quota.


PCR ZWA2 will take responsibility to generate Absence Quota.

Retrieving Accumulated Working Days in 9M99 by HRS=M9M99. Must plus with


D9M99 (Daily value of 9M99, because only running CUMBT, Daily time type value
will be updated into Accumulated time type).

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

Comparing with constant in V_T511K ZZ000 (it’s 20). If accumulated working


days is lower than 20 until last day of year, I will clear by assigning 0 to them.

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.

6. Period in Absence Quota


Next, I will show how to generated yearly and Available for applying from the next
year, until 31.12.9999.

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.

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

IV. Testing

Hiring employee in Grouping 2, 08 and 01 on Jan-01st-2010.

1st case: having only 2 attendance records in IT2002

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

Attendance Total: 26 (Jan) + 26 (Oct) = 52 days.

After running PT60 until Dec-31st:

Employee has 2.6 days in Absence Quota ( 52/20 = 2.6).

Period: 01.01.2010 -> 31.12.2010.

Deduction period: 01.01.2011 -> 31.12.9999

=> All is correct

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

Working days = 52 (attendance in IT2002) + 2 ( in IT2011) = 54 days.

After running PT60 until Dec-31st:

Employee has 2.7 days in Absence Quota ( 54/20 = 2.6).

Period: 01.01.2010 -> 31.12.2010.

Deduction period: 01.01.2011 -> 31.12.9999

=> All is correct

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

HCM (Human Capital Management)

Similar Blog Posts 


Deduction Rule Priority in Absence Deduction
By Former Member May 31, 2012

Absence and Quota Configuration Made Easy (Part I)


By Shine Sebastian Joseph May 15, 2016

Steps to configure Absence Quotas...


By Former Member Sep 30, 2013

Related Questions 
Abscence Quoata (Time Management)
By Former Member Jul 17, 2011

IT2001. Deduction Order Change


By Frances Vanalmelo Apr 30, 2010

Reduction Rules after 1 month of Unpaid Absence


By Former Member Sep 08, 2014

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

Like 0 | Reply | Alert Moderator | Share

Trong Minh (Woody) Nguyen | Blog Post Author


January 25, 2013 at 8:57 am

Thanks Vibin

Like 0 | Reply | Alert Moderator | Share

Former Member
February 19, 2013 at 10:39 am

Hi,

Woody Awesome Work Keep it up..Great job..

Like 0 | Reply | Alert Moderator | Share

Former Member
February 19, 2013 at 12:17 pm

Hi,

Nice one Woody..................good job

John

Like 0 | Reply | Alert Moderator | Share

Trong Minh (Woody) Nguyen | Blog Post Author


February 19, 2013 at 2:11 pm

Thanks Srikanth and 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

Like 0 | Reply | Alert Moderator | Share

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

March 12, 2013 at 11:45 am

Hello Woody,

Thank you very much for documents provided really it will helps to many .

Thanks&Regards

Raji

Like 0 | Reply | Alert Moderator | Share


Trong Minh (Woody) Nguyen | Blog Post Author
March 12, 2013 at 2:25 pm

Thanks Raji!

If you are clear my documents, you will resolve your issues soon

Regards!

Woody

Like 0 | Reply | Alert Moderator | Share

Former Member
April 26, 2013 at 11:49 am

Good understanding to me Woody....and keep posting the same type of issues.....

Regards!

Vijay

Like 0 | Reply | Alert Moderator | Share

Trong Minh (Woody) Nguyen | Blog Post Author


May 14, 2013 at 1:44 am

Thanks Vijay Sure

Like 0 | Reply | Alert Moderator | Share

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

Like 0 | Reply | Alert Moderator | Share

Trong Minh (Woody) Nguyen | Blog Post Author


August 11, 2013 at 4:50 am

Thankssssss for your very goooooodddddd words.

Regards,

Woody

Like 0 | Reply | Alert Moderator | Share

SAP_Learner ASPIRANT
April 11, 2014 at 4:15 pm

Hi Woody,

Is it possible to do if I am using -Ve time management?

Like 0 | Reply | Alert Moderator | Share

Trong Minh (Woody) Nguyen | Blog Post Author


April 12, 2014 at 5:44 am

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

Like 0 | Reply | Alert Moderator | Share

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?

Like 0 | Reply | Alert Moderator | Share

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

Like 0 | Reply | Alert Moderator | Share

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

Like 0 | Reply | Alert Moderator | Share

Add Comment

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

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

You might also like