2007 May 03 2:05 PM
Hi All,
In FB03 to create a document if the amount is given with 5 decimal places this data stores in PAYR table wrongly coz the field PAYR-RWBTR is of curr 13 and 2 decimal places.
In my program when i fetch data from PAYR as this data is wrong we are getting wrong output. Is there any conversion routine avaliable to convert this to correct 2 decimal places?
Example:
Amount entered in FB03 is 1000.120000 - US5 currency
but in table it is showing - 1000120.00
thanks,
Anil.
2007 May 03 2:07 PM
Hi Anil,
Use the WRITE TO using the CURRY key option of the WRITE statement. It will automatically adjust the values according to the currency key of the table.
Hoep this helps.
Cheers
VJ
2007 May 03 2:31 PM
Hi,
Try this below code
DATA: val TYPE string .
val = amount.
REPLACE ',' WITH space INTO val.
REPLACE '$' WITH space INTO val.
CONDENSE val.
WRITE val DECIMALS 2 TO amount.
Regards