Skip to Content
author's profile photo Former Member
Former Member

Time Type Counting


Dear Experts,

I created a PCR to count the number of times the employee left early from work and add 1 in time type as per the attached file. The question is is it possible after 6 months this time type to return as 0 again and to start to count from the beginning.

Your input is highly appreciated.

Thanks,

Capture kabli.PNG (23.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Dec 15, 2013 at 04:45 AM

    Hi Omar,

    You can control month and day in your time evaluation and rest the counter.

    You can read current month / day in two ways.

    HRS=BCURDY

    HRS=BCURMO (Return current period from time evaluation period)

    or

    VARSTCURMO (Return current period from time evaluation period)

    VARSTREDAY (Return current day from time evaluation period) or VARSTRDYnn (nn is a period from V_T549Q)

    Regards,

    Omid

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Omar,

      What you would do this PCR?

      If you put 1 for "Save as day balance" and "Cumulate in period balance" in time type definition in V_T555A system will reset it to 0 first of each period. So you have to put 1 in "Transfer prev. period" and restart it first day on 7th month.

      Write a simple PCR and control 7th month and 1st day like what you have done in your PCR. Just make sure put this PCR before the PCR your counting early leave to make sure you will restart counter before use it for next 6 months.

      You can set counter 0 like this: HRS=0 ADDDBZT0LZ (Z at end of ADDDB will initiate your time type)

      For more information have a look of ADDDB help in PE04.

      Regards,

      Omid

  • Posted on Dec 14, 2013 at 07:11 PM

    Create a second Time Type that will add 1 for each day of the year (HRS=Lxxxx HRS+1 ADDDB xxxx), and that resets itself after reaching 183.

    Use that second Time Type to zero out the cumulative result of Time Type ZTOL when 183 was reached yesterday.

    Add a comment
    10|10000 characters needed characters exceeded

    • For the "Left Early Counter Period", try the following

      D HRS=Lxxxx HRS?183

      * D HRS=Lxxxx HRS?0

      * * HRS=Lxxxx HRS+1 ADDDBxxxx

      * = D HRS=DZTOL HRS?0

      * = * HRS=1 ADDDBxxxx (create counter because ZTOL exists today)

      * = = (do nothing because counter not started and no ZTOL today)

      = D HRS=DZTOL HRS?0

      = * HRS=1 ADDDBxxxx (reset counter to 1, counter was183 days and ZTOL exists today)

      = = (do nothing because counter was183 days and no ZTOL today)

      And in pcr ZTOL, I would replace HRS=1 ADDMBZTOL by a decision on last xxxx in relation to 183.

      For return value * use HRS=Lxxxx HRS+1 ADDDBZTOL, while for return value = use HRS=1 ADDDBZTOL.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2013 at 11:28 AM

    Hi Experts,

    I really need a solution for the above case ASAP.

    Your input is highly appreciated.

    Thanks,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.