Error raised using 'CRM_MESSAGE_COLLECT' not displayed in Web UI
I have implemented the badi CRM_ORDERADM_H_BADI and based on certain conditions i raise an exception and display the error message using function module 'CRM_MESSAGE_COLLECT'. The application log is populated with the error message and I am able to see the error message in SAP GUI . However when the same transaction is triggered via WebUI , even thought the exception is raised , the error message is not displayed.
I know i can use the method ADD_MESSAGE of the class CL_CRM_GENIL_GLOBAL_MESS_CONT if i want the error message to be displayed in Web UI .
However I want the message to be displayed either if the transaction is run from the SAP GUI or web UI .
Have anyone come across the similar situation , is there something I am missing.
Thanks & Regards ,