Customising messages in My Leave Request
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.
Note: I would advise creating a new transport for this class, but that’s up to you.
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
Now navigate through the options to configure output messages, as below.
Choose the require rule group, then you should see the screen to enter a new message
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.
Is it possible to trigger an error message somewhere in PT_GEN_REQ BADI implementation (using some random SAP Standard message) so that in turn, I can have the system look up into this message class table?
I'm having a hard time popping up custom messages to the Fiori app so I was thinking to use this as a workaround 🙂
Thank you for sharing the Idea and information. Any idea how to make it Country specific ?