cancel
Showing results for 
Search instead for 
Did you mean: 

Leave Calculation

former_member182377
Active Contributor
0 Kudos

Hi Experts,

Need your valuable advice on this.

Currently there is a leave quota in IT2006 which allocates 1 day for every 15 working days for a group of employees , we dont have limit for this every 15 working day will be counted 1 day will be allocated in IT2006, validity dates are 31.12.9999 in IT2006, this is the current setup .

Now i am getting a modification on the requirement like from 01.03.2015 , for every 12 days 1 day will be allocated maximum up to 18 days per year which is 01.03.2015 to 28.02.2015, for every year this has to work.

I am writing a PCR logic for every 1 day allocation for 12 days.. but i dont how to stop if its reaches maximum 18, and also how to generate the from 1st day next year.

Need your expertise help on this.

Thanks

Sriram

Accepted Solutions (1)

Accepted Solutions (1)

Sanky
Active Contributor
0 Kudos

Hi,

I think you want to check the total entitlement for the year from 01.03 to Feb of next year.

Then you should go with HRS=FE condition before your quota generation of time type of pcr .

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Exactly,, thats what i want.. but how can we make sure it must be made 0 on the last day of the financial year and again counts from 1 from new financial year.

Thanks

Sriram

Former Member
0 Kudos

Hi Sriram,

Please check your Time Type. If you has leave "Transfer prev. Year" field blank then it will not transfer to another financial year.

Thanks

Sanky
Active Contributor
0 Kudos

Hi,

You can query that its a Feb time evaluation period or not , if yes then check the time evaluation last date and on that date you will make that zero.

    

Regards,Sankarsan

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Thanks for all your inputs.. let me query all the things and write a PCR and let you know the results if i struck anywhere.

Thanks once agan.

Regards

Sriram

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

I have successfully managed to write the PCR, however i am encountering not an error but not something not going in a PCR.

I have stored a value in a time type Z957 which has the value 12, when i am trying to read the value through a PCR using Function PMB, Z957 is not getting retrieved by the PCR but other time types are retrieved which is really confusing. , screenshot here you go.

thanks

Sriram

Sanky
Active Contributor
0 Kudos

Hi , where you have inserted this PCR in the time schema?

I think time type is not been updated in the cluster.

Regards, Sankarsan

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

I have updated in the subschema ZQTA which is the copy of TQTA, as you can see other time types are getting read successfully but not this one it is new type which i created for this requirement.

using PMB i retreiving value from SALDO not sure what has been missed. why this particular time type not gettting read by it.

Can you help me out on this?

Thanks

Sriram

Sanky
Active Contributor
0 Kudos

Hi,

You have copied from TQTA ???

Could you share the schema details once . Do the comparison of the time type and also Insert CUMBT function before this PCR line and check.

Regards,

Sankarsan

jagan_gunja
Active Contributor
0 Kudos

Sriram

The PCR called by PMB should be after CUMBT function.

br, JG

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Yes ZQTA is the schema. might be got copied but schema doesnt look like a exact copy as it is a different schema in all and made many alternations according to the requirements.

other time types are getting read by it.. only the new time type which i have created not getting read,

Please find the attached screenprints.

former_member182377
Active Contributor
0 Kudos

Hi Jagan.

Actually i am moving number 1 in the time type which i created in another PCR, 

ADDMBz9957,

then in another PCR using PMB i am reading that from SALDO table,  but it is not reading for that particular time type , when schema runs on that day and updates CUMBT, even for next day also PMB doesnt read it.


I am confused by it

Thanks

Sriram

Sanky
Active Contributor
0 Kudos

Share the schema details and insert the CUMBT function before this PCR and then rerun process and check.

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Schema details in a sense. what exactly are you looking for with the details.

Thanks

Sriram

Sanky
Active Contributor
0 Kudos

PCR portion in the schema.

In the current PCR I think  you are trying to query to check the 12 and then modify the time type value.

Proceed this PCR with ACTIO function and before that PCR insert CUMBT function.

Check and let me know.

Regards,

Sankarsan

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

I have inserted CUMBT before the PCR, I have re-run the things. still is not reading the new time type yet. same result.

Thanks

Sriram

Sanky
Active Contributor
0 Kudos

Did you change the function for PCR processing??

In the CUMBT function SALDO table is being updated with Z957 time type details. If it's so then it should be proceed.

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

I have two PCR's I am working on, currently on its ZTP1 where I am checking the current day is a working day or not. if yes I am adding one day to the time type where I need to check every 12 day I have to give one day leave. for other leave we also move one day to another time type which z994

sharing the details of both the PCR and the processing

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Change of function for PCR processing? are you asking any abap work carried out?

Yes it should be proceed. but it is not picking up. that's my biggest problem here.

thanks

Sriram

Sanky
Active Contributor
0 Kudos

Through ZTP1 PCR time type Z957 is generating. Am I correct ??

Under CUMBT function  SALDO table it's being updated with the time type value????? If yes then run the PCR with ACTIO function.

Share the time type characteristics details and what's the time evaluation period(cross month or cross yearly)...

