cancel
Showing results for 
Search instead for 
Did you mean: 

HIding "Display message log" link in the message area

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (5)

Answers (5)

Former Member
0 Kudos

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.

saravanan_narayanan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

saravanan_narayanan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Saravanan ,

I've tried by keeping the code in DOINIT & DOMODIFY, Still its giving me the same error.

Best Regards,

Shravan.

saravanan_narayanan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Saravanan

I'm using version 6.4 .

Is there any other way to get the instance of Message Area?

Best Regards,

Shravan.

saravanan_narayanan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

former_member199125
Active Contributor
0 Kudos

Where exactly you got the Display Message Log" link?

Regards

Srinivas

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

Yes. I'm talking about the Message area UI element.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

are you talking abt the message area UI element?>