Within our organisation we had a requirement to customise one of the error message used by My Leave Request. The message in question was “Payroll Area &1 Locked”, we needed it to say something more user friendly. This is how I implemented the change.
Find the message
Go to transaction SE91. The message class for leave requests is HRTIM00BLPRETRO. For now just click the Display Button.
Then click the Messages Tab, to view the full list of messages. Here you will see the message in question highlighted is number 015, make a note of this number.
Create a new Message Class
Now you have the message, you need to create a new message class DO NOT EDIT THE SAP STANDARD CLASS.
ZHRTIM00BLPRETRO and click create.
Create a new Message
Now go into the new class you created and place your message in there. We chose to place the message in the same number as the one we were overriding to make it easier to match up, and also replace other messages from the original class in the future if we need to.
Now press save.
Replace the message
Now we have a message we can use it was time to replace it in the app. This is done via your ECC application also.
Go to transaction PTARQ and select Customising under Set Up
In the screen below, you will see the first three columns are for the message you are replacing.
Then you have the option to not show the message at all.
If you wish to replace the following three columns are where you put the details of your newly created message. When you press save the Message Text will be populated for you.
The new message
If you now go to your app with the payroll lock present you should now see your new message instead of the SAP standard one.
Thanks for reading I hope you found this useful.