Wednesday, February 16, 2011

Abap put Negative sign on the Front

In SAP Abap, by default the Negative Sign will be put on the last, for example -600 will be shown as 600-, quite weird to be display to the customer. instead if you are required to view the data into another platform such as send email as Ms Excel, PDF and viewed by non abap people, sure you will be trouble.



Tradisionally you could use your logic to extract the sign by implement the Concatenate function. Since the SAP is provided us a variety of call function, just call this functionlfunction: CLOI_PUT_SIGN_IN_FRONT.
data: temp(30) type c.
call function  ’
CLOI_PUT_SIGN_IN_FRONT 
changing
value =  temp.



just make sure you firstly convert your currency / number type into String type. Done !.

0 comments:

Post a Comment