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: 

Japanese Yen multiply by 100 automatically

Former Member
0 Kudos
8,918

Hi Experts

In a customized transaction with table control in module pool. I have two columns Amount(Currency) and Currency(Currency Key)

When I put 100 and press enter it muliplies the value by 100 and shows as 10,000 JPY.

This is only done for Currency JPY and KRW.

I searching for SAP Note for this, can any one please suggest an alternative.

My System is ECC 6.0

Thanks

13 REPLIES 13

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,338

>

> I searching for SAP Note for this, can any one please suggest an alternative.

Hello,

Lolz, you were searching for an SAP Note for this )

This is because JPY & KRW donot have any decimals because of which it is getting multiplied by 100.

Cheers,

Suhas

Former Member
0 Kudos
1,338

Thanks for reply Suhas

but I already know these currencies dont have decimal places. But why factor of 100?

Thanks

0 Kudos
1,338

JPY is correctly maintained with 0 decimals in table TCURX, and I bet your input field is defined to have 2 decimals. The rest is some internal/external conversion hiccup that I cannot analyse from the distance.

Thomas

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,338

Hello,

This is because your input field data type must have 2 decimal places. Hence it is multiplying by a factor 100.

BR,

Suhas

Former Member
0 Kudos
1,338

Thanks for reply Thomas,

Field is using standard format as CURR.

Thanks

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,338

Hello,

But does the associated data element have decimals 2 ?

Suhas

Former Member
0 Kudos
1,338

Hi,

Please use reference to the currency field while diplaying the value. Hope this will solve your problem.

Regards,

Nilesh.

0 Kudos
1,338

Thanks for your reply Nilesh,

Reference to currency field already used. I guess that is only creating problems . But reference field for currency format is compulsory in module pool.

That is why only for JPY and KRW it is multiplying by 100 and not for other currencies.

Any other solutions please.

Thanks.

0 Kudos
1,338

100 Yen is being stored internally as 1.00

10,000 Yen is being stored internally as 100.00

It seems that your input value 100 is not being converted into the proper internal value 1.00 but rather into 100.00, then is "correctly" converted into 10,000 for display. There is something wrong in your setup, I just don't know what

Thomas

Former Member
0 Kudos
1,338

Hi,

Please try the below code.

SELECT SINGLE currdec

FROM tcurx

INTO lv_currdec

WHERE currkey = fv_foreign_waerk.

IF sy-subrc = 0.

lv_exponent = lv_currdec - 2.

lv_in_value = lv_in_value * ( 10 ** lv_exponent ).

ENDIF.

Regards,

Nilesh.

falk_strauer
Explorer
0 Kudos
1,338

Hi,

you can find in the sap market place following sap notes:

* 1240163 -> Betrag um den Faktor 100 zu hoch bei Währung HUF, JPY, KRW, CLP, ...

* 153707 -> Währungsumrechnung verrechnet sich um 100,1000,...

regards

falk

Binu_Jacob
Explorer
0 Kudos
1,338

Hi,

Any field associated with a currency is stored internally based on the decimal places for the type of currency. The output of the currency amount I understand is processed to display correctly (not how it is internally stored).

Please refer to SPRO->SAP Netweaver->General Settings->Curriencies->Set decimal places for currrencies.

When you read the notes that comes up when you try to execute this will made the matter clear

Regards

Jacob

Former Member
0 Kudos
1,338

You can also use FM  BAPI_CURRENCY_CONV_TO_EXTERNAL

In this FM you will have to pass the Currency Key and Amount in Internal format, to get the amount in External format.

Or you can use the write statement with the currency key to write the amount in external format

Thanks in Advance.

Regards,

Rajesh