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

variable

Former Member
0 Likes
614

hai how to change sign of a variable based on some condition.

i means based on condition the positive value should become negative value pls help me

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
592

Hi,

The easiest way is multiply it with -1.

Regards,

Atish

4 REPLIES 4
Read only

Former Member
0 Likes
593

Hi,

The easiest way is multiply it with -1.

Regards,

Atish

Read only

Former Member
0 Likes
592

check condition and just multiply by -1 if condition is true for change of sign

Rewards if useful.........

Minal

Read only

gopi_narendra
Active Contributor
0 Likes
592

if <condition> = TRUE.

value = value * (-1).

endif.

Just multiply with -1 (MINUS ONE) if the condition satisfies

Regards

Gopi

Read only

Former Member
0 Likes
592

Hi,

use this FM.

 CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
       CHANGING
            VALUE = v_amount.

Thanks,

Reward If Helpful.