cancel
Showing results for 
Search instead for 
Did you mean: 

Number Formar in Web Dynpro

fabio_bellocchio
Participant
0 Kudos

How can I format number using WebDynpro? I have an input field I would like to type numbers in the format 999,99. I have created a Simple Type in the Local Dictionary, but I dont know how to set this kind of format.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
fabio_bellocchio
Participant
0 Kudos

Thanks, Anilkumar.

I've seen the thread.

Actually, what I need is to block the wrong entrances in the View.

I haven't found a way to avoid user typing ABC, for example, in a numeric field.

Do you think there is any way to do that?

ThankU!

Fabio

Former Member
0 Kudos

Hi,

If you mean to stop the user from entering wrong values at the client side then it's not possible in WD. The best you can do is, let the user enter whatever he wants to and then validate it at the server.

Regards,

Satyajit.

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Try like this.

try {

//take your input field binded value attribute like this

outQty = Integer.parseInt(reqQty);

} catch (NumberFormatException e) {

// TODO Auto-generated catch block

wdComponentAPI.getMessageManager().reportException("Please enter number value. ",false);

e.printStackTrace();

}

Write this code in your click button after giving the input.

Thanks,

Lohi.