08-24-2009 9:38 AM
Hi folks,
I am trying to keep some validations for attachments in ME51N Tcode. Before saving the document, system will check for the attachment.If it is empty it will prompt a error message saying its mandatory.After seeing the message when user attach the attachment and try to save the screen again it showing a system error.Can we use error message in the user exits.If not what is the alternative for that.Could any suggest me..
Thanks in advance,
Shyam.
08-24-2009 9:48 AM
HI,
U can use error messages in an user exit.. However as per ur issue it seems ur code is called twice ....Please see the okcode for the same..
When ever u press save button , u r validating....once ur validation is fine u should allow to save it...otherwise throw error message... Make sure that u satisf the conditions in the validation for saving..
Regards,
Nagaraj
08-24-2009 10:11 AM
Hi Nagaraj,
Actually my code is calling only once. when i save it for the first time it throwing the custom error message.After making the corrections and again if we try to save then it showing the system error.
Thanks,
Shyam.
08-24-2009 10:15 AM
HI,
If that is the case then put a break point in the code..While saving please debug and see why it is throwing error
Regards,
nagaraj