‎2006 Jul 06 6:45 AM
i want to display minus data with type 'CURR' '765.12-' like '-765.12' using write clause.
how could i do?
‎2006 Jul 06 6:49 AM
Hi Gang USE this FM
CLOI_PUT_SIGN_IN_FRONT.Pass your value to this FM.
Check this code also
REPORT ZTEST.
data : a(10) type c value '765.12-'.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = a.
write : a.
Output -765.12.
Message was edited by: mukesh kumar
‎2006 Jul 06 6:48 AM
Hi,
U can use this statement::
DATA TEST TYPE I VALUE '123456-'.
WRITE TEST USING edit mask 'V__________' LEFT-JUSTIFIED.
Cheers,
Simha.
‎2006 Jul 06 6:49 AM
Hello Gang,
data w_amount(15).
if amount LT 0.
amount = amount * -1.
concatenate '-' amount into w_amount.
ENDIF.
display w_amount field.
‎2006 Jul 06 6:49 AM
Hi Gang USE this FM
CLOI_PUT_SIGN_IN_FRONT.Pass your value to this FM.
Check this code also
REPORT ZTEST.
data : a(10) type c value '765.12-'.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = a.
write : a.
Output -765.12.
Message was edited by: mukesh kumar
‎2006 Jul 06 6:51 AM
CLOI_PUT_SIGN_IN_FRONT will take any values, Character and numeric. It basically make the sign as pre-fix. Eg 53.6- to -53.6.
‎2006 Jul 06 6:57 AM
Hi Gang,
You can do that using the FM CLOI_PUT_SIGN_IN_FRONT. But before doing that, you have to convert the currency to Char format.
SO assign the currency value to some character variable and pass that variable to this FM.
But if you want to use write statement, you can simply concatenate the minus sign with the absolute value of currency and do it.
It will work.
<b>Close the thread once the problem is resolved.</b>
Regards,
SP.
‎2006 Jul 06 1:19 PM
hi,
use function module 'CLOI_PUT_SIGN_IN_FRONT'.
Regards
Naveen