Generally by default,negative sign will get displayed to the right side of the field value in ABAP.
To move it to the left side of the field value,the following option can be used
Use function module CLOI_PUT_SIGN_IN_FRONT
This FM will only work for character fields.(the parameter VALUE is of character type).
Example :
DATA : rate TYPE KONP-KBETR,
rate_text(15) TYPE c.
rate = 100.00.
rate = rate * -1.
rate_text = rate.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = rate_text.
WRITE : rate.
WRITE :/rate_text.
Output :
100.00-
-100.00
To move it to the left side of the field value,the following option can be used
Use function module CLOI_PUT_SIGN_IN_FRONT
This FM will only work for character fields.(the parameter VALUE is of character type).
Example :
DATA : rate TYPE KONP-KBETR,
rate_text(15) TYPE c.
rate = 100.00.
rate = rate * -1.
rate_text = rate.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = rate_text.
WRITE : rate.
WRITE :/rate_text.
Output :
100.00-
-100.00