Beruflich Dokumente
Kultur Dokumente
ABAP Blog ABAP Course Career Tips About Contact Me Students Students
Work Login
Shares
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.
http://www.beginners-sap.com/currency-format-in-write-statement/ 1/7
9/21/2017 Currency format in Write statement - Beginner's SAP
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.
The customer was from Japan and unlike, USD, EUR and INR, the
Japanese Currency Yen does not have decimal places.
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
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.
http://www.beginners-sap.com/currency-format-in-write-statement/ 2/7
9/21/2017 Currency format in Write statement - Beginner's SAP
To take care of this issue I simply changed the code to the following
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.
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.
http://www.beginners-sap.com/currency-format-in-write-statement/ 3/7
9/21/2017 Currency format in Write statement - Beginner's SAP
So Question : What are the possible values for Currency Codes that we
can use in the CURRENCY format extension ?
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.
Shares
http://www.beginners-sap.com/currency-format-in-write-statement/ 4/7
9/21/2017 Currency format in Write statement - Beginner's SAP
One Comment
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Post Comment
http://www.beginners-sap.com/currency-format-in-write-statement/ 5/7
9/21/2017 Currency format in Write statement - Beginner's SAP
Email Address*
Name
* = required field
Download
powered by MailChimp!
http://www.beginners-sap.com/currency-format-in-write-statement/ 6/7
9/21/2017 Currency format in Write statement - Beginner's SAP
http://www.beginners-sap.com/currency-format-in-write-statement/ 7/7