cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect amount Format

Former Member
0 Kudos

Hi Guys,

I am working on a SAP Script created by someone else but now it's coming up with an error, actually the amount field in the output is having some problem, for example for amount one thousand four hundred twenty USD and 10/100 its returning $1.420,10 rather than returning $1,420.10 , so can you please let me know how to take care of this.

Thanks,

Rajeev

Edited by: Rajeev Gupta on Apr 7, 2008 10:56 PM

Accepted Solutions (1)

Accepted Solutions (1)

amit_khare
Active Contributor
0 Kudos

The format currency depends on the user parameters.

U can use the WRITE statament, and the system automatically will write the currency in according to the user parameters.

U can try to use the statament SET COUNTRY <COUNTRY>, set all formats (date, currency) used in a country. In this way your program should be independent from user parameters.

~As found in forum.

Regards,

Amit

Former Member
0 Kudos

Thanks for the reply amit, can you please tell me where can I make this set country and set all format.

any help will be appreciated.

Thanks,

Rajeev

amit_khare
Active Contributor
0 Kudos

thats a SAP Command -

SET COUNTRY 'US'.

Please check the help of SET.

Regards,

Amit

Former Member
0 Kudos

Hi amit,

Thanks for the reply...actually I am new to Sap script, I went to the SET command but I am not sire where exactly do I need to put this command.

Thanks,

Rajeev

Edited by: Rajeev Gupta on Apr 8, 2008 3:23 AM

Former Member
0 Kudos

Hi,

As amit said

If u write like this

/: SET COUNTRY 'US'.

All the format of US(DATE,CURRENCY etc.) will be imported to our SAPSCript.

For More Go to SE38. In Program write Set Country and press F1.

U will get all details.

Regards

Sandipan

Former Member
0 Kudos

Hi Rajeev,

Before you print the variables use the SET COUNTRY command as mentioned by Amit and others.

The write command is to be written in the print program or any new subroutine pool program.

eg:

/: SET COUNTRY 'SG'

T1 &fld1&,,&fld2&

eg2: WRITE lv_var1 to lv_var2 currency 'SG'.

Regards,

Narendra.

Former Member
0 Kudos

Hi Rajeev,

can u check with SU3 tcode

Answers (0)