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: 

Conversion problem from Char to Currency(with sign)

Former Member
0 Kudos
102

Hi all,

I need to Convert a value(currency) there in Char field,

when im trying to move into a cureny field it goes to short dump,

Like value : 45,895.00 -(negative value) which is there in char field(lenght 17)

i wanna move tht value with sign, b'cos i have to do some arthematic calculation,

Regards,

Niranjan G.

2 REPLIES 2

former_member226203
Active Contributor
0 Kudos
69

try using WRITE TO

write v_var to v_var2.

Former Member
0 Kudos
69

hi,

this should work for you

DATA:
  w_i TYPE p decimals 2 ,
  w_c(10) TYPE c VALUE '-123.12' .

CONDENSE w_c.
w_i = w_c.
WRITE:/ w_i.

that might be happening because you have not condensed it and character is left justified and your currency field is right justified so condense it and then pass it into the packed.

thanks

sarves.