cancel
Showing results for 
Search instead for 
Did you mean: 

Overwrite Value help error message

ashish_shah
Contributor
0 Kudos

Hi Experts,

I want to overwrite the error message given by value help of an input field.

Currently its showing the default error message when the selected value does not exist in value help as "String "56fds65fs" does not match the enumeration"

Can i overwrite this message with my custom message as

"Data not found for the given selection"?

Regards,

Ashish Shah

Accepted Solutions (0)

Answers (2)

Answers (2)

ashish_shah
Contributor
0 Kudos

This problem is not yet solved.

Former Member
0 Kudos

Hi Ashish,

Thsese messages are controlled by the webdynpro framework, so can't be customized.

regards

Sumit

ashish_shah
Contributor
0 Kudos

Hi Sumit,

Is there any work around for this?

I mean can i do the validation on my own and give my custom message with suppressing the system message?

Ashish

Former Member
0 Kudos

Hi,

before making a round trip this messages will be shown from the client side. So I think you dont have any workaround for framework messages

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ashish,

Sorry to say but no workaround.

regards

Sumit

ashish_shah
Contributor
0 Kudos

Hi Sumit, Ayyapparaj,

Can you suggest, how can i provide the user this message " provided value does not exist"?

Should i not add the values in value help using

IModifiableSimpleValueSet valueSet;

valueSet.put(key, value); ?

In that case how do we add these values ?

i want to show the correct error message that is my concern.

Regards,

Ashish Shah

ashish_shah
Contributor
0 Kudos

Hi Guys,

There is a solution to this problem.

using the following tutorial.

[A Simple Input Form with Message and Error Service Support|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf]

i generated the error message using


wdThis.wdGetAPI().getComponent().getMessageManager().
reportContextAttributeMessage(
this.wdContext.currentContextElement(),
					attributeInfo,
					IMessageWD_TutComp.MISSING_INPUT,
					new Object[] { fieldLabel },
					true);

and raised the error as


wdThis.wdGetAPI().getComponent().getMessageManager().raisePendingException();

Regards,

Ashish Shah