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: 

how to replace dot(.) to comma(,)

0 Kudos
1,678

Hello,

my value type is QUAN13 and this values output like 12.564

i want to replace (.) to (,) same as '12,564'

i tried REPLACE , TRANSLATE etc. but i did not fix.

Any suggestions about this?

3 REPLIES 3

RAHEEL_BABAR
Active Contributor
1,392

Please also try to Create a new data element for the value type "QUAN13", or use an existing one, and assign the desired output length and a number of decimal places.

data: lv_quan13 type QUAN13.

lv_quan13 = '12.564'.

write: lv_quan13.

write: |{ lv_quan13 CO ',' }|.

Sandra_Rossi
Active Contributor
1,392

Decimal point is dot or comma depending on country, make sure to not hardcode it, you don't need to use REPLACE or TRANSLATE.

0 Kudos
1,392

A decimal separator in decimal constants in ABAP programs ist always a period. A representation of decimals in a program output depends on user settings in the transaction SU3, the field Defaults - Decimal Notation. Default formatting settings can be changed for the current internal session by statement SET COUNTRY.