cancel
Showing results for 
Search instead for 
Did you mean: 

Day form Date type in PCR

Former Member
0 Kudos

Hello,

Is there any way to determine a particular day from date specification through PCR.

Eg. Employee have date specification Z1 as 02.01.2015 then one time type should be set to "1" on 2nd of January every year.

Please let me know if further details of requirement required.

Best Regards,

Ketul Patel

Accepted Solutions (0)

Answers (1)

Answers (1)

Sanky
Active Contributor
0 Kudos

Hi Patel,

Share your query in details. You are giving the solution by which difficult to understand.

Regards,

Sankarsan

Former Member
0 Kudos

Hi,

Requirement is :

A date type Z1 is maintained in IT0041 as 02.03.2006.

Now i want to set Time Type 9001 as 1 on every 02nd of Mar (As 02.03 is maintained in IT0041).

And time evaluation is not allowed to run from 02.03.2006 (no forced recalculation).

Is there a operation or Function to achieve the same.

Regards,

Ketul Patel

Sanky
Active Contributor
0 Kudos

Hi Patel,

You want to reset the Time type value on the 2nd march every year.

Then you can write a below pcr two query Time type 9001 like below

ZTST

*

  9001

          VARSTCURMO

               **

                  LEAVE

               03

                   VARSTREDAY

                       02

                           HRS=0

                           ADDDB9001Z

                           ADDMB9001Z

                           HRS=1

                          ADDDB9001Z

                          ADDMB9001Z

                     **

                        LEAVE

Check and tell me.

                    

Regards,

Sankarsan

venkateshorusu
Active Contributor
0 Kudos

As far I understand you are expecting a time type value as "1" on every year from date of joining then use operation YDAYXX (XX is date of joining maintain it in 0041 IT)

Then write logic like following.

HRS=YDAYXX

HRS?1

       >

      HRS?2

             >

             <

             =

            HRS=1

            ADDDBXXXX

      <

      =

      HRS=1

      ADDDBXXXX

Regards

Venkatesh

harishtk1
Active Contributor
0 Kudos

Ketul,

Read up the documentation in HRS1Y

HRS=YFGHJJ

If the difference between the Date type in IT 0041 and todays date is 0, update your time type, otherwise let it go.

Hope this helps