cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict the user to enter only numeric values in a input field

Former Member
0 Kudos

How to restrict the user to enter only numeric values in a input field.

For example,

i have an input field in that i would like to enter

only numeric values. no special characters,alphabets .

reply ASAP

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Valery Silaev/Rohit

I have tried all the posibilities before posting this

problem in the forum.

Probably u didn't understand my question.

My requirement is i didn't want to enter anything in a

input field

only numbers should be allowed.

no special characters,no alphabets shoudld not be allowed(it should not be displayed in the input field when user presses any special characters,no alphabets)

Former Member
0 Kudos

Hi Ravi,

It is not possible in SAP NetWeaver '04

In SAP NetWeaver 2004s you can set the type of input field.

See the link below

http://help.sap.com/saphelp_nw04s/helpdata/en/53/9d0e41a346ef6fe10000000a1550b0/frameset.htm

Regards

Rohit

Former Member
0 Kudos

You cannot restrict what is entered in the browser, the validation happens after submitting the data to the server.

Armin

Former Member
0 Kudos

Hi Venuthurupalli,

As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.

On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer

The attribute which you are binding to value property ;make its type as simple type which you made

Hope this helps you

Regards

Rohit

Former Member
0 Kudos

Venuthurupalli,

Bind IWDInputField "value" property to context attribute of type integer -- all validation occurs automatically.

P.S. Also it is only your 3-rd post on SDN, it is worth to read this: https://www.sdn.sap.com/irj/sdn/crphelp

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com