Introduction


About 6 years back, I started my career in SAP HCM and over a period of one year, I realized that I enjoyed calculations and numbers and that is how my interest in SAP HCM Time Management and Payroll developed.


At that point of time, I expressed my interest to learn time management and payroll to one of my colleagues and asked him the best way to learn these modules. And his advice was a simple one – run time evaluation and payroll for an employee and go through every step of log to understand how the data is getting processed.


I did what he advised for time management and in this process, I came to know a lot of functions and operations. And you guessed it right, it took me quite some time. But it made me confident to understand and analyze the time evaluation and payroll logs.


However, there was one missing piece in the entire puzzle which I didn’t understand regarding time evaluation and that was the usage of time types. Because of this, I wasn’t able to write PCRs to achieve different requirements in time evaluation. I was more like a car mechanic who could identify and fix a problem in a car if it wasn’t working. But I wasn’t a person who could build a car from scratch. I hope you are able to understand what I mean by this.


Finally, I attended one training where the trainer provided me clarity on time types and their usage.


Time types are the DNA of time PCRs and without them, you won’t be able to build solutions for various requirements in time evaluation. Hence, it is very important that we understand its functionality very well.

Time Types


Time types are similar to wage types in payroll. They are used to store hours and give a definition and meaning to these hours. They can be used for various purposes as mentioned below:


  • No. of hours a person worked
  • No. of hours worked within the work schedule
  • No. of hours of overtime worked
  • Flagging that an incident has happened. Let us say that a particular overtime allowance can’t be given more than once in a month. Hence, you need to flag that you have already given this overtime allowance once in the month.

Time Types Generation


There are two ways to generate time types in time evaluation:


Through function: In case of positive time management, function TIMTP assigns time types to time pairs in Table TIP as per the configuration maintained in Table V_T555Z.

Schema TM00


/wp-content/uploads/2014/08/1_521050.jpg

         

Table V_T555Z


/wp-content/uploads/2014/08/2_521105.jpg


In case of negative time management, function TYPES assigns time types to time pairs in Table TIP as per the configuration maintained in Table T555Y.

Schema TM04


/wp-content/uploads/2014/08/3_521107.jpg

Table T555Y

/wp-content/uploads/2014/08/4_521111.jpg

Table TIP is an internal time evaluation runtime table. It doesn’t flow to the final output. Hence, Standard SAP uses PCR TR10 to cumulate the value of the time types in time pairs and transfer the final value to time types in Table TES. Finally, function CUMBT moves the time types from Table TES to Tables ZES and SALDO based on the configuration of time types in Table V_T555A.

Through PCR – To achieve different scenarios in time evaluation, time types also get generated in PCR using operations ADDDB (for day balances) and ADDMB (for period balances). Using operation ADDDB, the time types get stored in Table TES. Finally, function CUMBT moves the time types from Table TES to Tables ZES and SALDO based on the configuration of time types in Table V_T555A.


Using operation ADDMB, the time types get stored in Table SALDO. We will discuss more about operations ADDDB and ADDMB later in the document.




Types of Time Types


As per the explanation given by my trainer, there are four different types of time types.

  • Daily Time Type
  • Monthly Time Type
  • Yearly Time Type
  • Eternally Cumulating Time Type


Time types are configured in Table V_T555A.

Daily Time Type


A daily time type is a time type which gets generated for the given day and gets initialized every day. It means that it will store value only for the given day and will never cumulate. A daily time type will get generated in PCR using operation ADDDB and stored in Table TES initially. Function CUMBT will pass the value of daily time type from Table TES to Table ZES based on the configuration of the field “Save as day balance”.


Below is an example of daily time type.


/wp-content/uploads/2014/08/5_521112.jpg

 

The field “Save as day balance” has the below options:


0 or Blank

No balance formation

These time types are created and stored in Table TES during time evaluation run. However, they are not stored in Table ZES using function CUMBT. An example of such a time type is utility time types 0000 and 0001 from standard.

