cancel
Showing results for 
Search instead for 
Did you mean: 

PCR for Leave carry forward

Former Member
0 Kudos

Hi Gurus,

I am new to SAP and having no idea for how write a PCR for leave carry forward (Privilege Leave) for following conditions:

Check the Date of joining if DOJ is between 01.01.2012 and 31.12.2012 then carry forward the entire (PL) remaining quota.

If not then, check the leave (PL) taken (here can we check the deduction -IT2006) for current calendar year is equal to 15 for greater than 15.

              

          If yes, then carry forward the entire (PL) remaining quota.

             

          If not, then subtract (15-leave (PL) taken for current calendar year) = what ever is the nos (A)

             

          Subtract A from the available quota and carry forward the leave.

Or please suggest if there is some other way to do this

Regards,

Vishal

View Entire Topic
former_member184702
Active Contributor
0 Kudos

Hello Vishal,

For leave carry forward, you can do in two ways.

1- Maintain 999 in deduction rule

2- create a custom rule.

Process, Create a time type by using table V_T555A table

Pl find the below screenshots.

Schema changes : (Copy the standard to custom ) .

Regards

Siva

Former Member
0 Kudos

Dear Siva,

Here how we check the PL taken for current year is 15 or not?

Also what is '04' and 'LZ' in your pcr'

regards,

Vishal

former_member193210
Active Contributor
0 Kudos

In his example, Siva creates time type Z=04 on the 31st day of the 12th month in PCR ZTE1 (using operation ADDDBZ=04)

In PCR ZTE2, activated on the first day of the first month, Siva uses operation HRS to look at the last result of Time Type Z=04, meaning yesterday's value (using operation HRS=LZ=04)

If the time type would be xxxx, then the operation would be ADDDBxxxx  and  HRS=Lxxxx

Former Member
0 Kudos

Hi Remi,

Thanx!!! for explaining.

But in this how we can read whether the leave taken for current year is 15 or not. and if not 15 then deduct the 15 leavs.

regards,

vishal

former_member193210
Active Contributor
0 Kudos

Look at the documentation for operation HRS (through F1 in the PCR or through t-code pe04)

Next, select the hyperlink to operation HRS1 and look for the hyperlink to "Retrieving data from Infotype", where you should find an hyperlink to Operation HRS1F.

On the 31st, you should add a decision on the Quota (OUTAQTYP), and accorging to the return key, read the Remaining Quota and transfer it to a Time Type (as Siva showed you), and then read the Quota Used (HRS=FCqqv or HRS=FFqqv ?) and transfer it to an other Time Type.  On the following day you'll be able to read these values and create the operations that will transfer what is required.

Former Member
0 Kudos

Hi Siva,

I have created these 2 PCR and inserted in to Schema, as told by you, but the quota is not getting trasfered.

regards,

Vishal

sikindar_a
Active Contributor
0 Kudos

Run Time Evaluation for December period and check send the screen shot of Processing of PCR in time log

Former Member
0 Kudos

Hi Sikindar,

Please find below screen shots:

regards,

Vishal

Former Member
0 Kudos

Hi Sikindar,

Quota is trasfered now, i think, i set the wrong periods in PCR.

regards

sikindar_a
Active Contributor
0 Kudos

does ur issue solved

Former Member
0 Kudos

no..all the available quota in 31st is not not trasfered to 01st.

see the screen shot:

it is tranfering only 20 pl instead of 22.5...

regards,

Vishal

sikindar_a
Active Contributor
0 Kudos

if u see the log itself it is rounding the Quota check QUOTA function input and output once

Former Member
0 Kudos

Actually...on each month end we are trasfering the daily generated quota which comes to 2.5. I think this quota which is generated on the month end is not considered.

Please check below the Input/Output values of QUOTA function

Former Member
0 Kudos

sorry missed the output:

regards,

Vishal

sikindar_a
Active Contributor
0 Kudos

In this case have this analysis   1.Accural period of Quotas should be Monthly check T559L , Every month 2.5 should get generated right  2.next our PCR

Former Member
0 Kudos

we have set the Accural Period to daily

which is working fine:

regards,

Vishal

sikindar_a
Active Contributor
0 Kudos

The problem is with Decimals right in that case go for Rounding  rule   from T559R and use ROUND H function

Former Member
0 Kudos

The problem is not rounding..the December quota =2.50015 is not not considered, while carryforwarding the PL quota.

From April to Dec...each month 2.5 PL which comes to 22.5, but it is carry forwarding only 20 leaves.

regards,

Vishal

Former Member
0 Kudos

hI GURUS,

I have written the PCR as below, but not able processed further as i want to add a condition:

now i want to check values in Z=02 < 15 if yes then subtract 15 from Z=05 and add the reamaining in new time type.

please help.

regards,

Vishal

sikindar_a
Active Contributor
0 Kudos

after ADDDBZ=02  add like PAYTPG1  and start    1 ***** HRS?15  note u will be starting another flow with 1 grouping