cancel
Showing results for 
Search instead for 
Did you mean: 

Day based quota accrual in Negetive Time Management

former_member212348
Participant
0 Kudos

Dear Experts,

It is a bit urgent and I need your help badly. Is it possible to accrue quota in -ve Time management based on working day. Example, if an employee spends 12 working days (excluding LWP) he will get 1 days sick leave. My client is maintaining IT2002 for every present day in the office. How shall I read hours in IT2002 using a pcr?

Please help me?

Thanks....

Accepted Solutions (0)

Answers (2)

Answers (2)

Sanky
Active Contributor
0 Kudos

Hi,

You can achieve it through custom PCR and custom schema would be copied from TM04.

If you are maintaining attendance day in the IT2002. Then you can query working day's and continuous working days(i.e 12) with the help two PCR.

1st PCR will check working day's and will update time type with the condition of LWP & weekly off.

ZTST

*

****

      VARSTFREE

          Y

             LEAVE

          N

               VARSTPRSNT

                  N

                       HRS=M1000

                       HRS-M1000

                       ADDMB1000Z

                  P

                        OUTTPPRTYP

                              *

                              **

                               ***

                               ****

                              1000

                                   HRS=PNUM

                                   HRS?0

                                          <

                                            COLOP *

                                          *

                                            HRS=1

                                            ADDDB1000Z

ZCHK

*

  ****

        HRS=M1000

        HRS?12

           <

              LEAVE

           =

             HRS=1

             ADDDB9999Z

             HRS=M1000

             HRS-M1000

             ADDMB1000Z

Use the ACTIO function for 1st PCR and insert after P2002 function in the custom time schema and for the 2nd PCR use the same function and insert after CUMBT function. After the 2nd PCR line again add CUMBT function after that.

Here 1000 and 9999 is the time type where for the TType 1000 you will maintain 1 in period cumulation in the time type characteristics through table V_T555A and for the time type 9999 you will maintain day balance as 1 in table V_T555A. Time type 9999 will be using in the quota type base entitlement as day balance of sick leave quota.

Check and let me know.

Regards,

Sankarsan

            

          


former_member212348
Participant
0 Kudos

Hi,

Please let me know why I am not able to write HRS?0 after HRS=PNUM mentioned above. It is telling me "

Variable argument may only be 8 characters long

"


jagan_gunja
Active Contributor
0 Kudos

Can you please post the PCR in table display format.? You can set this in initial PE02 screen by navigating to Utilities > Table display.

For HRS?0, any way, you can use only <, >, = or *.

Sanky
Active Contributor
0 Kudos

Ok.

You need to further extended the tree structure of your PCR like below.

              

                0800

                    GCY ZTSTA

A

   ****

         HRS=PNUM

         HRS?0

              <

                 COLOP *

             *

                HRS=1

                ADDDB1000Z

Check and let me know.

Kindly Change your name. Would be good to address you.

Regards, Sankarsan

Former Member
0 Kudos

wow...i think ur expert in writing the pcr

former_member212348
Participant
0 Kudos

Hi Sankarsan,

Please find attached screen shot. I maintained IT2002 from 1st Jan to 12th Jan and execting PT60 today starting from 1st Jan to 31.12.2015.

But I am not able to see any time type accumulation nor quota generation.

I created the time types as you mentioned above.

1000--------------------->> z100

9999--------------------->> Z200

Please help.

Thanks,

Arka

Sanky
Active Contributor
0 Kudos

HI,

You would like to create an quota based upon no of day's work. Am I correct?

I think you have created quota type, base entitlement and generation rule. In the Base entitlement have you maintain day period quota type say 1000 and select the accrual period.

In the generation rule have you selected day radio button in the accrual period tab.

Some basic configuration is required. Hope so it's done.

Now comes to the PCR about the calculation of quota accrual.

Share the P2002 function TOP table details from time evaluation log and share the ZCHK pcr details.

As of now in the current PCR ZTST you are adding 1 to time type Z100 based upon specific attendance type.

Regards,

Sankarsan


former_member212348
Participant
0 Kudos

Hi,

I created two time types Z100 with "Cumulate in Period balance" as 1 and another Z200 with "Save as day balance" as 1 only.

In base entitlement I added Z200 in "Day balance" field and Selected accrual period Radio button.

In "Generation Rule" Accrual Period is "Daily", Transfer time "Upon Accrual", Accrual entitlement "No Prorata"