1

Balance formation

These time types are created and stored in Table TES during time evaluation run. They are finally stored in Table ZES using function CUMBT.

2

Balance Formation without preceding cancellation

The day balance is not deleted if there is a recalculation.


Monthly Time Type


A monthly time type is a time type which gets generated on a given day, stores value for the given month and gets initialized at the beginning of next month. It means that it will store and cumulate the value for the month before starting from 0 next month.


A monthly time type can get generated using operation ADDDB or ADDMB. If you are generating it using operation ADDDB, then the time type should look like below:


/wp-content/uploads/2014/08/6_521113.jpg

 

If you are generating it using operation ADDMB, then it is sufficient to have 1 as the value for field “Cumulate in period balance”.


The field “Cumulate in period balance” has the below options:


0 or Blank

No balance formation

These time types are not stored in Table SALDO. These are required only during time evaluation run and are not required to be saved.

1

Balance formation

These time types are stored in Table SALDO. They can get created in Table TES as daily time type using operation ADDDB and then get stored in Table SALDO using function CUMBT. Or they can get directly stored in Table SALDO using operation ADDMB.

2

Balance Formation without preceding cancellation

The period balance is not deleted if there is a recalculation.

Yearly Time Type


A yearly time type is a time type which gets generated on a given day, stores value for the given year and gets initialized at the beginning of next year. It means that it will store and cumulate the value for the year before starting from 0 next year.


A yearly time type can get generated using operation ADDDB or ADDMB. If you are generating it using operation ADDDB, then the time type should look like below:


/wp-content/uploads/2014/08/7_521114.jpg

 

If you are generating it using operation ADDMB, then it is recommended to have 1 as the value for field “Cumulate in period balance” and “Transfer prev. period”.

The field “Transfer prev. period” has the below options:


0 or Blank

No transfer

The period balance is not transferred from the previous period (month). The value of the time type will get initialized (turn to 0) in Table SALDO for the new month.

1

Transfer

The period balance is transferred from the previous period and values for the new period get cumulated in the same time type in Table SALDO. This time type will get initialized (turn to 0) at the start of new year.

Eternally Cumulating Time Type


An eternally cumulating time type is a time type which gets generated on a given day and stores its value eternally in Table SALDO till it is forcefully initialized (forcing the value in Table SALDO to start from 0).


An eternally cumulating time type can get generated using operation ADDDB or ADDMB. If you are generating it using operation ADDDB, then the time type should look like below:

/wp-content/uploads/2014/08/8_521115.jpg

If you are generating it using operation ADDMB, then it is recommended to have 1 as the value for field “Cumulate in period balance”, “Transfer prev. period” and “Transfer prev. year”.


The field “Transfer prev. year” has the below options:


0 or Blank

No transfer

The period balance is not transferred from the previous year. The value of the time type will get initialized (turn to 0) in Table SALDO for the new year.

1

Transfer

The period balance is transferred from the previous year and values for the new year get cumulated in the same time type in Table SALDO. This time type will never get initialized until it is forced to initialize in a PCR using operation ADDMB.

Let us now go through three other fields in the time type table:


  • Period bal. prev. period – The period balance of previous period is transferred to a different time type. One must specify the time type to which the balance needs to be transferred.
  • Period bal. prev. year – The period balance of previous year is transferred to a different time type. One must specify the time type to which the balance needs to be transferred.
  • Store of time accounts – If this field has value 1, then the period balances are stored in Table ST in cluster B1. These period balances will get downloaded on to the time recording system using the info fields of HR Mini-Master. This will enable employees to view their period balances at the time recording system. A maximum of ten balances can be downloaded to the time recording system to allow employees to view their balances there. This functionality is possible only if the time recording system supports this.

Operations ADDDB and ADDMB

Operation ADDDB


The syntax for operation ADDDB is ADDDBXXXXY where XXXX is time type and Y is control indicator for cumulation. Operation ADDDB adds the value from the no. of hours field to the time type determined by parameter XXXX in day balances table TES.


