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: 
Read only

Removing Commas from Numbers.

Former Member
0 Likes
12,044

Hi,

My requirement is that if a number is printed like 1,23,500 rupees then this should print as 123500.

Can any one tell me the function module for this.

Thanks & Regards,

Ramana.

Hi,

My requirement is that if a number is printed like 1,23,500 rupees then this should print as 123500.

Can any one tell me the function module for this.

Thanks & Regards,

Ramana.

6 REPLIES 6
Read only

former_member188827
Active Contributor
3,852

data znum type i value '12345678'.

data zch(25).

move znum to zch.

WRITE:

/ znum, zch.

move da number to type c variable.

plz reward points if dis helps

Read only

former_member386202
Active Contributor
0 Likes
3,852

Hi,

Declare one variable type character and pass this value to taht variable n then display it.

data : lv_var(20) type c.

lv_var = '1,23,500'

Regards,

Prashant

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
3,852

replace all occurrences of ',' with space in <variable>.

condense <variable>

Read only

Former Member
3,852

Hi

try this code..

DATA : l_amt TYPE char16.

l_amt = amount. "amount is number field

REPLACE ALL OCCURRENCES OF ',' IN l_amt WITH space.

CONDENSE l_amt.

WRITE 😕 l_amt.

Read only

Former Member
0 Likes
3,852

move it to a char variable and use

replace all occurences of ',' with ''.

This will remove all commas..

If u r workin in scripts den (since u havnt specified)

use

&EKPO-MENGE(T)&

Hope dis helps

Read only

Clemenss
Active Contributor
0 Likes
3,852

Hi Ramana,

use the addition NO GROUPING in your WRITE statement.

Anyway, I don't belive in output 1,23,500. May be 123,500.

Regards,

Clemens