cancel
Showing results for 
Search instead for 
Did you mean: 

How to display SAP standard exception messages at the top of the view

former_member225041
Participant
0 Kudos

Hi ,

I want to display SAP standard exception messages at the top of the view.

Can anybody help me out for this issue.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you have an UI element called message area. you can place this where ever you want and display your messages

or

declare an value attribute and place it at d top of view and populate the message to this value attribute

Message was edited by:

Kanwalpreet

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vinay,

Open your view in your NWDS. In Outline View, Right click and select insert child and insert a UI element called Message Area. B y default it would be placed at the last position in the list but you can change it position by dragging it to the place where you want to see it in your view in the outline window itself.

Now all the messages that you will display would be in this message area and thus at the top if you place it at the top of your view.

Regards,

Murtuza

Former Member
0 Kudos

Hi Vinay

1)Goto "WebDynpro Components">"Your Component">Message Pool

2)Add Message

a) Message Key -- >this is the name of the message

b) Message Type ->error/standard/warning/text -->choose the appropriate one

c)Message Text--> this is the message tobe displayed when error occurs

3) Create a UIElement "Message Area" (Click on error message to navigate to error)

following is the code to display the error message


IWDMessageManager manager = null;
IWDAttributeInfo attibute = wdContext.getNodeInfo().getAttribute(IPrivateXXXView.IContextElement.xx);
String message = wdComponentAPI.getTextAccessor().getText(IMessageXX.UR_MESSAGEKEY);
manager.raiseInvalidContextAttributeException(wdContext.currentContextElement(), attibute, message, true);
manager.raisePendingException();

Regards

Chaitanya.A