2008 Jul 15 9:22 AM
Hi ,
I have a decimal value 500.00 and need to multiply it with -1 .
the result however is 500- . I have made some manipulation to get that sign in front ...now it is -500 , but however Iam losing the decimals. Need the value to be -500.00 . Plz Help
Regards,
Sunitha
2008 Jul 15 9:30 AM
Try as :
data : v_c type p decimals 2 value '500.00'.
data : v_sign(20).
v_c = v_c * -1.
v_sign = v_c.
concatenate '-' v_sign into v_sign.
condense v_sign .
write 😕 v_sign .
2008 Jul 15 9:24 AM
Why not post what you tried that didn't work. Then we can probably point out the mistake.
Regards
matt
2008 Jul 15 9:30 AM
Try as :
data : v_c type p decimals 2 value '500.00'.
data : v_sign(20).
v_c = v_c * -1.
v_sign = v_c.
concatenate '-' v_sign into v_sign.
condense v_sign .
write 😕 v_sign .
2008 Jul 15 9:38 AM
Sunitha,
Just for your info
You can use the function module "CLOI_PUT_SIGN_IN_FRONT " to get the -ve sign to the front. ie when it is 500.00 - is displayed as -500.00
K.Kiran.