cancel
Showing results for 
Search instead for 
Did you mean: 

How write PCR for Checking Current week and previous week.

Former Member
0 Kudos

I want to check current week Saturday whether employee has worked and similarly next week Monday whether employee has worked.

I have stuck with how to see current week and next week. This is required for marking sunday (off day) as lop if the employee is absent on saturday and monday.

Client dosen't want to use 2001 - LOP option, instead they want system to capture automatically while running PT60.

Accepted Solutions (1)

Accepted Solutions (1)

Sanky
Active Contributor
0 Kudos

Hi,

You can query this way that in the current week on Saturday if employee is absent then you will generate LOP wage type along with counter as 1 for checking that coming Monday is LOP or not if yes then on Monday you will generate 2LOp for Monday & Sunday and counter will bcm zero.

check the below attached link where you can get the operation and idea similar to your issue.

http://scn.sap.com/docs/DOC-58739

Regards,Sankarsan

Sanky
Active Contributor
0 Kudos

Hi,

If your query is answered then close the thread with correct answer marking.

Regards,Sankarsan

Former Member
0 Kudos

Hi,

I didn't get the output, my question is how to check last week Saturday and current week Monday, so that if an employees takes leave on last week Saturday and current week Monday.

We can deduct Sunday as LOP.

Sanky
Active Contributor
0 Kudos

Hi Thangaraj,

Check the below link and also previous link. Then you can join the two issues and can able to write PCR.

Check the below PCR's details then you can able to get the solution.

PCR-1 (Will check that employee is on LOP on the Saturday or not)

ZLOP

*

  ****

       VARSTLWDY6

             Y

                  VARSTFREE?

                      N

                         VARSTPRSNT

                             N

                                HRS=1

                                ADDZL9000

                                ADDDB9000Z

                            Y

                               LEAVE

                     Y

                        LEAVE

            N

                GCY ZLOPA

A

   ****

         VARSTLWDY7

             Y

                VARSTFREE?

                   Y

                      HRS=L9000

                      ADDDB9000Z

                   N

                       LEAVE

            N

                LEAVE

ZLPM (Check Monday LOP and carry forward Saturday LOP and also considering Sunday as LOP)

*

  ****

        VARSTLWDY1

              Y

                 VARSTPRSNT

                     N

                        HRS=L9000

                        HRS?0

                          *

                            HRS=1

                            ADDZL9000

                          >

                            HRS=2

                            ADDZL9000

                    Y

                       LEAVE

             N

                  LEAVE

Insert these two PCR's one after one after function P2002 with the help of ACTIO function.

                       

Note:- It's a general structure i have given to you. In your system might be configured with the LOP logic only Last working day of the week and 1st working day of the next week logic is not there. So do changes accordingly in the system.

                     

Let me know the result

Regards, Sankarsan

Former Member
0 Kudos

Dear Sankaran,

Thank yo for the PCR it is working, but problem is it LOP is getting added on monday as 2 and sunday is not shown in the output.

I want sunday to be calculated as LOP.    

Sanky
Active Contributor
0 Kudos

Hi,

How could be possible that Sunday you would like to generate LOP when last checking point is Monday?

Think once again.

By the way if you query is answered then close the thread with correct  answer marking.

Regards,Sankarsan

Former Member
0 Kudos

Thank you.

Answers (0)