Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

currency amount data problem

Former Member
0 Kudos
257

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.

2 REPLIES 2

Former Member
0 Kudos
112

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

Former Member
0 Kudos
112

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