cancel
Showing results for 
Search instead for 
Did you mean: 

how to overwrite standard errors?

former_member187658
Participant
0 Kudos

Hi

I have a validation on one of my applications, where user has to feed in only numeric data.

And if he doesn't an error is to be thrown which i have defined in the message pool.

But instaed of showing the error message of the message pool, a standard error message is shown:

Error during parse, please give value in form -2,733.34

Model binding has been done, and the context attribute is of simple type, which is defined as decimal.

Is there a way in which we can catch the standard error before it is thrown and overwrite it with our own message??

Thanks & regards,

Anupreet

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anupreet,

Use a non-validating action to capture the user input and throw the corresponding error. By default all the actions we create are validating actions i.e they will be called only if the values provided are valid. On the other hand non-validating actions will be called even if the input values are invalid. When you create an action select the check box saying 'without validation' to create a non-validating action. Inside this action, read the user input. If the user input was not valid, the integer attribute will have the default '0' value. Then, you can throw the corresponding error from your message pool using the message manager.

For more on validating & non-validating actions refer this document https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/us... validating and non-validating actions.pdf

Hope this helps,

Best Regards,

Nibu.

Message was edited by: Nibu Wilson