XXXX can have below values:

  • *       –        Time type currently being processed.
  • XXXX  –        Time type XXXX is used.

Y can have below values:


  • Blank  –        The value will be added to a value that already exists in the time type.
  • Z       –        The value that already exists in the time type will be overwritten.
  • T       –        Planned working hours are filled in the time type.

Operation ADDMB


The syntax for operation ADDMB is ADDMBXXXXY where XXXX is time type and Y is control indicator for cumulation. Operation ADDMB adds the value from the no. of hours field to the time type in the period balances internal table (SALDO).


XXXX can have below values:

  • *       –        Time type currently being processed.
  • XXXX  –        Time type XXXX is used.

Y can have below values:


  • Blank  –        The value will be added to a value that already exists in the time type.
  • Z       –        The value that already exists in the time type will be overwritten.
  • T       –        Planned working hours are filled in the time type.

Important: SAP recommends to use operation ADDMB in period end processing under IF    EOM. If we use operation in day processing (between BDAY and EDAY), it will cause errors if there is a recalculation. Below screenshot shows where ADDMB needs to be used.


/wp-content/uploads/2014/08/9_521116.jpg

 

You may have a requirement where you wish to reduce the value of period time type to 0 if a certain event has occurred in a given month. You can do it using operation ADDDB or ADDMB.

Using Operation ADDMB to reduce Period Balances to 0


If you are using operation ADDMB, then you can reduce the period balances to 0 at the start of next month. Let us say that the requirement is that whenever Ramadan period ends, certain period time types should be reduced to 0.


Please refer the below configuration of PCR and schema.

/wp-content/uploads/2014/08/10_521117.jpg

/wp-content/uploads/2014/08/11_521118.jpg

The PCR ZTAV gets executed only at the end of the month. Let us say that Ramadan period starts in Dec and ends in Jan and we have two eternally cumulating time types which store values during the Ramadan period. The requirement is to reduce the value of eternally cumulating time types ZAIL and ZRIL to 0 after the end of Ramadan period. Whenever Ramadan period ends, we can generate a monthly time type ZRED with a value of 1. On 31-Jan, the value of ZRED is read using operation HRS=MZRED and if it is greater than 0, it means Ramadan period has ended in Jan and we pass a value of 0 using HRS=0 and add it to Table SALDO using operation ADDMBZAILZ and ADDMBZRILZ. Since we are using Z after the time types ZAIL and ZRIL, the existing value of ZAIL and ZRIL in Table SALDO is overwritten with 0. On 01-Feb, the value of ZAIL and ZRIL in Table SALDO will be 0.

Using Operation ADDDB to reduce Period Balances to 0


If you are using operation ADDDB, then you can reduce period balances to 0 on any day. Below is an example of standard PCR where it has been used. The value of period balance 0904 is being reduced to 0 at the start of every week.


/wp-content/uploads/2014/08/12_521119.jpg

 

Functioning of Day Balances and Period Balances


Let us now go through the values of day balances and period balances in Table ZES and Table SALDO over several days using a simple PCR. Below is the PCR which I have written.


/wp-content/uploads/2014/08/13_521120.jpg

The functionality of the above PCR is to add a value of 1 to the time types ZDTM (daily time type), ZMTM (monthly time type), ZYTM (yearly time type) and ZETM (eternally cumulating time type) for each day of time evaluation run. If the value has been added for a given time pair once for the day, it isn’t added again. Also, all existing values of these time types are overwritten with value 1 for the given day.


The custom PCR Z123 is placed in a custom version (Z123) of negative time schema TM04 as shown in the screenshot below:


/wp-content/uploads/2014/08/14_521121.jpg

 

An employee has been hired on 25-Nov-13 and we will run time evaluation for this employee from 25-Nov-13 till 05-Jan-14 and I will show you the value of all the time types in Table ZES and Table SALDO over various days.


IT0000

