FUNCTION CONVERSION_EXIT_ZSIGN_OUTPUT.
*"----------------------------------------------------------------------
*"*"本地接口:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----------------------------------------------------------------------
DATA:LV_OUTPUT TYPE CHAR30.
IF INPUT >= 0.
WRITE ABS( INPUT ) TO LV_OUTPUT.
ELSE.
WRITE ABS( INPUT ) TO LV_OUTPUT.
CONCATENATE '-' LV_OUTPUT INTO LV_OUTPUT.
ENDIF.
CONDENSE LV_OUTPUT NO-GAPS.
OUTPUT = LV_OUTPUT.
ENDFUNCTION.
使用
效果