cancel
Showing results for 
Search instead for 
Did you mean: 

error in pcr for late coming

Former Member
0 Kudos

Dear experts,i wrote pcr for the employee for late coming ,if they come late 3 days in a month their half day will be deducted ,so while comparing like 3 times employee came so i am comparing that hrs?2 ,if greater it need to cut half day but it wont happn it directly going to colop please help me in this ,it is very urgent requirement .

ZXX0 Personnel Calculation Rule  ZXX0

    *

      ****

        HRS=PBEG   Set

        HRS?SWTB   Decision op.     HRS

          *

            COLOP*     TIP  >TOP curr.TType

          >

            HRS-SWTB   Subtraction

            HRS?0.083  Decision op.     HRS

              *

                COLOP*     TIP  >TOP curr.TType

              >

                HRS?0.25   Decision op.     HRS

                  *

                    HRS=1      Set

                    ADDDBL111Z Set day balance = 0

                    ADDMBL112  Add to month balance

                    HRS=L112   Set

                    COLOP*     TIP  >TOP curr.TType

ZXX2 Personnel Calculation Rule  ZXX2

    *

      ****

        HRS=L112   Set

        HRS?2      Decision op.     HRS

          *

            COLOP*     TIP  >TOP curr.TType

          >

            HRS=0.5    Set

            ADDDBL111Z Set day balance = 0

            ADDZLA3333 Add to ZL, IFTYP A

            HRS=0      Set

            ADDDBL111Z Set day balance = 0

            COLOP*     TIP  >TOP curr.TType

in log sheet

ZXX0      *   ****           HRS=PBEG   Set

ZXX0      *   ****           HRS?SWTB   Decision op.     HR

ZXX0      *   ****  >        HRS-SWTB   Subtraction

ZXX0      *   ****  >        HRS?0.083  Decision op.     HR

ZXX0      *   ****  > >      HRS?0.25   Decision op.     HR

ZXX0      *   ****  > > *    HRS=1      Set

ZXX0      *   ****  > > *    ADDDBL111Z Set day balance = 0

ZXX0      *   ****  > > *    ADDMBL112  Add to month balanc

ZXX0      *   ****  > > *    HRS=L112   Set

ZXX0      *   ****  > > *    COLOP*     TIP  >TOP curr.TTyp

   ZXX2      *   ****           HRS=L112   Set

   ZXX2      *   ****           HRS?2      Decision op.     HR

   ZXX2      *   ****  *        COLOP*     TIP  >TOP curr.TTyp

in saldo table it is showing 4 late marks but not deducting the half day please help me

Accepted Solutions (1)

Accepted Solutions (1)

former_member184702
Active Contributor
0 Kudos

Hi Anusha,

Please try as below:

Below PCR will check the current day and if difference greater than 30 mins then you assign as 1 in 9001 time type

-----------

PCR1

*

****

hrs=pbeg

hrs?swtb

>

hrs=1

adddb9001 ( 9001 is a time type)

Leave

This function should be called using function PTIP PCR1 GEN)

PCR2

*

****

XXX1

HRS?1 --- If today he is late

=

HRS=LXXX1 - Fetch last day time type 9001

HRS?1

=       -  last day as well

HRS=2

ADDDB9001Z - Set the value to 2

LEAVE

< - Last day regular

LEAVE - so no action required

> - Last 2 days late

HRS=9

ADDZLYYYY - Create your time wage type and put in ZL

HRS=0 or ZERO N - This will ensure that his time type is made 0 so 4th late day will not lead to 2 days sal reduction

ADDDB9001Z

LEAVE

Check the below link:

http://scn.sap.com/thread/3315465

Thanks

Siva

Former Member
0 Kudos

thank u so much for your reply ,i have a doubt in my pcr in saldo table also it is showing late coming days like how many times employee came late ,but it is not processing ,how the system differentiates number to the time

my doubt is if hrs>0.083

then hrs=1

here 1 is the count

then i am comparing hrs?2.00 here 2 is hours how the system differentiates both ,is their any function to differentiate the both ,please help me

Answers (1)

Answers (1)

rajasekhar_reddy3
Active Contributor
0 Kudos

Hi,

Store the daily Late coming counter into the same time type using ADDMB111Z

Instead of L111Z use M111Z it should work .

Regards,

Raja Sekhar