cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Std. CRM Messages

Former Member
0 Kudos

HI Experts,

I have a requirement, in which i need to remove certain messages from WebUI.

How messages are displayed? is there any method or component on which i can work ?

I debug a whole cycle of the Component call and didnt find any place where these messages are getting populated or processed.

there are message classes in all the Context node classes but they don't contain any record.

but on the view i am getting 6 error messages. I need to remove these messages so that they don't show up.

any idea how this can be done.

-

Dave

Edited by: Dave on Jul 11, 2011 12:58 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dave,

The messages that are displayed in the Web UI are through the message container CL_CRM_GENIL_MESS_CONT_MANAGER. These can be deleted by resetting the class to get free of all the messages that were displayed so far.

Please check the below given code,

DATA: lr_core TYPE REF TO cl_crm_bol_core,

lr_msg TYPE REF TO cl_crm_genil_mess_cont_manager.

*Create a instance of BOL

lr_core = cl_crm_bol_core=>get_instance( ).

*Create a instance of message container

lr_msg = lr_core->get_message_cont_manager( ).

*Reset the container to delete the messages

lr_msg->reset( ).

Hope this helps you out!

Regards

Veena.

Former Member
0 Kudos

HI Veena,

This is exactly what i was looking for. It solved the issue.

Thanks a lot. full points awarded.

-

Dave

Answers (1)

Answers (1)

AnupDDesai
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Kindly check the clss 'CL_BSP_WD_MESSAGE_SERVICE' for more details.

Regards,

Anup

Former Member
0 Kudos

HI Anup,

Thanks for the reply.

I got the reference of this class in the DO_Prepare_Output method, but there its attribute are empty means there is no messages in them.

I put a breakpoint in its Get_messages method and found that Component BSPWD_BASICS is the Component which displayed all the messages (view ErrorView2). In its .htm page it is getting all the messages. Here is the code from .htm page.

 * -> get messages (from CL_BSPWD_BASICS_ERRORVIEW_IMPL->GET_AND_PREPARE_MESSAGES)
  CONTROLLER->GET_MESSAGES( IMPORTING ET_MESSAGES = LT_MSG
                                      ev_message  = lv_msg ).
  if lv_msg is bound and lt_msg is bound.
    insert lv_msg->* into lt_msg->* index 1.
  endif.

* -> render messages
  CL_CHTMLB_CONFIG_UTILITY=>CREATE_MESSAGE_AREA(
    iv_page_context                = page_context
    iv_controller                  = controller
    it_messages                    = lt_msg
    IV_SEND_MESSAGES_CHANGED_POPUP = CONTROLLER->gv_messages_changed ).

I can put my code here to remove the selected messages, but then they will be removed from all the views since this code will run for all the messages in CRM.

Do you know any better way to achieve this.

-

Dave

BGarcia
Active Contributor
0 Kudos

Hi Dave,

Check if the following threads can help you:

Kind regards,

Garcia

Former Member
0 Kudos

Hi Garcia,

Thanks for the reply. I have gone through the threads and put the code in DO_PREPARE_OUTPUT method. But in this method i didnt got any message means MESSAGE_TAB was empty.

My requirement is similiar, In IC_agent role i want to supress few messages while creating Contact Person.

Do you know where i need to put this code.

I just tested it on the page layout as well, but here also lr_global_messages is initial and did not contain any Messages

-

Dave

Edited by: Dave on Jul 12, 2011 11:25 AM