Skip to Content
avatar image
Former Member

How to change sign negative to positive in sap script form

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 20, 2011 at 12:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 21, 2011 at 03:34 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded