cancel
Showing results for 
Search instead for 
Did you mean: 

Average inside Payroll Period

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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,

Former Member
0 Kudos

I think using VARST is not a solution, because VARST is a time´s operation and I need to solve a payroll process.

However, you gave me an idea to work it first in times, then in payroll. I was thinking to work it all in payroll.

Thanks.

Former Member
0 Kudos

Hi,

You may think about HRS too (I know this is again in Time).

How about OUTWP? You may use the WWEEK parameter for your requirement.

Hope this helps,

Reward points if helpful,

Thank You,

Answers (1)

Answers (1)

Former Member
0 Kudos

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