2009 Apr 24 12:47 PM
Hi Experts,
We need to check if a value contains ' - ', if so, remove the ' - ' sign and display the value. Can anyone guide on how to achieve this?
Thanks a lot.
T
2009 Apr 24 12:50 PM
Hi Tush Mangad,
Multiply it with -1
if v_value < 0.
v_value = -1 * v_value.
endif.
Regards,
ravi
Edited by: Ravi Kanth Talagana on Apr 24, 2009 1:51 PM
2009 Apr 24 12:50 PM
Hi Tush Mangad,
Multiply it with -1
if v_value < 0.
v_value = -1 * v_value.
endif.
Regards,
ravi
Edited by: Ravi Kanth Talagana on Apr 24, 2009 1:51 PM
2009 Apr 24 12:52 PM
Just use 'NO-SIGN' when moving to the output. You don't have to check for the sign then.
2009 Apr 24 12:58 PM
Hi,
You can use ABS
EXAMPLE:
w_wrbtr = ABS( w_wrbtr ).
regards
Krishna
2009 Apr 24 1:03 PM
2009 Apr 24 1:11 PM
v_notification = '2001234-'.
if v_notification ca '0'.
REPLACE ALL OCCURRENCES OF '-' IN V_NOTIFICATION with ' '.
endif.
Thanks
Naveen.
2009 Apr 24 2:53 PM
HI naveen,
The statement
"if v_notification ca '0'. " will check if v_notification contains any 0 and does not check if the value is negative.
It should be
if v_notification ca '-'. instead.
Regards,
Ravi Kanth Talagana