on 07-31-2014 8:59 AM
Hi all:
I have two question about valuation basis /001 and /002. I want to use /001 for calculating Overtime work salary and use /002 for sick leave deduction.
/001 hour rate: basic salary/208
/002 daily rate: basic salary*12/365
Kindly be informed that I have created one constant Z0005 in V_T511K, Z0005 = 208, so the first step, OT salary was calculated correctly. The OT hours and Sick leave days are maintained in WT 9103 and 9104 separately.
The logic about OT salary : /001 * 2 * OT hours
The logic about Sick leave deduction: Basic salary - /002 * (natural days during the month - leave days)
But when calculating /001 and /002 by rule Z013 which was copied from X013, I found that /001 and /002 are same, and I don't know how to change the rule to achieve my purpose.
Q1: How to change the rule to calculate different /001 and /002?
Q2: After calculating /002, what should I go to calculate leave deduction?
Look forward to getting experts' help, thank you.
Best regarts,
May.Feng
Hi May,
Sick leave deduction are calculating in WT9104. So you assign different valuation basis with WT9104.
In the rule you calculate the /002 amount based on the valuation basis assigned it PC1.
How to do this?
1.Create a constant in T511k that Z0006=12/365=0.03
2.Suppose PC1=6 for WT9104
then PCR would be after operation VWTCL 01
6
RTE=KZ0006
AMT= 1001(Basic Wage type)
MULTI ARA
ADDWT *
and in the XVAL pcr you modify according to sick leave deduction based on the factoring are you using for /002 PC10 and for Basic wage type PC 10 make it zero.
After that pcr write small rule 3
1001
AMT= 1001
AMT- /002
ADDWT *
I have given you some idea about how to go ahead. Check and tell me.
Regards,
Sankarsan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi May,
Yes you create an anothe valuation basis 6 for /002 calculation for WT9104.
Check and let me know.
After writing the pcr and insert in the schema.
Please share the payroll log details after Z013 Pcr output.then factoring PCR output and XVAL pcr output (this PCR you can find out under factoring subschema) then i can able see flow of logic is working fine or not.
Regards,
Sankarsan
Hi Sankarsan,
Cause the country group is not defined by SAP, so I use the international payroll 99 to calculate this.
And I have a problem when creating PC1 6, I copied 5 to 6 in V_T52D2, but there is a warning like this: Choose the key from the allowed namespace. It can't be saved because of this warning.
Could you help me find the problem, thanks.
Regards,
May
Hi Sankarsan,
Yesterday I have changed the rule Z013 to calculate /002. This rule works well.
The rule Z013 is like this:
Z013
3
****
VWTCL 01
*
ADDWT *
2
RTE=KZ0006 "KZ0006 is a constant defined as 365/12,
DIVID ARR " if using 12/265, the errors will be bigger, so I use ARR and KZ0006
ZERO= A "Of course, the error still exists but smaller
ADDWT /002
5
RTE=KZ0005
DIVID ARR
ZERO= A
ADDWT /001
I use PC1 2 for /002, cause the PC1 of 1000(basic salary) is 3, when use 3 for /002, the value of 1000 will be also changed.
After doing this, I tried to run the payroll result simulately, and I fund that 9104 was calculated by rule X115, the detail information you can see it in the pictures below. The first picture was IT befoer X015, the second picture was IT after X015,the third picture was the procedure of X015.
Now I am confused about the this. You told me to write a new rule after XVAL, but 9104 has been processed by X115 with value which is not my expect.
I want to make the AMT of 9104 = 150 - 4.933*(31-2) = 6.943, please be noted that the 31 means
the natural days of current month.
Please guide me to do the next step and thanks.
Regards
May
Hi Sankarsan,
X015 is a standard rule below subschema XT00, what I know may be not very exact, so if any wrong, please let me know.
X015 Valuation of time wage types
3
****
AMT?0 " In my opinion, after Z013, /002 AMT=0, RTE=4.933, NUM=0, but it seems uncorrect
*
ADDWT *
=
NUM?0
*
RTE?0
*
MULTI NRA
ADDWT *
=
VALBS? "Judge if any evaluation exists in T512W
*
GCY X016*
X
GCY X115*
=
ADDWT *
Z013 output is below:
Please guide me, thanks very much.
Regards,
May
Hi Sankarsan,
I wrote the rule ZB08 after XVAL, but it seems that some part of this rule doesn't work well.
ZB08
* "When using 3, the rule doesn't work, so I use *.
/002
NUM=GKSOLL "Get the calendar days of the month
NUM- 9104 "the NUM of 9104= 2, so if correct , it will get 31-2=29 after this step
MULTI NRA " Rate= /002 4.933
AMT- 1000 "1000 means basic salary, 150
AMT*-1
ADDWT 9104
So I fund that the bold part of this rule not work and another problem arise. In table RT, two 9104 wage types, it should be only one 9104.
If it is correct, the result should be 150- 4.933*(31-2)= 6.943.
Could you tell me how to get the NUM of wage type 9104?
I will appreciate for your help, thanks very much.
Regards,
May.
Hi Mary,
Your PCR is not coorrect. It's required to change some of the part. Let you try with below PCR and let me know that it's giving you required result or not.
ZB08
* ("*" you will be using check IT table of PCR ZB08 processing where Employee Subgroup Grouping for PCR)
/112
ADDWT *
RTE=1
NUM= 9104
MULTI NRR
ADDWT&VAR1
ZERO= R
RTE=GKSOLL
RTE-& VAR1
ADDWT&VAR2
ZERO= R
RTE= /002
RTE*& VAR2
ADDWT&VAR3
ZERO= R
AMT=1
RTE=& VAR3
MULTI ARA
ADDWT&VAR4
ZERO= A
AMT= 1000
AMT-& VAR4
ADDWT 9104
Check with this PCR. If it will not get the result then please share me ZB08 PCR processing Input tables details and also ZB08 pcr which u have written based on my suggested PCR.
Best of luck.
Regards,
Sankarsan
Hi Sankarsan,
Thank you very much for your help, I have changed the rule ZB08 based on your suggestion.The details are below.
The wage type /112 is not used for country group 99, so I used /002 to replace /112. Picture below is the log in payroll calculating.
Table IT before ZB08:
Table IT after ZB08:
The RT table:
But I fund the result was not very correct.
So I made some change to rule ZB08, and move it to another position.The result seems right.
Please see pictures below.
I put the rule after X015 which is a subrule in XT00.
The detail of payroll calculating log:
Kindly be noted that 9104 wage type I used for half sick leave deduction, so the number divides 2.
the final result= 150- 4.931*(31-1)= 2.070 and the NUM of 9104 was remained.
If any wrong please guide me to correct, thanks.
Regards,
May
Hi Sankarsan,
I'm sorry for replying you so late.
I discussed this calculation rule with my customer and I realized maybe I understood the demand.
I will describe the demand in detail.
For example, employee A has a basic salary(fixed amount) 3000 $,
if he has no leave in calculated month, he will get the 3000$.
But if he was absent for sick or other reasons, his salary will be deducted.
The sick leave has two siuations: half deducted or full deducted.
If A left 6 days in 8.1-8.31,
Situation 1: half deducted
The final salary= 3000*12/365(31-6/2) = 2761.64$
The deduction = 3000 - 2761.64 = 238.36
Situation 2: full deducted
The final salary= 3000*12/365(31-6) = 245.75$
The deduction = 3000 - 2465.75 = 534.25$
The rule ZB08 I wrote before was used to calculate the deduction.
ZB08
*
9104 Sick leave days(half)
ADDWT&VAR1 *Remain the number of 9104 in VAR1, NUM=6
NUM/2 *Half deducted, so NUM = 3
NUM-GKSOLL *GKSOLL=31, NUM= 3-31 = -28
RTE= /002 *RTE=/002= 3000*12/365 = 98.63
MULTI NRA *AMT=NUM*RTE=-28*98.63= -2761.64
AMT+ 1000 *AMT= -2761.64 + 3000= 238.36
AMT*-1 *AMT= -238.36
NUM=& VAR1 *NUM= 6
ADDWT 9104 *9104: AMT= -238.36, RTE= 98.63, NUM= 6
ZERO= NRA *NUM=0 RTE=0 AMT=0
It seems the result was correct, but my customer only want to see the final result of basic salary,
so now I added a new wage type 1001 named Basic salary-Earned.Of course the rule was changed now.
If any wrong, please correct me, thanks.
Regards,
May
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.