‎2007 Aug 13 10:01 PM
I have a write statement in a program .
WRITE W_OVERALL_CUR TO T_0300-OVERALL CURRENCY T_0300-PWHIE.
currency key has 0 decimal places,
w_overall_cur is 100.00
t_0300-overall is initially 100 and changing to 10,000 . Its like the original value is being multiplied by 100.
how do i correct this error?
‎2007 Aug 13 10:06 PM
‎2007 Aug 13 10:08 PM
Sri
Instead of write use PACK stmt. or if you still want to use WRITE stmt go and check the decimal notation in your User Profile. Set it according to your requirement.
Regards,
Vinod.
‎2007 Aug 13 10:20 PM
how do i use pack statement? w-overall_cur is not of of type C.
‎2007 Aug 13 10:57 PM
‎2007 Aug 13 11:43 PM
Hi,
Try this way
DATA v_curr TYPE p LENGTH 13 DECIMALS 0 VALUE '10,000'.
WRITE v_curr NO-GROUPING DECIMALS 0.
aRs
‎2007 Aug 14 4:05 AM
Dear Sri,
This is not an error.. This is the correct behaviour..
Check what is the currency being populated at run time in T_0300-PWHIE.. Based on this currency the decimals in the field holding the Amount gets adjusted.. In the database all currencies are stored with 2 decimal places that is why during output you use the extension currency to adjust the decimal places based on the currency of the amount you want to display..
Cheers
Nitesh
‎2007 Aug 14 6:04 AM
Hi Sri ,
This statement will write the contents in the fields based on T_0300-PWHIE.
Whatever format this particular currency has the value will be made in that format,make sure that you really want to write content based on the currency ..
I think you are writing this value in the JPY ) japanese currency ) then as per your line its correct because JPY there are no decimals .
Praveen.
HOPE THIS HELPS .