After working with SAP for more than 15 years and travelling across the Globe for SAP Projects one requirement I always use to get is to design a POP UP for a Custom Error SAP message. I was tired doing this until I figured out you can do this without any ABAP Coding and for every ERROR Message.
Please login to SAP and go to ME21N Tcode and before the Magic the error message shows in the bottom which may be not visible always
How we can change it to a Pop Up.
Go to Options by checking below screenshot
Select Notifications and Check Show error messages in a dialog box and Hit Apply and OK
After making this change you can get this new Pop Up.
You can use the above blog in SAP ECC as well as SAP S/4 HANA
For video version check below