ZCHK Accrual of EL

    *

      ****

        HRS=MZ100  Set

        HRS?12     Decision op.     HRS

          <

            LEAVE      Stop with PC Rule

          =

            HRS=1      Set

            ADDDBZ200Z Set day balance = 0

            HRS=MZ100  Set

            HRS-MZ100  Subtraction

            ADDMBZ100Z Set month bal. = 0

Sanky
Active Contributor
0 Kudos

Ok. It's fine.

Insert this PCR after CUMBT function with function ACTIO. After this PCR line again add CUMBT function.

Then check the QUOTA function processing and Output table details.

Let me know the result.

Regards,

Sankarsan

former_member212348
Participant
0 Kudos

Hi,

I did the same and nothing is coming. PFA screen shot. I noticed that in the log the PCR ZTST after P2002 is also not showing and thus time type Z100 is not storing anything at all. Did I write the PCR ZTST correctly.

CUMBT                       Update balances, wage types...

ACTIO ZCHK

CUMBT

QUOTA                       Generate absence quotas

TST Count Working days

   *

     ****

       VARSTFREE  Plnd hrs DWS = 0?

         N

           VARSTPRSNT Employee at work

             N

               HRS=MZ100  Set

               HRS-MZ100  Subtraction

               ADDMBZ100Z Set month bal. = 0

             Y

               OUTTPPRTYP Attendance type

                 *

                 **

                 ***

                 ****

                 0800

                   GCY ZTSA   Goto PC rule

         Y

           LEAVE      Stop with PC Rule

and

ZTSA Auxilliary PCR for ZTST

    *

      ****

        HRS=PNUM   Set

        HRS?0      Decision op.     HRS

          *

            HRS=1      Set

            ADDDBZ100Z Set day balance = 0

          <

            COLOP *    TIP  >TOP spec.TType

I am trying to count the attendance days.

Pls help.

Sanky
Active Contributor
0 Kudos


Share the P2002 function output table details from time evaluation log.

Use PTIP function for 1st PCR and use GEN in the Par3 in schema.

Regards,

Sankarsan

former_member212348
Participant
0 Kudos

Hi,

GEN can only be given at par2 not par3. I have given with PTIP. Still nothing is reflecting. I want to know one thing: This Varst operation, does it check only the present day? or every day in a period. I updated 2002 from 1st jan 2015 to 13th Jan. But I am executing it toady 1st Dec.Does it have any impact on it?

Table TIP

From     To       1  P  ID  CT  P  TTyp  BR   ER   C  O  I  BPin  EPin  PT    ALP  C1    AB  Number

10.0000  17.0000     1      00                        D                                        7.0000

somehow the pcr ZTST after P2002 seems not working.

former_member212348
Participant
0 Kudos

Sankarsan,

I want to ask another thing....in your first mail you wrote condition 'P' in VARSTPRSNT, but there is no P, I made it Y

secondly, after OUTTPPRTYP, there are 4 set of stars and then 1000. What is 1000? is it a time type or attendance type?

Sanky
Active Contributor
0 Kudos

GEN would be in PAR2.

Time evaluation is run on every day so operation is also checking on day wise.

Please share the screenshot of TOP of function P2002.

Your information is giving proper picture on the TOP of the function P2002.

Regards,

Sankarsan

Sanky
Active Contributor
0 Kudos

It was typing mistake. It should be Yes(Y).

1000 is the attendance type.

former_member212348
Participant
0 Kudos

Hi,

Now It is coming as I changed the 1st PCR. But I want it to count OFF days as well where DWS =0.

Pls let me know how to do it.

Sanky
Active Contributor
0 Kudos

If you want to count Off day's then Pass 1 to another Day time type Under VARSTFREE (Yes)

HRS=1

ADDDBZ101Z

Regards,

Sankarsan

former_member212348
Participant
0 Kudos

Thanks Sankarsan...it's working now.

Sanky
Active Contributor
0 Kudos

Hii,

oohh great.

Close the thread with correct and helpful answer marking.

Regards,

Sankarsan

Sanky
Active Contributor
0 Kudos

Close the thread.

former_member212348
Participant
0 Kudos

how?

Sanky
Active Contributor
0 Kudos

Hi , Check the below two documents link which will give you an idea how you can close the thread.

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

http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why

Regards, Sankarsan

venkat_polisetty
Active Contributor
0 Kudos

Hi,

You can use Operation OUTTPPRTYP (which will read the attendace type from IT2002)

HRS=PNUM    OUTTPPRTYP

This will capture the number of attendace hours .

Regards,

Venkat Polisetty