‎2008 May 02 12:27 PM
Hi friends,
i am getting runtime erro CONVERT TO NUMBER error as: Unable to interpret "5,794.58 " as a number
orginal value 5,794.58 in v_cost char field..
now i want tomove it to currency field i_cost-insu.
error occuring while moving i_cost-insu = v_cost.
i know that i can do as follow to solve this , but i want to display to user as 5,794.58.
replace all occurrences of ',' in v_cost with space .
condense v_cost.
i_cost-insu = v_cost.
but i want to displlay user as 5,794.58 how can i solve this
please help me
thanks
Ramesh
‎2008 May 02 12:34 PM
hi ,
in currency field you cannot assign number with ','.
it will give error.
if you want to display it as 5,794.58 .
than display with charecter field,
y u want to display currency field? display values in char field
‎2008 May 02 12:39 PM
Hi,
You will have to use statement REPLACE.
REPLACE ALL OCCURANCES OF ',' IN v_cost WITH ' '.
CONDENSE v_cost NO GAPS.
use these statements, this will solve your problem.
Regards,
Bharat.
‎2008 May 02 12:40 PM
Hi,
Could you try the addition currency with write statement to display the value.
Regards,
Vijayalakshmi
‎2008 May 02 12:49 PM
Hi
Do in this way.
TRANSLATE v_cost USING ',.'.
i_cost-insu = v_cost