07-12-2007 11:06 AM
Hello There,
In my program I am using the currency conversion function module to convert the currency which is " BAPI_CURRENCY_CONV_TO_Internal".
When I pass the 100 value to the function module then it's returning the value 10000.00, But I want to display 10000 not the decimal point.
Is any function module to remove the decimal point ? or any other solution for this.
Please guide me in this issue..
07-12-2007 11:10 AM
take it in a type p variable.
data ; temp type p ."you can use decimals 0 also
temp = <originalval>.
write : / temp
regards
shiba dutta
07-12-2007 11:11 AM
data lv_value type p length 10 decimals 2 value 10000.
data lv_swap type char20.
write lv_value to lv_swap left-justified.
replace '.' with SPACE in lv_swap.
condense lv_swap.
READY
07-12-2007 11:18 AM
Do you want to show 10000 or 1000000 ?
SAP stores currency amounts with 2 decimal places, but if you output them with the CURRENCY qualifier, then it outputs correctly.
field = 12.34.
WRITE field CURRENCY 'USD' 12.34
WRITE field CURRENCY 'JPY' 1,234
07-12-2007 11:21 AM
Hi,
Simply write like this,
data: a type p decimals 2 value '12.33'.
write a decimals 0.
Reward if useful!