cancel
Showing results for 
Search instead for 
Did you mean: 

Validating inputfield with comma delimiter input.

Former Member
0 Kudos

Hi,

I have an inputfield in my wdp-application that holds data of type bigDecimal. When the user enters a number, i.e. "2,5" (with comma) it's automatically converted to 25 in the view inputfield.

When he on the other hand enters "2.5" (with point) it remains 2.5 (OK).

Question: How can I validate this field so the user won't be able to insert numbers containing comma delimeters? When I try to get hold of the value (2,5) in my appl. its already converted to 25, so I can't really check it for comma delimiters.

Regards

Olof Tronnberg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Assign a simple type of type decimal to the value attribute and bind it to the input filed.Specify the format in the representation tab so that always it will appear in a asingle format in the input field.Why do u want the value to have comma also .Is there any specific reason?Generally since it is of decimal the comma wiill not be there at runtime

Is this what u were asking or some thing else

Regards,

Sowjanya.

Former Member
0 Kudos

Hi,

Reason: If the user by accident hits ',' instead of '.' the data sent back to the update BAPI will be erroneous (2,5 --> 25) and my customer don't want to take that risk.

You say I should set the format in the representation tab. That would be External representation --> format? Do you have an example of this kind of representation, just allowing points in the decimal ('.')?

Points are promised

Former Member
0 Kudos

Hi

Use this representaion

###0.000## in the External Representaion Format and try

With Wishes

Krishna Kanth

Answers (0)