Print Number Value Without Thousand Separator

1
How can I print number value without thousand separator?

See Eg.
data mqty type p decimals 3 value '1234.45'.
write:/ mqty .

Result is : 1,234.45
And I want to print it like  1234.45

I usually using the REPLACE Command,

mqty = '1,234.45'.

 REPLACE ',' WITH '' INTO mqty.

Or

 REPLACE ',' WITH SPACE INTO mqty.

ABAP Tips by: Nurmansah

For thousand separator, you should write this program.

You can also write this program as function. You can call when it require.
ex:

 DATA : x TYPE i,
        chspec(10).

 MOVE it_comm1-fobval TO chspec.
 CONDENSE chspec.
 x = STRLEN( chspec ) .

 IF x LE 3.
    chspec = ''.
 ELSEIF x = 4.
    chspec = '_,___'.
 ELSEIF x = 5.
    chspec = '__,___'.
 ELSEIF x = 6.
    chspec = '_,__,___'.
 ELSEIF x = 7.
    chspec = '_,__,___'.
 ENDIF.

WRITE: 89(12) it_comm1-fobval RIGHT-JUSTIFIED USING EDIT MASK chspec.

it_comm1-fobval = '1234'
result
1,234

ABAP Tips by: Siva

ABAP Tips

Related ABAP Topics:
Table CDHDR and CDPOS Usage

Get help for your ABAP problems
Do you have a ABAP Question?

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Main Index
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.