‎2010 Nov 12 7:53 PM
Hi Experts,
I am pulling the KBETR (amount/value field) from KONV into my report, am getting as 10.37 and its currency is USD6 (6 decimals) and there transferring it to OS/Unix
Now my interface notepad in OS/Unix should show 10.370000, pls. let me know do we have any FM or any standard routine?
Thank you
‎2010 Nov 12 8:01 PM
Check logic behind this function FILL_LPAD_ZEROES. It adds leading zeros.
I am sure u'll fig out how to add zero after decimal.
Thanks,
Arpit
‎2010 Nov 12 8:01 PM
Check logic behind this function FILL_LPAD_ZEROES. It adds leading zeros.
I am sure u'll fig out how to add zero after decimal.
Thanks,
Arpit
‎2010 Nov 12 8:03 PM
ThanQ.
But, am asking zeros after decimals, according to currency (TCURRX) table
‎2010 Nov 12 8:15 PM
Actually, I treid with F4 in SE37 with key word of DECIAMLS, but not find any!!
Thank you
‎2010 Nov 12 8:22 PM
But a stored value of '10.37' with a 6 decimal definition is actually a value of '0.001037'. You can see this by using WRITE with the CURRENCY addition. If you want '10.370000' then you can just use WRITE with 'DECIMALS TCURX-CURRDEC', assuming you have read the definition into that work area. Is that what you need?
‎2010 Nov 12 8:28 PM
you should check code behind this fm. I am not sure if there is any standard function module to full fill ur requirement.
My logic says that
1. transfer amount into text field
2. Split when period start
3. Concatenate zeros in second field
4 Again concatenate with decimal sign
5 transfer text field into amt having 6 decimal.
KBETR is having only 2 decimal place so u can't move back into this field type.
THnaks,
Arpit
‎2010 Nov 12 8:30 PM
Yes, i want to get it as 10.370000.
So i tried ur suggestion that adding DECIMALS addition to WRITE statemetn, but, its not working!! pls. give me a example.
ThanQ
‎2010 Nov 12 8:40 PM
‎2010 Nov 12 8:45 PM
Without the (obvious) table selection - a simple example:
TABLES: tcurx.
DATA: lv_val TYPE char10.
PARAMETERS: p_kbetr TYPE kbetr DEFAULT '10.37'.
tcurx-currdec = 6.
WRITE p_kbetr TO lv_val DECIMALS tcurx-currdec LEFT-JUSTIFIED.
WRITE lv_val.
Don't use the CURRENCY option in addition to the DECIMALS option, or the value will be converted first. Keep in mind that a 6 DEC definition on the currency for '10.37' is not the same thing as '10.370000'.
Edited by: Brad Bohn on Nov 12, 2010 2:47 PM
‎2010 Nov 12 8:47 PM
Please be patient. This is not a support site. And even if it were, ten minutes is not long to wait.
Rob