在SAP中负数是默认是放在数字的后面的,我们可以用下述办法来将负数前置:

      IF gv_result < 0.

      gv_result = gv_result * -1.“转正

      WRITE gv_result TO gv_cresult.”p/i转c

      CONCATENATE '-' gv_cresult INTO gv_cresult."加前导-

      CONDENSE gv_cresult NO-GAPS.“去空格

    ENDIF.

    WRITE:'The result is:',gv_cresult.