One of my SAP clients has customers from all across the globe. While most of their customers are primarily based out of North America and Europe, some of them are from Japan, China and Korea.
The client issues purchase order to their customers on a monthly basis and these have been developed using Smart Forms. (Yes I know.. old technology but still works).
Anyway, the idea is that for all these countries the same smartform is used to generate the PO. Off course this the beauty of the SAP system that you can generate invoices for all countries with just one form template, if your business processes are standardized.
However on a particular day, this particular customer rejected to make a payment citing reasons that the amount quoted on the document was incorrect. On drilling back, all the numbers matched to the dot ..why then did the customer refuse payment ?
We regenerated the customer PO and realized our mistake.
The customer was from Japan and unlike, USD, EUR and INR, the Japanese Currency Yen does not have decimal places.
So USD uses 2 decimals to denote cents as in $25.10
EUR uses 2 decimals to denote €25.10
INR uses 2 decimals to denote paise as in ₹25.10
But JPY ( Japanese Yen ) does not have decimal places. Its just ¥2510
(The currency exchange rate is not being considered in this example only the decimal notation is what is being talked about).
However in the smart form only a generic statement was used to move the amount to the output field
WRITE <KOMVD>-KWERT TO GV_KWERT_IN_DOC_CUR.
This would simply move the amount in the field <KOMVD>-KWERT to the output field GV_KWERT_IN_DOC_CUR which would be shown straight out on the form. This however would not take care of Country Currency code. So the yen amount would be printed out as 25.10 and not as 2510 for example, and thus confuse the customer.
To take care of this issue I simply changed the code to the following
WRITE <KOMVD>-KWERT CURRENCY IS_EKKO-WAERS TO GV_KWERT_IN_DOC_CUR.
Based on the country for which the PO is generated the field IS_EKKO-WAERS will carry the appropriate Currency code ( USD, EUR, JPY ) etc and the WRITE statement takes this Currency code into consideration before writing it to gv_kwert_in_doc_cur.
Here is what we find from SAP Help
When you use the CURRENCY format extension in a write statement the program looks for the given Currency type in the table TCURX column CURRKEY. In case, it finds the entry there then the system uses the number of decimal places as specified in column CURRDEC. For JPY you will find an entry here with 0 decimal places. However no entry exists here for USD, EUR, INR. Hence for these currency the system uses the default 2 decimal places.
So Question : What are the possible values for Currency Codes that we can use in the CURRENCY format extension ?
Answer : The possible options can be found in the column WAERS of database table TCURC in uppercase letters.
This simple tweak to the Write statement in the SmartForm resolved the issue and the Invoice was cleared, Payed, closed and they lived happily ever after.
Thats all for today’s short story!! Hope you liked it. Please share and like and comment if you have encountered any such situations of your own. Would love to hear your opinions and experiences.
For more info on this topic visit this link on sap help.
do you have any blogs to understand field symbols.
please let me know
Hi there,I check your new stuff named “Currency format in Write statement – Beginner’s SAP” like every week.Your humoristic style is witty, keep up the good work! And you can look our website about [url=https://0lovespells0.blogspot.com/]love spells[/url].