Hi Frds,
I am tried to catch UI error message in BADI(order_save) by different ways but non of them workout . Below are the method i already use in BADI to catch.
1) CALL FUNCTION 'CRM_MESSAGES_DISPLAY'
CALL FUNCTION 'CRM_MESSAGES_GET_MSG_INFO
2) lr_message = cl_bsp_wd_message_service=>get_instance( ).
CALL METHOD lr_message->get_messages
EXPORTING
iv_msg_type = if_genil_message_container=>mt_error
RECEIVING
rv_result = lt_message.
3) data : lr_mcm type ref to cl_crm_genil_mess_cont_manager
lr_core = cl_crm_bol_core=>get_instance( ).
lr_mcm = lr_core->get_message_cont_manager( ).
lr_mcm->get_all_message_containers( IMPORTING et_result = lt_msg ).
The custom error message which need to be catch is define in do_prepare_output using class cl_crm_genil_global_mess_cont.
Please advice.
Thanks
Imran