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: 

How to convert Negative

Former Member
0 Kudos

Hi

I have a field KONV-KWERT , i am doing some calculation using this field, during the calculation i need negative value also for this field, how to make that?

for example Konv-kwert contains 78.3. Now i need 78.3-. How to make this, If i concatenate minus with this value after i cannt calculate anything, so by programatically how to do this?

Any one please help.

Mohana.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

abs( KONV-KWERT ) * -1

7 REPLIES 7

Former Member
0 Kudos

Hi,

Try to multiply your value by -1.

Regards,

Nicolas.

former_member187255
Active Contributor
0 Kudos

Mohana,

Try this..

<b>KNOV-KWERT = -1 * KNOV-KWERT.</b>

Chandra.

Former Member
0 Kudos

Mohana,

Just declare another variable , say i.

then i = konv-kwert * -1.

Regards

Aneesh.

former_member589029
Active Contributor
0 Kudos

Just do the following:

KONV-KWERT = KONV-KWERT * -1.

This will invert the positive value into a negative one and vice versa.

Regards,

Michael

former_member188829
Active Contributor
0 Kudos

Also Do Like this..

Just By Subtracting 0..

<b>KONV-KWERT = 0 - KONV-KWERT.</b>

Message was edited by:

Vishnu Reddy

Former Member
0 Kudos

great <b>ABAP</b> question!!!

Former Member
0 Kudos

abs( KONV-KWERT ) * -1