Skip to Content
avatar image
Former Member

Problem in currency field

Hi everybody.

In my form currency values are gettng displayed like 20,000-( if negative value is there)

i want in my form - (negative)sign should come in front of the currency like -20,000 please let me know how to make it.

i want it from 20,000- to -20,000

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 16, 2008 at 10:01 AM

    Hi,

    Leading Sign to the Left

    The leading sign is normally displayed to the right of a numeric value, except in the case of a floating point number. This option enables you to specify that the leading sign should be placed to the left of the number.

    Syntax

    &symbol(<)&

    &ITCDP-TDULPOS& -> 100.00-

    &ITCDP-TDULPOS(<)& -> -100.00

    The SET SIGN LEFT control command specifies that all subsequent symbols with a numeric value should have a left-justified leading sign. If you use this control command, you must no longer repeat the < option for each individual symbol.

    OR

    Use the function module CLOI_PUT_SIGN_IN_FRONT to bring the sign to front.

    if itab-shkzg = 'H'.

    v_amount = itab-shkzg.

    else.

    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'

    CHANGING

    VALUE = itab-shkzg.

    v_amount = itab-shkzg

    endif.

    Also check this thread.

    Trailing - sign to Leading - sign

    Regards,

    Raj.

    Add comment
    10|10000 characters needed characters exceeded