cancel
Showing results for 
Search instead for 
Did you mean: 

Message Pool

Former Member
0 Kudos
120

I have created some messages in the message pool.

Now how do I use them according to the requirement.

How do we use the messages in the message pool.

Thanks,

Sneha Singh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

good

go through these links,hope these would help you to solve your problem

http://tbentzen.blogspot.com/

http://searchsap.techtarget.com/searchSAP/downloads/SAPPRESS.pdf

http://help.sap.com/saphelp_nw70/helpdata/en/36/d4528e6dbf084b9d79a50fb8d08e86/content.htm

thanks

mrutyun^

Message was edited by:

Armin Reichert

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks for the help.

former_member485701
Active Participant
0 Kudos

Hi Sneha,

(a) If you want to Print the message.

wdComponentAPI.getMessageManager().reportMessage

(IMessage<Component_NAme>.<MessageKey>, null);

(b)If you want use it as value of some UIElement then

IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();

textAccessor.getText(IMessage<Component_NAme>.<MessageKey>);

Regards,

Praveen

Former Member
0 Kudos

Hi,

To create messages in Message pool,

Goto your webdynpro project-webdynpro-webdynpro components-your component-MessagePool

Righ click on it-Open Message Editor.

On Right side click on button -add New message, give key,type and text for Message.

and in coding , if you want to check whether a context attribute (say, 'val') is null,

give

IWDAttributeInfo attrInfo=this.wdContext.getNodeInfo().getAttribute(Iprivate<yourViewName>.IContextElement.VAL);

WdcomponentAPI.getMessageManager().reportContextAttributeMessage(wdContext.currentContextElement(),attrInfoErr,Imessage<yourComponentName>.<messageKeyInMessagePool>,new Object[]{},true);

Regards

SMitha

Former Member
0 Kudos

Hi,

wdComponentAPI.getTextAccessor().getText(key)

Returns a localized text for the given key.

key the key of the localized text

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Sneha

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();// this statement will not allow the pointer to go to next,until it satisfies the condition

Regards

Chaitanya.A

Former Member
0 Kudos