cancel
Showing results for 
Search instead for 
Did you mean: 

How to change sign negative to positive in sap script form

Former Member
0 Kudos

Hi Guru,

I had wriiten a below piece of code in my sap script form.Now I need all the negative sign to be convert to positive number means

if KOMVD-KWERT = 123,98.00- , then require 123,98.00 ..

And for this I know the synatax is

&KOMVD-KWERT(S)& .Bur the probleam is how to manage this (I13) ...Because if i am wriiting

&KOMVD-KWERT(S)(I13)& getting no value ...Please help..

IF &TNAPR-KSCHL& = 'ZD06'.

&KOMVD-KWERT(I13)&

endif.

Thanks

susri

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi SUSRIKANT,

You can try this logic .

DATA : LV_KWERT TYPE STRING,

LV_LEN TYPE I,

LV_F_KWERT TYPE STRING.

LV_KWERT = KOMVD-KWERT.

LV_LEN = STRLEN( LV_KWERT ).

LV_LEN = LV_LEN - 1.

IF LV_KWERT +LV_LEN(1) = '-'.

LV_F_KWERT = LV_KWERT + 0 (LV_LEN).

ELSE.

LV_F_KWERT = LV_KWERT.

ENDIF.

I hope this logic will be helpful for your issue.

Thanks & Regards,

Kumaran Duraiswamy.

Former Member
0 Kudos

I am not sure, but try.

&KOMVD-KWERT(SI13)&

I think, we can concatenate formatting options with in the brackets together. Let me know if it works

Former Member
0 Kudos

Hi,

Its working .Thanks