on 07-27-2011 11:50 AM
Hi Gurus,
I've a requirement where i need to hide the default " Display Message Log" Link in the message area.
Pls give me some idea on this.
Regards,
Shravan.
Hi Shravan,
You can delete message log using method RESET_MESSAGES
Please check this..
http://help.sap.com/saphelp_nw70/helpdata/en/45/5996d07d2b09cce10000000a114a6b/content.htm
use reset mesages method in the example code.
data: l_wd_view_controller type ref to if_wd_view_controller,
l_api_wdr_msg_area type ref to if_wd_window_controller,
l_wd_message_area type ref to if_wd_message_area.
l_wd_view_controller ?= wd_this->wd_get_api( ).
l_api_wdr_msg_area ?= l_wd_view_controller->get_embedding_window_ctlr( ).
l_wd_message_area = l_api_wdr_msg_area->get_message_area( ).
l_wd_message_area->reset_messages( i_keep_current = 'X ' ). // try with 'X'. and ' ' .
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 Kris,
Thanks for your reply.
If i use this method RESET_MESSAGES, i can only clear the messages.
But i cannot hide "Display Message Log" Link.
My requirement is to hide that link even though the messages are present in the message area.
Regards,
Shravan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shravan,
For this you need to programmatically change the settings of message area. Code snipper for the same
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_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( ).
l_message_area->set_display_attributes(
i_show_only_current = 'X'
* i_msg_lines_visible =
* i_use_toggle_area =
i_for_all_instances = 'X'
* i_display_empty_lines =
).
BR, Saravanan
Hello Saara..,
Could you please some more pointers.
Where exactly i have to place above code.
I kept the above code in View - DoBeforeAction method of View
and Message Area UI element is in the same view.
I'm Getting DUMP "Access via Null Objects in the below line.
l_message_area->set_display_attributes(
Can u plz help me on this.
Regards,
Shravan.
Hello Shravan,
This is to set the message area property for the window. you can write this code in any method. Since you are not getting the instance of the message area, i would suggest to move the code to INIT/MODIFY method and check it. In the meantime let me check whether there are some version limitation with respect to window controller.
BR, Saravanan
Hello Shravan,
In SAP ECC 6.0, I'm using the same code and its working as expected. its really strange to hear that you are not able to get the message area from window controller. As far as I know, this is the only way to disable the history log.
could you let me know the version of your system.
BR, Saravanan
Hello Shravan,
Did you write this code in a popup view? if so then move this code the main view.
If yours is not a popup then do that following
1. set a external breakpoint in CL_WDR_INTERFACE_VIEW->IF_WD_WINDOW_CONTROLLER~GET_MESSAGE_AREA method and check in the debugging mode check which condition is failing
BR, Saravanan
Hello Saravanan
Actually i'm using FPM in my application. In the global settings, i've checked the check box for "Show Message Log". So its giving dump.
Now i Un-checked that check box. "Display Message log" link got hidden.
I'm Done.
Thanks a lot for your response Saravanan.
Best Regards,
Shravan.
Hi ssm,
Thanks for your reply.
Basically i want to hide the link "Display Message Log" which comes by default for the message area.
If i bind an attribute for the message area, the whole message area will be visible or hidden.
i want to hide only the LINK. So i think it doesnt help me.
Regards,
Shravan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does using the VISIBLE property of Messgage Area UI element will help you?
You can bind an attribute to the visible property of UI element, so that it will be used as per required
Edited by: ssm on Jul 27, 2011 4:32 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. I'm talking about the Message area UI element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
are you talking abt the message area UI element?>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.