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: 

FM to convert negative value to positive value

Former Member
0 Kudos

hi guys,

any FM to convert negative value to positive value

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

why do you need FM? just use pure ABAP to get the absolute value:

value = ABS( value ).

hope this helps

ec

5 REPLIES 5

JozsefSzikszai
Active Contributor
0 Kudos

why do you need FM? just use pure ABAP to get the absolute value:

value = ABS( value ).

hope this helps

ec

Former Member
0 Kudos

Hi,

No need for FM, just use the below code;

IF value LT 0.
    value = value * -1.
ENDIF.

This will convert a negative value to positive.

Regards

Karthik D

Former Member
0 Kudos

Hi,

No function module is available as far as i know.

But you can simple multiply the value with -1. it will give the desired result.

why you are specillay checking for a FM? any reason?

Former Member
0 Kudos

IF value LT 0.
    value =  0 - value .
ENDIF.

GauthamV
Active Contributor
0 Kudos

hi,

check this fm.

BKK_SET_SIGN_IN_AMOUNT.