cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate Amount or cost input field

Former Member
0 Kudos

Dear Experts ,

I have input field where user enters amount or cost .I want know how can I provide validation for the same .

If User enters <i><b>129324434</b></i> on enter <i><b>129.324.434,00</b></i> should appear .

This is already there in one sample example of web Dynpro .Its is <b>salv_wd_demo_table_f4</b> where for Airfare they have done same what my requirement is . But I am not able to trace how to provide it ?If anyone please tell me ?

If there is some Function module is there which does this job let me know it.

I am not using ALVs .And that field is not mandatory also .Its optional to fill.

Points will be awarded.

Cheers

Parry

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Tro to use any standard DE that has the currency. Like CURR7..have a look into SBOOK table for any DE.. and test your application

Ideally framework should handle them....Donot use the DOMIAN directly..try to use the DE and then test it.

Regards,

Lekha.

Edited by: Lekha on Oct 30, 2009 11:00 AM

mohammed_anzys
Contributor
0 Kudos

Hi

The normal checks will be handled as long as the data type of the context attribute is CURR.

Thanks

Anzy

Former Member
0 Kudos

Yes I have put Data type as CURR but still it is allowing me to enter Alphabets .....I have given Type as CURR its doesnt work .I tried with other currency type data element of SRM domain like BBP_TOTAL_PRICE , BBP_PRICE it does not work ....Am I wrong some where I am not able to trace .

shwetars
Advisor
Advisor
0 Kudos

Hi Parry,

what you have done is correct. Just create an event handler for the OnEnter event of the input field and leave the method blank. It works.

Its just that a server round trip needs to happen.

Regards,

Shweta

Former Member
0 Kudos

Dear all,

I have a develop a new WEB SRM screen, but I'm not managing to validate the Currency field when the user puts letters.

The field is of type CURR and when the user hits "enter" it puts all letters in CAP but doesn't sends any error message.

Anyone had this problem?

Thank you in advanced,

Vasco Pires