on 10-09-2007 3:21 PM
Hi gurus,
I need to make a average calculation inside a Payroll Process. Example:
Monday - WT-1 $100
Tue - WT-1 $110
Wen - WT-1 $100
Thu - WT-1 $110
Fri - WT-1 $100
Sat - WT-1 $110
Sun - WT-2 (average from Monday to Saturday)
All those WT-1 are informed maybe in IT0015, but this WT-2 has to be calculated in the payroll process, but I don't have any idea of how to do that.
Any suggestion please.
Hi,
I believe you need to write a custom rule for your requirement.
You may use operations like VARST and check for the day of the week and take the sum of all other days and divide by the number of days.
Let me know if this helps,
Reward points if helpful,
Thank You,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
How about creating 3 PCR's
1. PCR 1 Sets a split indicator for each time the wage type(WT-1) is processed eg: 1(Mon) to 6(Sat) by using the SETIN function using parameter NX to increase by 1 each time. (There may be no need for this PCR if already this is already happening in IT table).
2. PCR 2 then queries the split indicators 1-6 using function SPLIT and follows the logic if split indicator exists increase the NUM field of you total average wage type (WT-2) by 1 (this will give you a total days figure to divide by) then continue to add the AMT field of WT-1 to WT-2 each time a split is processed (this should cumulate all the AMT's from each day into your total average calculation wage type).
3. PCR 3 simply divides AMT by NUM and stores as AMT (DIVID ANA)
Job done.....I think ; - ) let me know if it doesn't
Alec
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
10 | |
9 | |
6 | |
3 | |
3 | |
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.