on 07-17-2009 4:44 PM
Hello Geeks,
I have one requirement where i have to create our new warning message when any event will occur.
Could anyone please provide steps to create a new warning message in CRM Web UI.
What all methods and events handler objects i need to enhance to achieve my task.
I`m using SAP CRM 6.0 .
Please reply soon.
Regards,
Shobhit
Hi Alan,
1) Create the Z message class in se91 and add the message into the class with the corresponding message number.
2) Identify the method where event is occuring and put a check on event condition.
3) When teh condition is satisfied, display error message as of type warning by the following code.
DATA : LVAR_MSGSRV TYPE REF TO CL_BSP_WD_MESSAGE_SERVICE.
LVAR_MSGSRV = CL_BSP_WD_MESSAGE_SERVICE=>GET_INSTANCE( ).
IF LVAR_MSGSRV IS BOUND.
LVAR_MSGSRV->add_message( iv_msg_type = 'W' "Warning message
iv_msg_id = 'ZABC ' " Z Message class name
iv_msg_number = '001' " Z message class message number ).
ENDIF.
Hope this helps.
Thanks & Regards
Swapna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to define message in se91. Then depending upon your scenario you can call below code to display error/ warning messgae. The place where you want to display warning/ error message depends upon your business requirement. eg if you want to call message when serive order is saved, then you need to enhance eh_onsave of overview page. and if you want to display warning messge if field is not entered then you need to call this code in do_prepare_output(). If you have your own event then you can call this code there as well.
lv_msg_service_TA TYPE REF TO cl_bsp_wd_message_service.
lv_msg_service_TA = me->view_manager->get_message_service( ).
lv_msg_service_TA->add_message( iv_msg_type = 'E'
iv_msg_id = 'ZMSG'
iv_msg_number = '100' ).
Best regards
Pankaj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
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.