05-23-2006 12:31 PM
Hi,
I have an internal table with a field of type cosp-wtg001 (data type CURR length 15). Field works fine (it stores well the value and this sort of things) but when I store internal table into a file (with GUI_DOWNLOAD function) negative values appears with the minus operator at the end of the number. For example:
3400- instead of -3400.
But I need that the operator appears before the value (I need -3400 instead of 3400-).
How can I do this?
thanks in advance
05-23-2006 12:53 PM
I answer to myself,
you can use CLOI_PUT_SIGN_IN_FRONT to move sign to the front. But before you must transfer value from a curr type variable to a char variable
best regards
05-23-2006 1:01 PM
Hi Javier,
Use this formatting for your internal table.
data : ws_temp type p decimals 2,
data : begin of i_t_amount1 occurs 0,
- - -
qsshb like bseg-qsshb,
end of i_t_amount1.
data : begin of i_t_amount2 occurs 0,
- - -
qsshb(15) like c,
end of i_t_amount1.
loop at i_t_amount1.
move corresponding it_amount1 to it_amount2.
IF it_amount2-qsshb+15(1) = '-'.
ws_temp = it_amount2-qsshb
ws_temp = ws_temp * -1.
it_amount2-qsshb = ws_temp.
ENDIF.
append i_t_amount2.
endloop.
Download the second internal table.
Check this post if required.
http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649baf17411d2b486006094192fe3/frameset.htm
Hope that helped.
Thanks,
Susmitha
05-23-2006 1:05 PM
Hi,
Do like this ..
IF (your currency fields) CA '-'.
v_var = your currency field * ( -1 ).
ENDIF.
Cheers,
Bujji