Skip to Content
2
Mar 26, 2018 at 03:56 PM

Currency conversion FM/method to rule them all?

819 Views

We have a program that is using FM CONVERT_TO_FOREIGN_CURRENCY and recently ran into an issue with JPY conversion. It's a well-known problem and there are many related SCN questions (just one example).

The issue is that JPY currency is configured with "conversion factor". Current exchange rate is about 50 USD for 5000 JPY. But if FM CONVERT_TO_FOREIGN_CURRENCY (or many similar ones) is used then it returns 50 instead of 5000. The suggestions on SCN and in SAP Notes are to use BAPI_CURRENCY_CONV_TO_EXTERNAL in addition to the conversion FM to adjust the result for the factor, according to the configuration. I.e. the first FM would return 50 and then BAPI would turn it into 5000.

I've looked at some SAP correction notes and it seems that even SAP is basically doing the same: adding BAPI (or another FM) after the first FM.

My question is: is there really not a single FM or class/method that does both things? I searched using *cur*conv* mask in SE37 and SE24 but came up empty-handed. And if there is nothing like that in standard how is everyone handling this in Z code? Just call 2 FMs or a global custom method/FM?

I know this is 1001st question on the subject but it just seems odd there is still not a better standard option in 2018. Unless I'm missing something. We have ECC 6.0 EHP6 if it matters.

Thank you!