cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate a message area

0 Kudos

Hi,

I want to create a new message area using the 'Message Area' UI element and want to popluate it using my messages. Can you please help me in doing it ?

If I add a message area UI element it gives me an error message

'Note: Multiple message areas have been implemented, but only one is supported' because it uses the default message area.

So is there a possibility to override the dfault message area ? I want the messages to be displayed in the middle of my screen and not at the top ....

Thanks and Regards,

Sandhya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

normally, you should be able to do so by putting one on your view.

Do you have multiple views on your page in which you have added an area?

That could cause your error on loading the page

grtz,

Koen

Answers (2)

Answers (2)

0 Kudos

Hello,

Thanks for your replies. But may be I should be more clear in my question.

I have put in the message area UI element called 'MESAREA' and I have a table of lt_messages type bapiret2t. Now hoow do I bind the message area with the table of messages I have ?

I tried to put in the code below inmy wd_doinit of my view

data: l_current_controller type ref to if_wd_controller,

l_message_manager type ref to if_wd_message_manager,

lt_messages type bapiret2_t.

l_current_controller ?= wd_this->wd_get_api( ).

l_message_manager = l_current_controller->get_message_manager( ).

loop at lt_messages into l_message.

CALL METHOD l_message_manager->report_t100_message

EXPORTING

msgid = l_message-ID

msgno = l_message-NUMBER

msgty = l_message-TYPE

  • p1 =

  • p2 =

  • p3 =

  • p4 =

  • msg_user_data =

  • is_permanent = ABAP_FALSE

  • scope_permanent_msg = CO_MSG_SCOPE_CONTROLLER

  • view =

  • show_as_popup =

  • controller_permanent_msg =

  • msg_index =

  • cancel_navigation =

.

endloop.

and this always puts all the messages by default in the top and not in my created message area 'MESAREA'.

Could you please help me.

Thanks and Regards,

Sandhya

Former Member
0 Kudos

Hi,

you should look into the message area you created

and set the visible messages to eg 5 instead of the default 1

if you have your messages already in wddoinit,

no problem, if you have them after an action,

put the loop code into the action handler

and try to set your message manager into your attribute list,

you can call it in your view with wd_this->m_message_manager->report...

this ofcourse if you named your attribute m_message_manager

grtz,

Koen

Former Member
0 Kudos

Hi Sandhya!

This is possible exactly the way you decribe it here. In my system it works fine. If you have not defined a message area messages appear at the top; if you have defined a meesage area UI element in your view layout, messages appear in that element.

Possible cause of your problem:

1. you have already defined a MessageArea UI Element in your view layout. Pleaase inspect the object list on the roight hand side of SE80.

2. You have set your UI element in a repeatable area like a table

3. You have an old SP Level

What's your Support Packages Level of SAP_ABA and SAP_BASIS? Always use the latest if possbile. SAP does a lot of things concerning WDA with each SP and i know that the MessageArea UI Element was changed recently.

Hope this helps.

Regards,

Volker