cancel
Showing results for 
Search instead for 
Did you mean: 

The amount format changes based on destination country

sharonphilip
Explorer
0 Kudos

Hello experts...
While printing the pdf of a billing document, we have a statement that says:

sharonphilip_0-1710380283373.png

Now, because of the nature of the Write statement, the format of the amount changes based on the destination country.
Meaning, if let's say GB is the destination country

sharonphilip_0-1710379174743.png

The format of the amount is like this:  X,XXX.XX  (Comma first and period second)

sharonphilip_1-1710379270009.png

But if the destination country is, let's say, France
sharonphilip_3-1710379506785.png

The format of the amount is: X.XXX,XX (Period first and comma second)

sharonphilip_4-1710379580465.png

I have understood that it is like so because the of format used globally by GBsharonphilip_5-1710379774893.png

But how do I get the same format for amount in the billing document regardless of the destination country?
The correct format to be displayed is the second one X.XXX,XX (Period first and comma second)

Thanks a lot, in advance!

Regards,
Sharon

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor

As you said, the "number format" (switch of comma and dot as decimal and thousands separators) depends on the Text Environment which depends by default on the logon language but can be dynamically changed with the SET COUNTRY statement (number format by country in the table T005X).

In your case, there's probably somewhere a SET COUNTRY executed before your WRITE, so you may:

  1. use SET COUNTRY space to revert back to the default number format of the logon.
  2. You may save the original country with GET LOCALE LANGUAGE lang COUNTRY country, and restore it after your WRITE.

See the ABAP documentation for more information.

sharonphilip
Explorer
0 Kudos
Thank you, Sandra Rossi... We will be implementing your proposed solution.. Thanks a lot 🙂

Answers (1)

Answers (1)

kunal25kolhe
Explorer
0 Kudos

You can try to find FM for currency conversion as per the destination country. and it will be solved

sharonphilip
Explorer
0 Kudos

Hello...

Could you pls explain a little further?
The currency is the same for both cases...
The currency is EUR.
It is only the format that gets changed depending on the destination country while using the write statement...

 

kunal25kolhe
Explorer
0 Kudos
use a TVARVC table to store destination country list and assign relevant Decimal format which will be utilised while invoice PDF is generated to do the format conversion as required.
Sandra_Rossi
Active Contributor
0 Kudos
I also don't understand your first answer, neither your second answer.