2006 May 17 9:34 PM
We are using function module FI_CURRENCIES_CONVERT in our report. When the conversion rate for a Currency is not maintained it throws an error and program aborts. Is there any way to bring the user back to the selection screen of the report.
We are using function module FI_CURRENCIES_CONVERT in our report. When the conversion rate for a Currency is not maintained it throws an error and program aborts. Is there any way to bring the user back to the selection screen of the report.
2006 May 17 9:42 PM
Why don't you try some other function module e.g. convert_to_local_currency, convert_to_document_currency etc for the conversion?
2006 May 17 10:04 PM
Hi Kaushal,
Even the FM 'FI_CURRENCIES_CONVERT' uses the FM 'CONVERT_TO_LOCAL_CURRENCY' as it's underlying calcualtion. I see that FM 'FI_CURRENCIES_CONVERT' does raise any exceptions.
My suggestion to you would be to create a new FM with 'Z_FI_CURRENCIES_CONVERT' by adding your own exceptions.
OR
call the FM 'FI_CURRENCIES_CONVERT' with <b>TRY....END TRY</b> block.
Hope this helps you.
Regards,
vicky
PS: Award points if helpful.
2006 May 17 10:14 PM
2006 May 17 10:24 PM
Kaushal,
Hope u r catching exception after calling function module.
Cheers,
Nilesh
2006 May 17 10:51 PM
I had the same problem once before. I checked to make sure the exchange rate was defined before calling the function module to convert.
If the TO and FROM currencies are different, check table TCURR. Do a SELECT against table TCURR with the TO/FROM currencies, date, and rate type (usually 'M'). If a record exists, call the function module to convert. If not, give a nice error message and return to the selection screen.
2006 May 18 12:52 AM
Hi Kausal,
You have more information with example on TRY - ENDTRY in this link.
http://help.sap.com/saphelp_nw04/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm
Even Norman Salter proposed a nice idea to deal in your situation. You can follow any one to finish the task.
Let me know if you need any help.
Regards,
Vicky
PS: Award points if helpful
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |