Application Development and Automation 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: 
Read only

Remove (-) from amount value 1000-

Former Member
0 Likes
961

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
935

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

6 REPLIES 6
Read only

Former Member
0 Likes
936

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

Read only

amit_khare
Active Contributor
0 Likes
935

Just use 'NO-SIGN' when moving to the output. You don't have to check for the sign then.

Read only

Former Member
0 Likes
935

Hi,

You can use ABS

EXAMPLE:

w_wrbtr = ABS( w_wrbtr ).

regards

Krishna

Read only

kanishakgupta1
Contributor
0 Likes
935

replace all occurences of '-' in amount with ' '.

Read only

Former Member
0 Likes
935

v_notification = '2001234-'.

if v_notification ca '0'.

REPLACE ALL OCCURRENCES OF '-' IN V_NOTIFICATION with ' '.

endif.

Thanks

Naveen.

Read only

0 Likes
935

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