The most popular classes for on premise SAP HCM are the Time Management and Payroll ones which go into configuring these modules. Even though Employee Central is making a lot of strides in Time Management and with the partnership we have with Workforce Software that does allow for complex rules and calculations, I still know and hear about many companies in 2016 implementing and expanding their on premise SAP Time Management systems. I have gotten requests from people asking me to write on this particular topic since it is something that isn’t talked about nearly as much although it is still frequently used. There are so many customers who use SAP Time Management especially with many of the complex union rules and business processes that are out there that it will be around for a while. For Payroll there is obviously still a ton of interest in the configuration of it since SuccessFactors Employee Central Payroll still requires most of the same setup as on-premise SAP Payroll.
In both Time Management and Payroll classes I always get requests to compare Time vs Payroll since they share the same framework in their setup (Schema’s, Rules, Functions, Operations) and it seems like there is always of a friendly competition between Time people and Payroll people as they try to compare the two. In most cases people know either one or the other, or are clearly stronger in one although they understand how the other works. Fortunately, I have spent a lot of time with both from a consulting perspective as well as teaching the classes on both so that gives me a good perspective to compare the two and write a few blog posts around it as requested by colleagues and customers.
In one of our Time Management classes WNA311 there is a section on displaying messages in the Time schema for Time Administrators. In this class if there is anyone who works with payroll they always tend to ask – what about messages in the Payroll schema? This is a topic that also always appears to come up in one of my favorite classes – the advanced Payroll Schema Rule Writing Workshop class WNA11 when people ask how they can accomplish this. I have configured custom messages when a scenario occurs in the Payroll schema as well as custom messages when a scenario occurred in Time Management so I decided to write this first article going into a comparison of custom message in Time vs custom message in Payroll.
Creating a custom message in the Time Schema
In Time Management SAP has a standard operation COLER that is used to display messages in the Time schema. We are going to utilize that in order to display our message.
- First I am going to create my message text on table V_T555E.
- Next, I am going to write the schema rule logic that determines if my message should be displayed. For the purpose of this I will make the message display for only a certain Time Management group (1) from Infotype 50 and I used COLERXXI to make it so the message is informational and not a hard error.
- Lastly, I will call my custom rule in my schema ZMIS
Now when I run Time Evaluation, my custom message will be displayed if the criteria (Screenshot of the schema log included) is hit and I can go to PTMW/PT_ERL00/PT40/ and see this message being displayed as well as from within the schema log.
That process was relatively painless and your average Time Management functional resource should certainly be able to write this logic pretty easily.
Next, I am going to show you what needs to be done in order to do the same thing in Payroll.
Creating a custom message in the Payroll Schema
In Payroll, SAP has an operation XMES that is used to display a custom payroll message. There used to be an operation MESSG in Payroll, but it was deleted when XMES was created. SAP created a note 504704 which explains creating a message in payroll. I have pasted a screenshot of this note here for informational purposes. I will point out that this Note mentions there is a sample implementation 99TST that you could theoretically use if you only needed to create a message one time without requiring an ABAP code change.
So what do you have to do in order to create a message in the Payroll schema? Here is what is required:
- Create a enhancement in standard SAP code within include RPCBU409_OPXMES or register the object with SAP to add our code. I use an enhancement implementation for this example.
- Write logic that is called from the custom exit functionality (ZZ). There is some sample code that you can easily re-use which is commented out in this INCLUDE under subroutine xmes_natio. I decided to change it a bit so that the parameter entered in the payroll PCR (p_param) is the one that is called from my message class, but your can certainly use the SAP code or create your own code. Here is the commented out example SAP code as well as the small amount of code that I wrote.
- Next, I need to create my message text in HRPAY99CALC (You would want to use a message class in the customer namespace and not the standard SAP one HRPAY99CALC so that your text is not overwritten by SAP during an upgrade)
- Now I can create my message using operation XMES in a Payroll Schema rule. For the purposes of a demonstration, I will have this message display anytime my rule is called with no restricting logic, but you would probably create schema logic that dictates when this message is to occur.
- Lastly, I can put this rule into my payroll schema ZUIS by calling function ACTIO (Since I want it to be called regardless of what is in the IT/RT table so I would not use PIT/PRT) and I would call my PCR ZIMR
Now when I run Payroll for the associate I am testing with I can see the message being displayed.
We can see the clear difference in the complexities of creating messages between Time and Payroll. In Payroll, your average functional resource will not be able to do this and would need to rely on a technical resource in order to make this change. In addition, many organizations are stricter with enhancement to SAP code.
Time Administrators can work with the custom messages via the Time Managers Worplace (PTMW) or the Time Management Pool (Transaction PT40) and it is also something that SAP delivers standard in Time Management in the standard schema’s (TM00/TM04) as well as standard messages on V_T555E. So the framework of Time Management supports the creation and clearing of messages and that is likely why it is much easier.
In Payroll, the framework for writing custom messages is more restrictive which is likely because there inst a framework for clearing and dealing with those these messages. So with that being said, it does not always make sense to create a payroll message for a scenario occurring such as if an employee meets a particular limit, because then the message (depending upon the logic calling it) could come up in all future periods and it could quickly get out of control if not implemented correctly. I have come across scenarios where people want to be notified of a particular scenario occurring (Typically an exception that should be fixed) in Payroll via a message. This makes it so that these messages will also come up when you run a simulation or live payroll and then the appropriate Admin can clear the message by fixing the master data and you wont have an issue with messages getting out of control because the message triggers a reaction to fix it.
With the new functionality SAP has delivered in the Payroll Control Center and validation checks that you can build, it will make it less likely that you will need to create messages in your schema because they could be created in the form of data validations with a framework to acknowledge and clear the messages via your Admin role.
Regardless of the complexity, the beauty and power of SAP is that it is still possible for you to create messages in your payroll schema if that is something you really wish to do.
Please feel free to leave your thoughts in the comments below. I would love to hear from others on the topic comparing Time and Payroll including potential future comparisons you may be interested in!