Make your own free website on Tripod.com
 

SAP ABAP Programming, Functional and Basis Components Books


Convert minus sign to the left

data prnamt(18).

Version 4.x

CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
                 CHANGING
                    VALUE         =  prnamt(18).

Version 3.x

perform convertsign changing origamtprnamt.

form convertsign using origval changing prnval.
   DATA: TEXT1(1) TYPE C.

   PRNVALUE = ORIGVAL.

   SEARCH PRNVALUE FOR '-'.
   IF SY-SUBRC = 0 AND SY-FDPOS <> 0.
       SPLIT PRNVALUE AT '-' INTO PRNVALUE TEXT1.
       CONDENSE PRNVALUE.
   ELSE.
       CONDENSE PRNVALUE.
   ENDIF.
endform.

Back to Previous

Return to SAP Hints and Tips on Configuration and ABAP/4 Programming