on 10-14-2011 10:05 AM
Dear collegues,
I have a popup re-used by 2 different webdynpro components. The messages appearing in the message area are automatically transferred to the message area of the popup, which should be avoided. Therefore I've implemented the method that clear the messages in the following way:
DATA: lr_component TYPE REF TO if_wd_component,
lr_message_manager TYPE REF TO if_wd_message_manager.
lr_component = wd_this->wd_get_api( ).
lr_message_manager = lr_component->get_message_manager( ).
lr_message_manager->clear_messages( EXPORTING including_permanent_msg = abap_true ).
I tried to call this method in wdoinit of the component controller as well as of the view of the popup webdynpro component. But unfortunately, it does not clear messages from the popup: they are still copied from the message area of the view that calls my popup.
I've also checked the parameters of the window creation in order to display the popup; the code is as follows:
lo_window = lo_window_manager->create_window(
window_name = 'W_GS_NOTIF_POPUP' "'W_POPUP'
button_kind = if_wd_window=>co_buttons_ok
close_in_any_case = abap_false
title = lv_title
close_button = abap_false
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok ).
Can you please help to solve the issue? The problem would it be rather related to the message display in the component that calls my popup?
Thanks very much, best regards
Ebru
Dear Ebru,
Try this solution before displaying your Popup view.
*--To clear the messages in message area.
DATA lo_api_controller_wind TYPE REF TO if_wd_window_controller.
DATA lo_message_area TYPE REF TO if_wd_message_area.
lo_api_controller ?= wd_this->wd_get_api( ).
lo_api_controller_wind ?= lo_api_controller->get_embedding_window_ctlr( ).
lo_message_area = lo_api_controller_wind->get_message_area( ).
CALL METHOD lo_message_area->reset_messages( ).
This will clear the messages in the message area. So while displaying the popup the message will not appear in the message area of the popup.
Regards,
Raghuram K.R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear colleagues,
Thanks for your help, I've tried all the proposals but the problem is still there. I've also checked that the error/warning messages are raised by specifying the correct view name. Neverthless, they are still shown in my popup even if clear messages (modified according to the previous reply) is called.
Best regards
Ebru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Instead of this
DATA: lr_component TYPE REF TO if_wd_component,
lr_message_manager TYPE REF TO if_wd_message_manager.
lr_component = wd_this->wd_get_api( ).
lr_message_manager = lr_component->get_message_manager( ).
lr_message_manager->clear_messages( EXPORTING including_permanent_msg = abap_true ).
Try this indipendentaly , in each view
DATA :lo_api_controller TYPE REF TO if_wd_controller,
lr_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
lr_message_manager = lo_api_controller->get_message_manager( ).
lr_message_manager->clear_messages( EXPORTING including_permanent_msg = abap_true ).
Hope it helps1
Warm regards,
Upendra Agrawal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Colleagues,
Thanks for your replies. I've checked the error reporting, the view is always provided correctly. But the warning and error messages are still displayed in the popup (even though the view name is different than the main view).
On the other hand, clear_messages method is called at the wdoinit of both component controller and view of the popup, but it does not empty the message area of the popup view.
The purpose is not the hide the message area completely in the popup view, but only to avoid displaying the messages that were already displayed in the main view that calls the popup view.
Do you have any other suggestion? Do you know why the method clear_messages does not clear the popup view's message area?
Many thanks, best regards
Ebru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try changing the 'Visibility' attribute of message area in Popup window.
Regards,
Nikhil Bose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ebru,
You provide view name while displaying message, it will restrict to that view only.
* report message
CALL METHOD lo_message_manager->REPORT_ERROR_MESSAGE
EXPORTING
MESSAGE_TEXT =
* IS_PERMANENT = ABAP_FALSE
* SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CONTROLLER
VIEW = VEIW // your veiw.
you can use clear_messages or remove mesages to clear mesages.. check this.
http://help.sap.com/saphelp_nw04s/helpdata/en/6c/7aae42cd7fb611e10000000a155106/frameset.htm
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.