‎2007 Apr 18 10:29 AM
Hi everybody,
Do you know any fuction module which convert a curency type, for example WERTV8 into a string type?
I have this code:
data: l_moneda_in TYPE WERTV8, l_moneda_out TYPE WERTV8.
data: l_in(18) TYPE c, l_out(18) type c.
l_in = '1000.50'.
l_moneda_in = l_in.
CALL FUNCTION 'WLF_CURRENCY_DECIMAL_JUSTIFY'
EXPORTING
i_curr_new = 'INR'
i_curr_old = 'INR'
i_amount_old = l_moneda_in
IMPORTING
E_AMOUNT_NEW = l_moneda_out
.
write: l_moneda_out.
l_out = l_moneda_out.
write: l_out.
I need the correct value '1.000,50' in the l_out variable but although l_moneda_out write the correct value when I try to write l_out is incorrect.
Thanks in advance.
‎2007 Apr 18 10:34 AM
Hi Lorena,
Could you please try like
write l_moneda_out to l_out currency 'INR'.
Regards
Caglar
‎2007 Apr 18 10:34 AM
Hi Lorena,
Could you please try like
write l_moneda_out to l_out currency 'INR'.
Regards
Caglar
‎2007 Apr 18 10:35 AM
Hi,
Please try the following code:
data: l_moneda_in TYPE WERTV8, l_moneda_out TYPE WERTV8.
data: l_in(18) TYPE c, l_out(18) type c.
l_in = '1000.50'.
l_moneda_in = l_in.
CALL FUNCTION 'WLF_CURRENCY_DECIMAL_JUSTIFY'
EXPORTING
i_curr_new = 'INR'
i_curr_old = 'INR'
i_amount_old = l_moneda_in
IMPORTING
E_AMOUNT_NEW = l_moneda_out
.
write: l_moneda_out.
<b>move l_moneda_out to l_out.</b>
write: l_out <b>currency 'INR'</b>.
Best regards,
Prashant
‎2007 Apr 18 10:36 AM
change ur code like this
REPORT YCHATEST.
DATA: L_MONEDA_IN TYPE WERTV8, L_MONEDA_OUT TYPE WERTV8.
DATA: L_IN(18) TYPE C, L_OUT(18).
L_IN = '1000.50'.
L_MONEDA_IN = L_IN.
CALL FUNCTION 'WLF_CURRENCY_DECIMAL_JUSTIFY'
EXPORTING
I_CURR_NEW = 'INR'
I_CURR_OLD = 'INR'
I_AMOUNT_OLD = L_MONEDA_IN
IMPORTING
E_AMOUNT_NEW = L_MONEDA_OUT.
WRITE: L_MONEDA_OUT TO L_OUT.
WRITE: L_OUT.