cancel
Showing results for 
Search instead for 
Did you mean: 

Computation of Earned Leave Quota

Former Member
0 Kudos

Hi all,

I am using time evaluation to grant earned leave. However, I met with an issue trying to grant the correct quota.

Following is my business requirement

1) Annual quota is 16 days

2) Earned leave will be granted on the following basis

Jan - 1 day

Feb - 3 days

Mar - 4 days

Apr - 5 days (and so on) - formula = round off of 16days/12 * no. of months worked


So my approach is to

1) To accrual base on monthly.

2) To do pro-rata by the system

3) To transfer once accrual, without Transfer packages

4) And to round off to the nearest whole number.

But the result generated is different from expected. Because though the 1.33333 is transferred, the system rounds the earned quota and then add to the total. Actually I am expecting it to be 2.66666 as total and then it will be rounded to 3.

Appreciate your advise and apologies if it is repeated thread, as I couldn't find the correct thread to look into.

Accepted Solutions (0)

Answers (2)

Answers (2)

vianshu
Active Contributor
0 Kudos

Hi Wai,

I couldn't view all your screenshots as they are not appearing correctly.

However, please go through the below document where I have covered the rounding scenario for annual leave.

I hope this will help you to resolve this issue.

Thanks and regards,

Vivek Barnwal

Former Member
0 Kudos

Hi Vivek,

Pls pardon me if I understood your document wrongly.

It seems that your scenario is based on the rounding of annual leave, which is a one-time grant.

But for my case, I am trying to give the earned leave on a monthly case and to do a round off based on the total earned.

I am expecting the following

Jan - final total of 1 day (16days/12months * 1 month = 1.33333)

Feb - final total of 3 days (16days/12months * 2 months worked so far = 2.66666)

Mar - final total of 4 days (16days/12months * 3 months worked so far = 3.99999)

However, the system is currently doing the following

Jan - final total of 1 day

Feb - final total of 2 days

Mar - final total of 3 days

System is granting 1 day per month because 1.33333 is rounded down then added to the quota.

I have tried accrual by using Transfer of 1.0 day, but the system is not able to grant 2 days in the month of Feb.

Regards

Wai

vianshu
Active Contributor
0 Kudos

I think your scenario is unique one. I don't it is rounding. You are only passing the integer values and carrying forward the fractional values to next month.

Did I understand your requirement correctly?

Thanks and regards,

Vivek Barnwal

Former Member
0 Kudos

Hi Vivek,

Thanks for your reply.

My requirement is to round off the earned leave, but the accrual period is from the start of the calendar year, till the time that time evaluation is executed. Thereafter, to do a rounding.

SumanPoddar
Active Participant
0 Kudos

In your scenario, you have to transfer incremental quota change and it should be rounded in PCR before QUOTA function.

Please have a look into below for calculation logic..

Now you have to transfer the whole logic in using time PCR.

- Suman

Former Member
0 Kudos

Hi Suman,

Thanks for your reply. So am I right to say that SAP does not have a standard approach for this requirement?

The logic is nice, but I need to have access keys to create the function that I can insert before QUOTA. Is there other way?

Thanks and Regards

Wai

SumanPoddar
Active Participant
0 Kudos

Hi Wai,

You don't required access key to implement this change. You can do it by PCR(T.code-PE02) and even if you go for custom function, you don't need access key.

Regards.

Suman

Former Member
0 Kudos

Hi Suman,

Thanks much for the advice.

But I think I am doing it wrongly. Could you pls advice further?

I created a PCR to do rounding according to rounding rule 01.

And I inserted this PCR before the QUOTA function. But the absence quota is not updated.

Thanks and Regards

Wai

Former Member
0 Kudos

Hi experts,

Able to help advise pls?

SumanPoddar
Active Participant
0 Kudos

Hi,

For rounding you can take the help of operation 'ROUNDH' within a PCR. Before sending the time types to QUOTA function, do your rounding.

- Suman

Former Member
0 Kudos

Hi Suman,

I am not sure how operation ROUND can come into play before QUOTA. I thought that QUOTA will generate and compute the quota?

In addition, can ROUND be used to do rounding for day?

Thanks and Regards

Wai

vianshu
Active Contributor
0 Kudos

Also, in your scenario, you are redoing the calculations for last month and hence, your values are coming up like that.