on 10-25-2008 10:14 AM
Hi All.
I have one input field of data type decimal.The user should enter the numeric value inside this filed.If he will enter "abcd" then messgae should display Enter numeric value.
How i will do numeric vale validation for context of data type Decimal?
If i am entering numeric value i am getting out put where as if i am entering abcd then i am getting null pointer exception.
Thanks
Susmita
Hi Susmita,
Check out these two link numeric field validation
http://help.sap.com/erp2005_ehp_03/helpdata/EN/89/a43a48461e11d182b50000e829fbfe/frameset.htm
https://www.sdn.sap.com/irj/sdn/profile?editmode=true&userid=3857326
Thanks
Anup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This issue is solved.I have created a string value attribut and convert it to BigDecimal format before calling the BAPI.
Thanks
Susmita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Susmita,
Numeric is a subset of decimal. If you enter, 666, it will be considered as 666.00 if it is a decimal data type.
If you want to display error on "abcd" format, then
1. Go to dictionaries
2. Move to Simple Type
3. Create a simple type
4. Set its type as decimal
5. Bind that type to the context attribute
This will automatically give an error, if you enter a wrong format in the decimal field
Thanks,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Susmitha,
You doesnt need to write nay seperate code for doing the validation for decimals or alphabets. If you bound the UI element with the Context Attribute of type Decimal the Webdynpro Generic Validation service will automatically validates the user input is Intergers or not. If the user enters the alphabets this service will cancel the navigation and throws an error message to the User
Thanks and Regards,
Raju Bonagiri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case the data type of the bound context attribute is numeric the WebDynpro Generic Validation Service should check the entered data automatically. In case you can´t use it just try to parse the value into the correct data type and catch the exception. If the exception occurs display a message to the user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.