Skip to end of metadata
Go to start of metadata

Purpose

The purpose of this page is to resolve a complicated issue involving Payroll. My friend already requested me and he faced a lot of issues to implement it in payroll schema as well. So in this document I will share my solution to you. First I would like to mention requirement:

- Daily Rate = Basic Salary / 30 for all month.

- If employee join / retire in middle of month, his salary should be proportioned.

- If absent full month, salary will be 0 (NULL).

Solution

After investigation and testing carefully in system, the solution is only PCR as picture below. I don't mention how to modify Payroll Schema and where should new pcr be inserted into. If you are not clear about that, please look at 2 documents: Integrating Negative Time and Payroll & Relationship Time Evaluation and Payroll

Now following my explanation here:

1. Have to check employee absence FULL Month or not:

RTE=TKSOLL   => set Planned working time measured in calendar days.
RTE-TKAU**     => minus with Unpaid absence measured in calendar days

checking with 0. If it equals 0 (return value is *, because another case is >, so others are = or <, but employee cannot apply more than monthly calendar days, so only = 0 or > 0), assign 0 into wage type /801, so basic salary will equal 0.

2. Next step: retrieve Calendar days again: RTE=TKSOLL (Remind: must re-use : RTE=TKSOLL, not RTE=TKSOLL & RTE-TKAU** in 2 first lines of PCR)  and then check current payroll period, it's Feb or not by using CMPER MM02 (it means comparing with Feb).

Note: please clear configuration for payroll period, some countries such as India, Japan its fiscal year start from Apr to next Mar, so 01 means Apr so 11 means Feb. Keep in mind please. (One tip here you can use PA03 to check Payroll area period or run payroll with display log to know it).

3. If it's Feb, comparing with 28, otherwise comparing with 30.

* (= or >)
              RTE=30     Set
              RTE-TKAU** Subtraction
              RTE*KGENAU Multiplication
              RTE/30     Division
              ADDWT *    OT   Output table

< (it's lower, happen only 2 cases: joining or retiring in middle of month). Without this condition, join / retire in middle of month, employee's salary cannot be proportioned.

              RTE-TKAU** Subtraction
              RTE*KGENAU Multiplication
              RTE/30     Division
              ADDWT *    OT   Output table

Another steps, only minus Unpaid absence measured in calendar days, next multiply with constant 100000 GENAU in T511K, and then divide with 30 (as we fix 30 days for every month).

That's all. If you need to calculate exactly how many days in Feb or another please refer Calculate Date Total in month

  • No labels

3 Comments

  1. Former Member

    Good day, Woody Nguyen

    in beginning, I'd like to thank you, I tried to use same scenario  in my PCR (ZPP1) but I get the error “Error in variable key” on line 30

     

    Line

    Var.Key

    CL

    T

    Operation

    10

     

     

     

    RTE=TKSOLL NEXTR B

    20

     

    B

    D

    CMPER MM02

    30

    *

     

    D

    RTE?30

    40

    * *

    1

    Z

    RTE=30

    50

    * *

    2

    Z

    RTE-TKAU**

    60

    * *

    3

    Z

    RTE*8

    70

    * *

    4

    Z

    RTE-TSAU05

    80

    * *

    5

    Z

    RTE*KGENAU

    90

    * *

    6

    Z

    NUM=30

    100

    * *

    7

    Z

    NUM*8

    110

    * *

    8

    Z

    DIVID RNR

    120

    * *

    9

    Z

    ADDWT *

    130

    * <

    1

    Z

    RTE-TKAU**

    140

    * <

    2

    Z

    RTE*8

    150

    * <

    3

    Z

    RTE-TSAU05

    160

    * <

    4

    Z

    RTE*KGENAU

    170

    * <

    5

    Z

    NUM=30

    180

    * <

    6

    Z

    NUM*8

    190

    * <

    7

    Z

    DIVID RNR

    200

    * <

    8

    Z

    ADDWT *

    210

    =

     

    D

    RTE?28

    220

    = *

    1

    Z

    RTE=30

    230

    = *

    2

    Z

    RTE-TKAU**

    240

    = *

    3

    Z

    RTE*8

    250

    = *

    4

    Z

    RTE-TSAU05

    260

    = *

    5

    Z

    RTE*KGENAU

    270

    = *

    6

    Z

    NUM=30

    280

    = *

    7

    Z

    NUM*8

    290

    = *

    8

    Z

    DIVID RNR

    300

    = *

    9

    Z

    ADDWT *

    310

    = <

    1

    Z

    RTE-TKAU**

    320

    = <

    2

    Z

    RTE*8

    330

    = <

    3

    Z

    RTE-TSAU05

    340

    = <

    4

    Z

    RTE*KGENAU

    350

    = <

    5

    Z

    NUM=30

    360

    = <

    6

    Z

    NUM*8

    370

    = <

    7

    Z

    DIVID RNR

    380

    = <

    8

    Z

    ADDWT *

  2. It is the issue with Syntax only.  You have comparing with MM02 but don't check the return value. Just check your syntax again. You should design pcr with the Graphic 1st if you are not very strong in PCR.Thanks.

    Best Regards,

    Woody (Trong Minh)

  3. Hi Woody,

    When we fix RT=30 how we are going to handle split cases, for each split we will be having 30 days then we are going to get incorrect factor values with above logic ultimately it leads to wrong output in the system.

    Kindly check the split cases let assume we have 16 planned days in first split 15 in other split for both the cases we are making 30 days planned working days as partial parameter value and using divisor as 30 days i.e 30 - absence days/30, for first split, 30- absence days/30 for second split, i feel factor value is going more than one we are going to loose accuracy.

     

    Regards

    Venkatesh