/wp-content/uploads/2014/08/15_521122.jpg

Date: 25-Nov-13

 

Table ZES

/wp-content/uploads/2014/08/16_521126.jpg

Table SALDO

/wp-content/uploads/2014/08/17_521127.jpg

 

The time type ZDTM is not present in Table SALDO because the time type ZDTM is a daily type.

Date: 30-Nov-13

Table ZES

/wp-content/uploads/2014/08/18_521128.jpg

Table SALDO

/wp-content/uploads/2014/08/19_521129.jpg

Between 25-Nov-13 and 30-Nov-13 (including both the days), the time evaluation has run for 6 days and hence, the value of time types ZMTM, ZYTM and ZETM in Table SALDO is 6.

Date: 01-Dec-13

Table ZES


/wp-content/uploads/2014/08/20_521130.jpg

Table SALDO

/wp-content/uploads/2014/08/21_521135.jpg

The value of time type ZMTM is 1 because it is a monthly time type and gets initialized at the start of the month. On 01-Dec-13, the time evaluation has run for 1 day for monthly time type ZMTM and hence, its value in Table SALDO is 1.


Between 25-Nov-13 and 01-Dec-13 (including both the days), the time evaluation has run for 7 days and hence, the value of time types ZYTM and ZETM in Table SALDO is 7.

Date: 31-Dec-13


Table ZES


/wp-content/uploads/2014/08/22_521138.jpg

Table SALDO


/wp-content/uploads/2014/08/23_521139.jpg

There are 31 days in December and hence, the value of monthly time type ZMTM in Table SALDO is 31. Between 25-Nov-13 and 31-Dec-13, there are 37 days (including both the days) and hence, the value of time types ZYTM and ZETM in Table SALDO is 37.

Date: 01-Jan-14


Table ZES


/wp-content/uploads/2014/08/24_521141.jpg

Table SALDO

The value of time types ZMTM and ZYTM on 01-Jan-14 in Table SALDO is 1 since these time types get initialized. However, the value of time type ZETM is 38 since there are 38 days between 25-Nov-13 and 01-Jan-14 (including both the days).

/wp-content/uploads/2014/08/25_521142.jpg

Date: 05-Jan-14


Table ZES


/wp-content/uploads/2014/08/26_521143.jpg

Table SALDO


/wp-content/uploads/2014/08/27_521144.jpg

The value of time types ZMTM and ZYTM on 05-Jan-14 in Table SALDO is 5 since the time evaluation has run for 5 days in January. However, the value of time type ZETM is 42 since there are 42 days between 25-Nov-13 and 05-Jan-14 (including both the days). The value of time type ZETM will keep on cumulating eternally till it is forced to initialize in a PCR.


Here, I come to the end of this knowledge artifact. Thanks for your patience to go through it. I hope with this understanding of time types, you will be in a better position to write PCRs to achieve various time related requirements in time evaluation.


Thanks and regards,

Vivek Barnwal.


*****************************************************************************************************


You can also refer to other knowledge artifacts created by me at the below link:


One Stop Shop of my Knowledge Artifacts in SAP HCM




To report this post you need to login first.

54 Comments

