Hello ,
I have some messages that appear in the message area while user logs into a particular tab in SRM portal. (Webdynpro ABAP)
I have added a custom button to delete these messages.
The messages get deleted after the button is pressed, but the screen still shows the error in the Message area on the portal screen.
When I click on some other tab and come back then error message disappears.
I want the code to refresh the current web dynpro screen while the button is executed.
Below is my code that an trying to delete the message area.
______________________________________________________
DATA l_node TYPE REF TO if_wd_context_node.
DATA l_window_controller TYPE REF TO if_wd_window_controller.
DATA l_view_controller TYPE REF TO if_wd_view_controller.
DATA: l_message_area TYPE REF TO if_wd_message_area,
l_wd_message_area TYPE REF TO if_wd_message_area,
it_message TYPE REF TO wdr_message_item,
it_msg_ids TYPE REF TO wdr_message_html_id_t.
break hkurup3.
l_view_controller = wd_this->wd_get_api( ).
l_window_controller = l_view_controller->get_embedding_window_ctlr( ).
l_message_area = l_window_controller->get_message_area( ).
CALL METHOD l_message_area->reset_messages( ).
DATA :
l_component_api TYPE REF TO if_wd_view_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
l_component_api = wd_this->wd_get_api( ).
l_message_manager = l_component_api->get_message_manager( ).
CALL METHOD l_message_manager->clear_messages
* EXPORTING
* including_permanent_msg = abap_true
* only_permanent_msg = abap_true.
______________________________________________________