Application Development 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: 

Reading currency field

Former Member
0 Kudos

hi ,

i am trying to read a currency field in the report output and displaying in the form. if the amount is less than 1000 it showing no problem. if the amount is more than 1000, program going into short dump, showing msg'unable to interpret the value 1,250'. Could any one tel me how to rectify the error. how to format the currency filed, so that the program take the amount value. thnx in advance,

santosh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

It looks like you are fetching data with commas(,) as 1,250.

try to remove the comma and do the process.

replace comma with blank and condense the data. you will get proper result.

Hope this helps you.

6 REPLIES 6

Former Member
0 Kudos

Hi,

It looks like you are fetching data with commas(,) as 1,250.

try to remove the comma and do the process.

replace comma with blank and condense the data. you will get proper result.

Hope this helps you.

Former Member
0 Kudos

Hi Santosh Kumar,

can you please specify field definition you have declared in program ?

Regards,

Mohaiyuddin

Former Member
0 Kudos

Hi

declrae a variable type p decimal 2. and store ur currency value in it.

reward points if useful.

Regrdas

Rajesh

Former Member
0 Kudos

Hi,

First Replace the ',' with '' as below and populate into the form.

REPLACE ALL OCURRENCES of ',' in <currency field> with space.

CONDENCE <Currency field> no-gaps.

Regards,

Satish

Former Member
0 Kudos

hi,

when fetching currency related data..u have to be careful of the fact that even (,) acquires one place.

e.g: I want to display 1,000.00....i have to declare a variable

as

DATA: CURRENCY TYPE P LENGTH 5 DECIMALS 2.

and not as

DATA: CURRENCY TYPE P LENGTH 4 DECIMALS 2.

Former Member
0 Kudos

U can try it as suppose the field amount is I0008-amount and currency field is i0008 -waers then u can format it as

write I0008-amount to<Target> currency i0008 -waers.

If it solves ur issue do reward gd points

Thanks Rahul