‎2018 Dec 25 6:38 AM
Hi All.
I am using WRITE statement for currency conversion.
Example:WRITE tvbdpr-netwr TO gv_unit_amt CURRENCY vbdkr-waerk.
Example run time value :WRITE tvbdpr-netwr(74000.00) TO gv_unit_amt CURRENCY vbdkr-waerk(SAR).-- > 74,000.00 - This is working fine (Comma and dot)
But same code is available in another program but output is coming wrongly.
Example run time value :WRITE tvbdpr-netwr(74000.00) TO gv_unit_amt CURRENCY vbdkr-waerk(SAR).-- > 74.000,00 - This is not working fine (Dot and comma)
Kindly help me.
Regards.
JNJ
‎2018 Dec 25 7:35 AM
Hi JNJ,
"But same code is available in another program but output is coming wrongly.Are you checking those programs in two different system/userid?
Basically, the write statement currency format works based on decimal notations maintained in User profile settings(System->User Profile->User Data).

Regards
Rajkumar Narasimman
‎2018 Dec 25 9:18 PM
More information in the ABAP documentation: cf format settings and WRITE - predefined formats, especially Date formats.
‎2018 Dec 25 12:29 PM
Your question title is misleading, it's not about "currency conversion", but about "number format" (don't confuse your general goal with one of its underlying problems)
‎2018 Dec 27 8:33 AM
It can be due to the execution of the abap instruction SET COUNTRY 'x'.
Check in both of your programs if the instruction is executed or not. And if yes, with which country (in debug).
For country Saudi Arabia, the format number is dot and comma (transaction OY01)
