cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display message in next line rather then horizontal within fixed width size in Web dynpro

Former Member
0 Kudos

Hi experts,

I have developed a web dynpro application. I have also declare a message area. Its working fine. But when the message appears on the screen it comes with sliding scrolls. This sliding scrolls is not of browser but this sliding scrolls is of Message area.

I want to display mesaage vertically down  as I don't have horizontal space in device . Please see the screen shot then it will be easier to understand.

I have set WIDTH 200px . I can't increase the width as with space is limited in hardware device.

I want that message should appears on next line within the limited width ???

The property what I had set please have a look

Width I can not Increase due to limited with of device. but message should display on next line.

Please help me out . Its urgent.

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Bhagat,

I don't think we can avoid this scroll bar if we do not have sufficient width for the message.

Unfortunately, we don't have message wrapping functionality in message manager.

I suggest you 2 options

  • You can split the message into multiple lines and report them collectively as you do for other messages
  • You can go for displaying messages in Menu, please refer the below document

              

         

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thanks for ur reply. Reprt them collectively means wht I have written is it ok.

I m splitting th e message into multiple lines and reporting each time . So three times Red icon is appearing. Can we remove Red error icon for second & third lines.

This is the way I have written

   CALL METHOD l_current_controller->GET_MESSAGE_MANAGER
     RECEIVING
       MESSAGE_MANAGER = l_message_manager.
  
     CALL METHOD l_message_manager->REPORT_ERROR_MESSAGE
     EXPORTING
       MESSAGE_TEXT   = 'PleaseEnter RO No in valid format'.
  
    CALL METHOD l_message_manager->REPORT_ERROR_MESSAGE
     EXPORTING
       MESSAGE_TEXT   = 'or enter LPNo For Check In'.


    CALL METHOD l_message_manager->REPORT_ERROR_MESSAGE

     EXPORTING

       MESSAGE_TEXT   = ' or Enter rdtst for Test'.

ramakrishnappa
Active Contributor
0 Kudos

Hi Bhagat,

What ever you have done looks good. but we cannot avaoid icon display in message manager.

I would like to suggest you a work around solution to your problem. i.e. Do not report your messages in message manager but you prepare a table with messages you require and display

Please follow below steps:

  • Create a context node MSG with attribute ICON & MESSAGE both of type string as show below

    

  • Create a table ui element binding to the context node MSG.Choose IMAGE as editor for column ICON & TEXT_VIEW for MESSAGE
  • Set the table ui properties as below

         

  • Prepare the messages and bind it to the context node MSG as below

DATA lo_nd_msg TYPE REF TO if_wd_context_node.
  DATA lt_msg TYPE wd_this->elements_msg.
  DATA ls_msg LIKE LINE OF lt_msg.

* navigate from <CONTEXT> to <MSG> via lead selection
  lo_nd_msg = wd_context->get_child_node( name = wd_this->wdctx_msg ).

  "Prepare message
  REFRESH lt_msg.

  CLEAR ls_msg.
  ls_msg-icon = '~Icon/ErrorMessage'.
  ls_msg-message = 'PleaseEnter RO No in valid format'.
  APPEND ls_msg TO lt_msg.
  CLEAR ls_msg.
  ls_msg-message = 'or enter LPNo For Check In'.
  APPEND ls_msg TO lt_msg.
  CLEAR ls_msg.
  ls_msg-message = 'or Enter rdtst for Test'.
  APPEND ls_msg TO lt_msg.

  CLEAR ls_msg.
  ls_msg-icon = '~Icon/ErrorMessage'.
  ls_msg-message = 'Message2 -'.


  APPEND ls_msg TO lt_msg.

  lo_nd_msg->bind_table(
    new_items = lt_msg
    set_initial_elements = abap_true ).

  • Here is the out put

Note: Hide the table ui element if no messages available. ie. bind the visible property to a context attribute and set the attribute value as required

Hope this helps you.

Regards,

Rama