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: 

covert to number:runtime error

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

former_member187452
Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi,

Could you try the addition currency with write statement to display the value.

Regards,

Vijayalakshmi

asik_shameem
Active Contributor
0 Kudos

Hi

Do in this way.

TRANSLATE v_cost USING ',.'. 
i_cost-insu = v_cost