Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Currency field validation

sunil_mani
Active Participant
0 Likes
2,474

Hi Experts,

     I have to validate currency field. Example: amount type dmbtr, dmbtr has length 13 and decimals 2. So i have to check whether amount has length of 13 and decimals 2. Is there any function module to validate??

Thanks in Advance!

Hi Experts,

     I have to validate currency field. Example: amount type dmbtr, dmbtr has length 13 and decimals 2. So i have to check whether amount has length of 13 and decimals 2. Is there any function module to validate??

Thanks in Advance!

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,339

If you want to validate a currency amount, you will require the currency code which carry the actual number of decimal. Look at FMs like CURRENCY_AMOUNT_DISPLAY_TO_SAP.

Regards,

Raymond

Read only

sunil_mani
Active Participant
0 Likes
1,339

Hi Raymond,

     It has length 15 and decimals 4.

Read only

Former Member
0 Likes
1,339

Use FM CURRENCY_AMOUNT_DISPLAY_TO_SAP else you can directly fire a querry on TCURX table with your currency value as input and you will get the exact decimal values, with this you can validate