ABAP Certification, Programming, Smartform, Sapscripts, BAPI 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.

Return to :-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.sap-basis-abap.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.sap-basis-abap.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.