05-21-2010 7:16 AM
Hello Gurus,
i am calling a Function Module, in my HOTSPOT_CLICK Method of the ALV Grid, that triggers a Message Type E, and after the message appears on the screen, at PAI i am thrown out of the Transaction, even /H won't work!! Did anyone have this problem before?
Cheers.
05-22-2010 11:24 PM
Hello Ioan,
If you look at the F1 help on the statement MESSAGE, it says that the message type E and W are meant for dialog processing (Screen-PAI), where in it permits an error dialog & the user can respond to it. It also says that these message types should not be used in other contexts.
In your case, the context is PROCEDURE. So, when you trigger an error message from a procedure i.e. inside the HANDLER method of the event, it results in abnormal termination.
I think, a good idea to display the error message as TYPE 'I' and build the logic in such a way that if the error occurs, no further processing takes place.
For ex: IF error = true.
MESSAGE TYPE 'I'.
ELSE.
processing...
ENDIF.
The following lines are from the F1 HELP of statement MESSAGE:
The system behavior after a message of a particular type is sent is context-dependent:
Messages in dialog processing
Messages in controlprocessing
Messages in batch input
Messages in background processing
Messages in updating
Messages in conversion routines
Messages in procedures
Notes
Messages are mainly intended for use during dialog processing, and there for the event PAI. Here, messages of type "E" and "W" permit an error dialog. to be used in connection with the statement FIELD of the dynpro structure logic. Therefore, messages of type "E" or "W", in particular, should never be used in other contexts.
Let me know if that was helpful or if you have any question further regarding this.
Thanks & Regards,
Saurabh Buksh
05-22-2010 11:24 PM
Hello Ioan,
If you look at the F1 help on the statement MESSAGE, it says that the message type E and W are meant for dialog processing (Screen-PAI), where in it permits an error dialog & the user can respond to it. It also says that these message types should not be used in other contexts.
In your case, the context is PROCEDURE. So, when you trigger an error message from a procedure i.e. inside the HANDLER method of the event, it results in abnormal termination.
I think, a good idea to display the error message as TYPE 'I' and build the logic in such a way that if the error occurs, no further processing takes place.
For ex: IF error = true.
MESSAGE TYPE 'I'.
ELSE.
processing...
ENDIF.
The following lines are from the F1 HELP of statement MESSAGE:
The system behavior after a message of a particular type is sent is context-dependent:
Messages in dialog processing
Messages in controlprocessing
Messages in batch input
Messages in background processing
Messages in updating
Messages in conversion routines
Messages in procedures
Notes
Messages are mainly intended for use during dialog processing, and there for the event PAI. Here, messages of type "E" and "W" permit an error dialog. to be used in connection with the statement FIELD of the dynpro structure logic. Therefore, messages of type "E" or "W", in particular, should never be used in other contexts.
Let me know if that was helpful or if you have any question further regarding this.
Thanks & Regards,
Saurabh Buksh
05-25-2010 6:22 AM
Hello Saurabh,
thank you very much for the answer. I did, actually, read the help for the Message command but i overlooked the "during dialog processing" part. I thought that my ALV is i a dialog processing ... anyway, thank you again.
Best regards,
Ioan Constantin.