Skip to Content
Author's profile photo Trong Minh (Woody) Nguyen

Time Eval – calculate consecutive working days via standard accumulate

In the another document Time Eval – calculate consecutive days for absence I have manually accumulated Total Consecutive WORKING Days.

In the document I would like to share how we achieve the same result but using the SAP standard accumulate via configuration in T555A. I believe this one would be much easier that the solution I mentioned in the above document.

I. SOLUTION for WORKING DAY


(1) Time type ZABS: all is 1, so SAP will automatically accumulate via function CUMBT in time schema.

/wp-content/uploads/2015/09/21_783562.jpg

(2) The 1st pcr: if absence type is 1211, assign 1 into Time Type ZABS

/wp-content/uploads/2015/09/3_783590.jpg

(3) The 2nd pcr:

    If Time type ZABS = 0 (it means that employee is NOT on leave):

          (i )  Plus with all total consecutive leave until the previous date (HRS+MZABS).

          (ii)  Multiple with (-1) to have negative value

          (iii) Add back value to ZABS

               => with the above step we will CLEAR the standard accumulative in Time Type ZABS.

   If Time type ZABS > 0 (it means employee is on leave).

          (i )  Plus with all total consecutive leave until the previous date (HRS+MZABS).

          (ii)  Comparing with 7

          (iii) If it is bigger than 7, raise information message.

/wp-content/uploads/2015/09/22_783591.jpg

(4) Calling the 2 pcr in time schema:

/wp-content/uploads/2015/09/14_783629.jpg

II.TESTING


TC01:

INPUT: Employee is on-leave from 24.08.2015 to 27.08.2015 and 31.08.2015 to 03.09.2015.

Expected result is that system should NOT raise the information message.

/wp-content/uploads/2015/09/19_783630.jpg

OUTPUT:

System does NOT generate any message anymore because time type ZABS has not reached 7 consecutive days yet.

We can see that system accumulate from 24.08.2015 to 27.08.2015 as 4 days. But Fri 28.08 does NOT have any absence, so system reset the counting and restart again from next Mon on 31.08.2015.

Day balance.jpg

So when checking cumulative value, we can see 1 days for Aug and so far 4 days for Sep:

/wp-content/uploads/2015/09/cumulate_783611.jpg


TC02:

INPUT: Employee is on-leave from 26.08.2015 to 29.08.2015 and 31.08.2015 to 03.09.2015.

Expected result is that system should raise the information message on 03.09.2015
/wp-content/uploads/2015/09/23_783613.jpg


OUTPUT:

System generate message on 03.09.2015

/wp-content/uploads/2015/09/24_783622.jpg

Time type ZABS

Accumulate Time type ZABS

Message:

III. CONCLUSION


With new approach, we are able to achieve same results without requiring manually carry forward value on Fri to the following Mon as I did another document. The key NOTE is that whenever employee is NOT on leave, we have to clear the value ZABS immediately. Therefore on Mon we don’t need to worry whether on the last Fri employee is on leave or not anymore.


Hope now we have many options to handle a specific requirements as well as a chance to deeply understand Time Eval. Thanks.


Best Regards,

Woody

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sriram Tamil
      Sriram Tamil

      Hi Woody,

      Thanks once again for this

      Regards

      Sriram

      Author's profile photo Trong Minh (Woody) Nguyen
      Trong Minh (Woody) Nguyen
      Blog Post Author

      Thanks Sriram 🙂