Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

validate input field


i have a input fied with label AMOUNT the end user should enter only numeric values(123.67) should not allow any other values like alphabets



Former Member
Former Member replied

Hi Raju,

Create a context attribut and map that attribut type with Integer and onEnter create a method where you can put the validation.

Take the help of this code.

DecimalFormat pattern = new DecimalFormat( "#,##0;(#,##0)" );

String numberString = "(1,234)";

Number n = null;



n = pattern.parse( numberString );


catch ( ParseException e )


//( "oops:" + numberString );

// n = new Integer( 0 );



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question