You must be Logged on to comment or reply to a post.

  1. Bhama S

    Hi Vivek,

    Thank you so much for your effort and patience to write such a detailed document, really there is no words to say.All your documents are really far out. keep going…

    Regards,

    Bhama

    (0) 
  2. S K

    Hello Vivek

    This is excellent piece of information.

    I am rarely seeing this in our country that People spending time to create Such wonderful document like this.

    Really these documents are tempting me to work under consultants like you to gain more knowledge.

    Regards

    SK

    (0) 
          1. shiva Kumar

            Hi Sir, 

            i have get a chance to view your blog today. it is was interested , past three years i am in sap HCM , still i trying to finds insight view of Time schema , at least now i got idea after seeing your blog regarding time types.i would like to understand the difference when i use TM00 , Tm01 , Tm04 schemas and how the data flow for each schemas

            Mainly i little confusing about -ve time which schema should i use if my tms =9 in infotype 7. and what is the impact of tm01.

            and how T555Y is configured , and t555Z  importance of these table and how it is determined.

            and little confuse about the day grouping daymo table and t510S table.

            sir could share your knowledge for me or any self explanatory docs if u have that will we great help in my career

            can i have your contact no or email pls

            regards,

            shiva K

            9886431002

            (0) 
  3. Harshal Soni

    You have packed a whole lot of punch in this article…

    I started 9 years ago with the same feeling as you had when you started. I had no one to guide me or direct me where to start… the projects kept on coming and you keep on learning…

    Anyways… Awesome job and Share more Knowledge ….

    – Harshal

    (0) 
  4. Vijay Shankar

    Wow a very good document to know about time types processing through PCR’s.

    Can this be possible to explain on different scenarios and its process….

    Thanks

    Vijay

    (0) 
  5. Vijay Shankar

    Hi Vivek,

    Can you please help me in time types usage.

    1.  If i am using time type in V_T559E  either in day / period balance field what are the options that we have to select in V_T559L and what should not be selected.

    It would be good if you can explain on scenario wise..

    Thanks

    Vijay

    (0) 
  6. Jagadeesh T.

    Hi Vivek,

    Nice piece of document. Its so elaborate and descriptive. Never seen such a kind of document. Its so understandable even to a fresher in SAP HCM. Appreciate your patience and dedication.

    Regards,

    Jagadeesh.

    (0) 
  7. Patrick Callen

    One word – AWESOME! Excellent document on time types. I wish I had this several years ago. I learned on my own, but still not to the depth that you have documented for us. Thank you Vivek!

    (0) 
  8. Sriram Tamil

    Hi Vivek,

    The words you mentioned are true, run a time evaluation and payroll , go through the log one by one. exactly the samething which i did, when i started to learn the time management , Excellent Job Vivek,,

    i am expecting the same from you on payroll too..  it would be really great if i get that too..

    Thanks

    Sriram

    (0) 
  9. Sriram Tamil

    Hi Vivek.

    Just a small doubt i am not sure whether our SCN has that functionality. not only me many of our Guru’s and beginners go through your blog . but is there any way to notify us when you add new document to your blog???

    Thanks

    Sriram

    (0) 
          1. DHIRAJ MISHRA

            Vivek Sir,

            Greetings!!!!

            Writing first time to you in this expection to get your guidance and help.

            Can you help me to design PCR to create leave quota based on working days. I am new to SAP and having no idea how to do it. Often I read your all blogs but could not find any solution.

            Client having positive time management, In & Out is stored in infotype 2011 and Schema is being used ZM04 customised version of TM04.

            Requirement is employee will get 1 leave after 20 working days and it will be carry forward as well.

            Regards

            Dhiraj Mishra

            (0) 
            1. Vivek Barnwal Post author

              Hi Dhiraj,

              I have seen your thread and I will take some time to respond to it. One important thing which I wish to point out is that for positive time management with time events, we use custom version of schema TM00 and not TM04.

              Please make this change first.

              Regards,
              Vivek Barnwal

              (0) 
  10. Lavila Vamsi

    Vivek,

    Excellent doc and all the examples are very clearly understandably.

    All your articles share a great knowledge to people like us.

    (0) 
  11. Vikram Kona

    An amazingly detailed and helpful article. I do not think there is any other like it on this topic. Many thanks for your time, effort and the generousness to share your knowledge.

    (0) 
  12. Adi B

    Hi Vivek,

    This is really an excellent presentation and really helpful who want to write time PCR’s.

    Regards,

    Adi.

    (0) 
  13. Ketul Patel

    Again one of the Big Hit!!

    Excellent Blog with detailed explanation. 🙂

    Mr. Vivek yours this much efforts will save many others HCM Consultant’s Hours to study and dig Time Type through other ways. Much Appreciated.

    (0) 

Leave a Reply