on 03-28-2011 3:11 PM
Hi
I want to delete error messages from CL_HRPA_MESSAGE_LIST class, however i could not find any method for deleting the messages, Could any one please help me out with the issue.
Thanks,
Praveen.
Hi Praveen,
To clear Messages.. use the method clear_messages( )
DATA: l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager.
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
l_message_manager->clear_messages( ). // this method have some parameters also try to use to achieve.
hope it solves...
cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Praveen,
There is no straight forward method to clear the message in the CL_HRPA_MESSAGE_LIST class.
However if you check the messages are stored in MESSAGE_LIST( Instance,private) attribute and remainng all attributes are Constants.
So When you want to clear all the message just create object for CL_HRPA_MESSAGE_LIST class.So when you create an object the instyance is re created and all the messages stored in MESSAGE_LIST attributes are lost and variable is initialized
data lo_obj type ref to CL_HRPA_MESSAGE_LIST .
Create lo_obj.
Regards,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI ,
Thanks for the reply,
I tried the approach ,However could not get succeded becuase here the standard code is referring to an interface,Please advice!
for ex :
data : MESSAGE_HANDLER TYPE REF TO IF_HRPA_MESSAGE_HANDLER.
call function 'HR_ECM_PREPARE_SINGLE_BUTYP'
exporting
cplan = cplan_entry-cplan
butyp = butyp_entry-butyp
proc_admin_tab = proc_admin_tab
proc_planned_tab = proc_planned_tab
message_handler = message_handler
importing
is_ok = local_is_ok
changing
budget_link_tab = local_budget_link_tab
budget_data_tab = budget_data_tab.
Thanks,
Praveen.
Edited by: praveen kumar on Apr 1, 2011 4:44 AM
I am also facing similar issue of unable to delete messages in message handler object . We can use clear messages if you want to delete all the messages . But the requirement is to delete only one particular message . Any ideas ..?
This is to delete a Error message being displayed for the ESS address(IT0006) screen .
Thanks,
Sankeerth
Edited by: SANKEERTH D on Sep 13, 2011 12:25 PM
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.