Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Payroll schema calculating double pay

Dear All,

I have an issue with a payroll schema,

When employee is hired

  • some day in the middle of the month – on the payslip calculations is not done
    automatically divided by days but paid for full month.

  • When leaving in the middle of the month – employee is getting double salary on the payslip, again
    there is no division by days

  • When getting a raise in the middle of the month – employee gets double pay again.

I want the solution for the schema to calculate the days so if employed at the middle of the month
the first pay would be on for the first few days the next pay for the full month the same fo leaving etc.

Also It is also a requirement that every month is fixed to 30 days, and these are set in the schema.

Schema XAL9 calls ZPPF which in turn call ZPP0

10 compart the constant calendar days with  30

20 if it is less then 29 (feb with 28)

30 if it is anything else add 1 day (bringing it back to 30)

40 if is is 28 matching the second condition add 2 days (bringing it back to 30)

50,60 are if it is = to 30 or greater than 30

What is your opinion gurus?

Former Member

Hi Waylin,
as Rémi has pointed out, the variable UNKG will allways be set to the last value.
When dealing with splits it is not recommended to use variables, since the VAR table does not support them. Therefore the use of ELIMI * before assigning a value from VAR has no effect at all.
Let's have a look at your PCR ZVA1:
1. you make a decision depending on RTE of /801, but you don't assure afore, that the entry you're looking for can be found.
The rule therefore should be more like this:

But then, this is the reason for your double entries. IMHO you should consider using different approaches for termination or other partial month and unpaid days.
Your logic of PCR ZVA1 works fine for unpaid absence, even for a full month unpaid, since in that case the WT 9998, which is a negative, will fully compensate the positive value of basic pay.
What the PCR actually does, is to generate the complimentary value - that is, the amount to deduce because of beeing unpaid.

In Case of termination, this results in the double entries.
Now, i can't give you a fully fledged solution for your requirement, but you should consider using more than only /801.
I would let e.g.  /802 deal with unpaid days only and  /801 have the partial month ratio. This way you could use bot values independently. You could then calculate the respective portion for each partial month and then the value for unpaid days for each partial month,
Let's say, like in your example employee terminates 20/3 and has a total of 1200 -
following this approach would result in:
/801 1 66,666.67
/801 2 NULL
/802 1 NULL
/802 2 NULL
BP 1 800.00
9998 1 NULL
9998 2 NULL
Next, we'll have a look at the same scenario, but we assume 2 days of unpaid absence. This would result in:
/801 1 66,666.67
/801 2 NULL
/802 1 6,666.67
/802 NULL
BP 1 800.00
9998 1 80.00
9998 2 NULL

Hope that helps.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question