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 difference

former_member844813
Participant
0 Kudos
635

Dear All,

i have a program that collect DMBTR, but after i execute it the currency between my program and from the original table is different. for example from a table the value is 192.656.000, but in my program its 1.965.250,00 where it should be the same as from the table.

can anyone help me with that ?

Regards,

Dema

8 REPLIES 8

FredericGirod
Active Contributor
561

Did you check about currency decimal inside and outside SAP ?

try to do a WRITE your_amount CURRENCY the_currency.

0 Kudos
561

it should be like this, with IDR currency. now what should i do to make it all in IDR ?

0 Kudos
561

SAP store the currency with 2 decimals whatever you have (table TCURC)
You have to make a link between the amount and the currency. When you use ALV Grid, SAP will do the job for you, when you have to create a file, you could use the WRITE ... CURRENCY ... TO

Don't try to convert the internal format

561

The number of currency decimals is defined in table TCURX, not TCURC.

raymond_giuseppi
Active Contributor
561

Read first online help on currency amount field (CURR) and link to currency code field (CUKY) for a correct handling of amounts - Currency Fields and Quantity Fields > DDIC - Currency Fields

Sandra_Rossi
Active Contributor
0 Kudos
561

The handling of currency amounts always look strange to ABAPers. Please check how it works in the link provided by Raymond.

In the real life, IDR currency (Indonesian Rupiah) has no digits after the decimal point, but in SAP the amounts are technically defined with decimals, but these decimals are ignored when the amounts are output, i.e. in the debugger you see the technical value of dmbtr with decimals, but if you use WRITE dmbtr CURRENCY 'IDR' you will see the amount without decimals (see Frederic answer).

former_member844813
Participant
0 Kudos
561

Thanks for the help people, the problem is now solved

0 Kudos
561

Pls close the thread, either by accepting the correct answer or providing the correct input from your side.