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

Swaping From Decimal point to Thousand separetar In Script

Former Member
0 Kudos


I am generating a Customer Statement In Script.The problem is for some customers the amount field value is displayed as 6.537,29 and others the amount field value is displayed as 6,537.29. i.e., some numbers commas and decimal points are swapped around. It should always be commas for 000 separator and dot as a decimal point. This should be made uniform.

Can anybody please help me out.




Active Contributor

Former Member
0 Kudos

Hello Raj,

Try with the formatting opitons,

Use this one.




The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.

&EKPO-MENGE& -> 1,234.560

&EKPO-MENGE(.1) -> 1,234.6

&EKPO-MENGE&(.4) -> 1,234.5600

&EKPO-MENGE&(.0) -> 1,235</b>

If useful reward.


Former Member
0 Kudos

U can resolve the same by changing your print program to write it using edit mask

if you are printing the variable lnum

just write the data using the below to lnum as

write data to lnum using edit mask 'RR___,____.__'.

Former Member
0 Kudos

In your SAP menu, Go to Sytem -> User profile -> Own Data

This will take you to your user settings.

Go to the tab "Defaults" and set the Decimal Notation field.

You can also update it in the database table USR01.

In case of SAPScripts, you can use the format



Former Member
0 Kudos


In ur program where u are fetching the data,declare varible as packdecimals with 2 or 3 decimals points upon ur requirement.And pass the value to that varible and print this varible in the form.


0 Kudos

This question is very old, but maybe it's a good place to put my experience - I had a similar problem recently: a page that started off with sums represented European-fashion (1.234,56) suddenly switched to (1,234.56). I discovered that before the program started printing it checked the country listed in the data, and called 'SET COUNTRY (country-code)'. Then, before printing the totals, the program called function SD_PRINT_TERMS_OF_PAYMENT - which ends with the command SET COUNTRY SPACE. Thus the totals at the bottom of the page appeared with a different format, until I added an extra SET COUNTRY ... after the call to the function. My printout was Smartform, but I imagine that the same would be true for any type of printing.

0 Kudos


I think you have this swapping problem for some particular country,

you can set the country wise setting in OY01 tcode. or

if it is happen for particular user id then u can set decimal point format in SU01 for that user id.

I hope this resolve your problem.