on 04-11-2011 7:06 PM
Hi Experts
I have a scenario where I've to suppess unwanted Warning messages which are displayed while I create a Related Contact on Account Identification Screen in IC_AGENT business role.
I'm using the following piece of code but its not doing any good.
lr_msg_srv = cl_bsp_wd_message_service=>get_instance( ).
*Retrieve the current messages
lr_msg_srv->collect_messages( iv_message_type = if_genil_message_container=>mt_all
iv_delete_read_messages = abap_true ).
CALL METHOD lr_msg_srv->get_messages
EXPORTING
iv_delete_read_messages = abap_true.
If anybody has experienced and solved such issue, please share.
Thanks in advance
Vishal
Hi,
You can use the following code:
DATA: lr_global_message TYPE REF TO cl_crm_genil_global_mess_cont.
DATA core TYPE REF TO cl_crm_bol_core.
core = cl_crm_bol_core=>get_instance( ).
lr_global_message = core->get_global_message_cont( ).
lr_global_message->reset( ).
if u want to delete only specific messages, then u can use :
lr_global_message->DELETE_MESSAGES method by supplying IV_MSG_ID and IV_MSG_NUMBER.
I hope this will be helpful to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vikas,
Thank you for the response. This code is unable to read the messages and hence unable to delete them. I believe the messages which I want to delete are present at the BOL layer. Hence only class CL_BSP_WD_MESSAGE_SERVICE can read them. Thanks for your response though.
Regards
Vishal
Resolved by self.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nisha,
You can refer to the following code:
data: lr_core TYPE REF TO cl_crm_bol_core,
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->reset( ).
This code will delete all the messages in the global container. You also might like to check note # [1334939|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1334939]
I hope this helps.
Thanks
Vishal
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.