on 10-26-2015 8:09 AM
Hello Experts,
I have a PCR to calculate the attendance bonus which is paid to the employees who work through the month without availing leaves and without remaining absent (Unpaid absence/LWP).
The calculation of this bonus is based on the following formula
[(1000+1006+1016) / Total number of working days] * 2
Where 1000/1006 and 1016 are the wagetypes.
Unfortunately, my PCR is working even if the employee has not worked for the entire month. Requesting a help in correcting the same.
Below is my PCR
Harriss
You have Given condition for paid , Unpaid absences and issue is coming in Else condition , When you are saying employee not worked for entire month are you booking absence to the employee in what cases employee will not work for entire month other than paid and unpaid absence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do changes as below in addition to the above. Note b means one blank:
1. Wherever you have in the PCRs op'ns as below
ZERO=bRNA
ADDWTb2005
Result of the above op'ns:
If w/t 2005 had any of rate, number or amt, it would still exist in IT; you are just adding zero).
replace with
ZERO=b2005
This means w/t 2005 will have no rate, num nor amt, if there was any before.
2. var VAR9 has no.of worked days in rate field. As you require the total amt of w/t's 1000, 1006 & 1016 by the number of days added to the rate field. So replace
AMT/&bVAR9
with
RTE=&bVAR9
DIVID ARA
Hope this helps.
br, JG
Just to reconfirm - for mid-month joinees, attendance bonus should not be calculated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tania,
I did the modifications as u had told. I have also changed AMT/26 to AMT/ VAR9 (as AMT/26 is hardcode and total working days is always unstable and cant be 26 days every month)
But when I run the PY, am being hit by an error in the log. Plz check below
I hope I have modified the PCR per ur suggestions. I have copied ZAT6 to ZAT7 and have done the modifications in ZAT7 and have inserted the same in schema in place of ZAT6.
Help PLz
Harriss
Hi,
Please share the PARTT and PARTA table details for this employee and where have you placed this PCR in the Payroll schema.
You have split the PCR in two parts.
After passing the value to variable VAR9 you have to cross check it's RTE with 0. Hence if VAR9 is greater than 0 then only proceed for further calculation else come out from the PCR.
ADDWT&VAR9
RTE=& VAR9
RTE?0
*
ADDWT *
>
AMT= 1000
AMT+ 1006
AMT+ 1016
AMT*2
AMT/& VAR9
PRINT&
ADDWT 2005
Regards,
Sankarsan
Tania,
Apologies - The error was in NUM=1, I had mistakenly maintained spaces in a wrong way. Now since I have corrected the spaces and HAVE NOT DELETED PRINT&, The PY is running correctly but just to remind you - We have maintained AMT/26 instead of AMT/ VAR9. Which I dont want to hardcode as 26 is not stable for every month
As you had asked for: Sharing the screen capture of variable table.
And to add upon: The PY run is for March 2014 for a test employee who is present for the entire month (in other ways: who is not absent for any day)
Plz Help
Harriss
Tania,
I checked with multiple scenarios and I see that it is working pretty as of now .
But, there is something more I would be requesting you: We record time in IT2011. Now while I was testing, I checked for a month for which I have not maintained IT2011 but Att Bonus appears for that month also.
Meaning: I want to put a condition in the PCR in a way that the PCR should check if there is any data in IT2011, If yes then only proceed else dont (Reason being: The customer will regularly update IT2011 else it wont take any serious thought on that).
Help Plz
Harriss
You Cant do that one directly (even check condition based on TEVEN table entries) in payroll Schema
Put a condition in Time schema like , if the there is no time in and time out (2011) pass value
10 to payroll schema via time wage type and if
Num=10 , if the statement is true our pcr should not work
(Since time schema runs every day you should change the PCR accordingly in Time Schema)
A few queries:
1) Do you want the system to check if there is an IT 2011 record for every day of the month or at least one day of the month? You will need to fix cutoff dates. You need to consider whether the updates in IT 2011 for what period of the month are done before that month's payroll. E.g. Time data from 16th of previous month to 15th of current month should be considered for current month's payroll.
This is something you will need to discuss with your client.
2) Are you using time evaluation?
Two more suggestions regarding your initial requirement:
a) Adding PPPAR E checks for entries during the month, likewise if you want to deactivate attendance bonus for mid-month separations, add a subnode for PPPAR A. You can follow the same process as we did for PPPAR E.
b) For the existing sub nodes E,B, U, the existing lines are ZERO=RNA ADDWT 2005
I think above ZERO=RNA, add a line ADDWT *.
This will ensure that the original wage type /001 (on which this logic gets processed) gets added to IT irrespective of whether or not the employee gets the attendance bonus.
Tania,
Here is my reply to your queries:
1. Am fine even if we check for atleast a entry in IT2011 ignoring sundays and public holidays (If the employee is present for entire month, then he will be having all d entries in IT2011, hence we can check one) OR if the number of entries in IT2011 = VAR9, then the PCR should work.
2. Yes - We do time eval every month before we run PY.
Let me know if you have any more queries -
Harriss
Tania, Thanks for the suggestions. I did check with mid month joinees (only Once I did though), I dont see any attendance bonus appearing on the employees payslip.
But your suggestions are considered. Will change the PCR accordingly and post it for your perusal. Will do this once we are done with the Time Schema tweaking..
Thanks
Harriss
Try this:
1) Create a new wage type (you can copy the number wage type created earlier for public holidays, I think it was 1033). Ensure that this wage type is not checked for any cumulation class. Also remove this from direct entry in It 15 as this wage type will be internally calculated by time evaluation as the no. of days for which It 2011 exists.
2) Create a new PCR to be used in the time evaluation schema. You can copy any existing time PCR and change as below:
*
****
OUTTPORIGS
*
E
OUTTPEXTIM
N
Y
HRS=1
ADDZLSnnnn where nnnn is your new wage type
3) Call this new PCR in your time schema after TE10 PCR as below:
RTIP <new PCR> GEN
4) Execute time eval for any employee. Check the results using PT66, table ZL. Check that the wage type gets updated correctly with the number of days for which It 2011 exists.
5) Change your existing payroll PCR ZAT7 as below:
a) Instead of calling it based on /001 (I don't know why this was done), call it on the new wage type nnnn.
b) Above RTE=TADIVI, add:
AMT=1
MULTI ANA
ADDWT&nnnn where nnnn is your new wage type.
c) Cut all lines from ADDWT&VAR9 onwards & save for further use. Add:
AMT?& nnnn
*
<paste all existing lines ADDWT&VAR9 onwards saved earlier>
<
ZERO= RNA
ADDWT 2005
Note that here we are comparing the no. of days for which entries exist in It 2011 with VAR9. If >= VAR9, then attendance bonus will be calculated, else it will not.
This will work under the assumption that all IT 2011 data for the month (say 26 working days) has been entered prior to executing that month's payroll. I still think that this is a challenge & all data may not be uploaded in time for payroll. I suggest you confirm that this is ok with your client.
Thanks Again Tania,
This is a huge work . I ll work on the configurations mentioned and design the PCR as u have written in ur reply. and keep you posted on the progress. But before that, I have 2 concerns:
1. Because the PCR compares entries in IT2011 with VAR9 and if VAR9>= then the PCR functions - My concern is: In IT2011, every attendance will have 2 entries (Viz: P10 (Clock in) and P20 (Clock Out)), SO I dont know how will the comparison will go?
2. And - You have asked me to cope a wagetype - I can do that but connected to which you have also mentioned "Also remove this from direct entry in It 15 as this wage type will be internally calculated by time evaluation as the no. of days for which It 2011 exists". I request you to make me know how do I do this? n what exactly is this.
Meanwhile I ll get busy in to the designing part what you have mentioned. A big Thank again,
Harriss
1) The two entries (clock in & clock out) will be merged into one entry into TIP. Since we are reading TIP with the function RTIP, it will be processed once for each time pair.
2) After copying the wage type 1033, it will create an entry for the new wage type in V_t512z under infotype 15. You can delete the entry from here for the new wage type since we do not want it to be updated in any infotype.
Hello Tania,
I did everything the same way u guided me in your latest reply and I guess and have done everything correct.
Here is my testing results.
TEST1:
I checked for an employee for whom IT2011 was not maintained. The results are per our expectations. Now Att Bonus wont come if IT2011 is not maintained (Earlier it was dispalying in payslips). Thanks for this.
TEST2:
I tested for an employee for whom IT2011 is maintained.
Step1 of Test2: Maintained IT2011
Step2 of Test2: PT60 LIVE Run. I see ZL displaying the number of days (Though the screen capture is from PT60 log but its a LIVE run)
Step3 of Test2: Ran PY for May 2015; Encountered with an error (Error capture screen is below). Like u had taught me earlier, checked the value of VWTCL for X020. For new WT1034, changed PC3 from 0 till 6 and ran PY on every change yet the Att Bonus dint appear. When the PC 3 was blank, I had encountered that error.
Help
Harriss
Ok, one more suggestion. If you want these changes effective current month only(so that it does not affect attendance bonus calculation for past periods), create a PCR to check for period.
*
****
CMPER xxyy (where xx is the year & yy is the period number effective which you want this change)
*
SCOND= T IF
<
SCOND=F IF
Then before calling the revised attendance bonus PCR, add an IF:
IF <new PCR>
<call new attendance bonus PCR>
ELSE
<call old attendance bonus PCR>
ENDIF
Tania,
YOU SEEM LIKE A MASTER OF ALL GEEKS IN PCRs .
My bad .. Am zero literate in PCRs n Schema.. Gotta learn from u many a things.
Thanks for Suggestion # 2.. Considered tht too.. But first i ll focus on suggestion # 1 - Deactivating Att Bonus for Mid Month Retirees/Separations.
And to add in context to ur suggestion#1: is it still require?? Because our narrowing the PCR is any how checking IT11 n comparing with VAR9, Guess this can evade the processing of PCR as my guess says there will be mis-match here..
Waiting fr ur suggestion#3
Harriss
Haha! Yes I'm a geek for sure. But the speed at which you're picking stuff up is pretty commendable!
Good question regarding whther or not we need the mid-month separation check. Most likely, TADIVI will fetch the working days for the entire month irrespective of date of separation. If so, you are right, we don't need to incorporate this additional check. The best bet would be to test it out for any mid-month separation case & confirm.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.