Check and let me know.

Regards,

Sankarsan

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

Yes it got the value in the time type 1 and CUMBT function also updates the same ,

How can I read the value with ACTIO function of SALDO. May I know how it is working for other time type which is Z994 and Z995,

Sharing the details

former_member182377
Active Contributor
0 Kudos

time evaluation period is daily, where it runs for every day. once for every 12 days 1 day will be given to Quota ,

thanks

Sriram

jagan_gunja
Active Contributor
0 Kudos

What's the op'n ADDMBz9957?  Should it not be ADDMB9957Z

Sanky
Active Contributor
0 Kudos

Hi,

As per your PCR it will call by the Function ACTIO after CUMBT function.

If it's not processing then share processing log of the PCR in time evaluation run.

Regards,

Sankarsan

former_member182377
Active Contributor
0 Kudos

Hi Jagan,

Sorry I wrongly gave it, It is ADDMBz957

thanks

Sriram

former_member182377
Active Contributor
0 Kudos

Hi Sankarsan,

I have changed to ACTIO,

But nothing comes in processing. it is empty

Thanks

Sriram

Sanky
Active Contributor
0 Kudos

Please share schema details.

By the way you are fetching time entry from time event infotype then why are you using TQTA schema??

former_member182377
Active Contributor
0 Kudos

Hi All,

Thanks for your help on this Thread. i have finally got the output by creating a new PCR, then new time type worked without an issue. Sorry for the delay in replying as we were affected with heavy flood and rain.

Thanks once again for all your help.

Regards

Sriram

Answers (2)

Answers (2)

venkateshorusu
Active Contributor
0 Kudos

HRS=FRXXC

HRS?18

        >

          HRS-18

          HRS*-1

          UPDTQA**

this one should be placed after QUOTA function.

When we are trying to place it before QUOTA then we should not use UPDTQA** further when we are using before QUOTA it adjusts the balance the next day when it reached >18.

Regards

Venkatesh

former_member182377
Active Contributor
0 Kudos

Hi Venkatesh,

Thanks for that,, But how come we make sure it makes zero on the last day of the financial year , again when next year financial year starts how could we start the things again from 1,

Thanks

Sriram

venkateshorusu
Active Contributor
0 Kudos

One thing is we will have to generate 18 days per a year, so later remember one point in standard SAP we do not have carry forward option until and unless we have validity period as 31.12.9999.

I.e when we do not have carry forward option at the end of the year system do not check remaining balance and it won't carry forward it to next year so finally what we understand is system start's generating with number one only.

This is what we have to configure for quota generation subsequently it should work for all the years.

In general every year 18 days wrt 12 working days one day, no carry forward then it counts from 1 only wrt validity periods.

Regards

Venkatesh

former_member182377
Active Contributor
0 Kudos

Hi Venkatesh,

Thanks for that.. i am currently configuring and let you know the results i also check with the customer on this.

Thanks

Sriram

venkateshorusu
Active Contributor
0 Kudos

Sure you check with customer regarding requirement, business process, how to configure and provide solution is consultant job, any way it is standard approach you may not need anything additional configuration. Since requirement is saying 18 is maximum, no other configuration is required.

Regards

Venkatesh

venkateshorusu
Active Contributor
0 Kudos

Further i would suggest one more thing is there we can have two scenarios.

One is we generated 18 days employee availed 10 i.e remaining balance is 8 still we can generate 10 more days to reach 18 days more than 10 we can not add because it becomes greater than 18.

Answer is provided PCR will resolve the issue.

The other one is 18 days generated 10 days availed but we generated 18 days now we stop generation completely. he can avail remaining 8 days.

Answer is we have Maximum entitlement field under Total entitlement tab in table V_T559L maintain it with 18.














Regards

Venkatesh

former_member182377
Active Contributor
0 Kudos

Hi Venkat,

I dont think. i have any carry forward things here.. i have asked customer how are they expecting. if they say 18 days should be generated per annum. in the next annum if 18 days should be replaced by next new number , i will look at your PCR, if they say 18+18 can be added.. then my problem will be easily resolved.

Let me check, write the PCR and let you people know.

Thanks for your help

Regards

SRiram

venkateshorusu
Active Contributor
0 Kudos

May be you are understanding going wrong it seems to be, every 12 working days 1 day leave i.e maximum we can provide 30 days leave.

on 216th day it self we get 18 days leave wrt one day leave for 12 working days so now next day 217th it self employee is availed 1 day leave i.e 18-1 = 17 (We generated 18 days but employee used 1 day leave now question mark again we should generate one more day 216+12 = 228th day.?

If yes PCR is required.

Else NO generation further PCR is not required, we have to maintain 18 as maximum entitlement under total entitlement tab.

The above scenario answer decides whether PCR is required or not.

No carry forward option so it counts again from 1( we will have to configure to generate quota validity period should not be 31.12.9999).

Regards

Venkatesh

venkateshorusu
Active Contributor
0 Kudos

Go through below links you will get an idea.

Regards

Venkatesh