Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Currency conversion issue

Former Member
0 Likes
1,689

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

4 REPLIES 4
Read only

rajkumarnarasimman
Active Contributor
1,507

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

Read only

0 Likes
1,507

More information in the ABAP documentation: cf format settings and WRITE - predefined formats, especially Date formats.

Read only

Sandra_Rossi
Active Contributor
1,507

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)

Read only

chaouki_akir
Contributor
1,507

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)