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

Remove comma's and dots in a feild.

Former Member
0 Likes
1,949

HI All,

I have a requirement to remove the commas and dots in particular string.

i hav explained like how i require the output.

note: simply if you look from last the first of special charecter is ',' then it should replace with '.' and all other ',' and '.' should be remove.

i hope this is clear.


1.200,50	should be 	1200.50
1,200.50	should be	1200.50
1200		should be	1200
1.200		should be	1.200
1,200		should be	1200
10,200.450.123	should be	10200450.123
10.200.450,123	should be	10200450.123

Can you please help me in this?

I will reward you with points.

regards

ragu.

5 REPLIES 5
Read only

varma_narayana
Active Contributor
0 Likes
775

Hi Raghu.

Try this code with TRANSLATE command.

<b>dATA : V_FIELD(13) VALUE '123,34.45'.

translate v_field using ',..,' .

write:/ v_field.</b>

reward if Helpful.

Read only

Former Member
0 Likes
775

Hi,

Check the below code

data: v_char(7), v_char1(6).

dATA : V_FIELD(13) VALUE '123,34.45'.

split v_field at ',' into v_char v_char1.

concatenate v_char v_char1 into v_field.

write: v_field.

Read only

Former Member
0 Likes
775

Can you check by changing the setting on your user profile on how numbers are displayed.

May be you don't have to convert if the settings are as per your requirement.

Transaction code for accessing user profile : SU01, and check the defaults tab.

Read only

Former Member
0 Likes
775

used editmask

Read only

Former Member
0 Likes
775

Hi Raghu,

Use the below mentioned statement.

DATA : v_var(13) VALUE = 123,34.45.

REPLACE ALL OCCURRENCES OF ',' IN v_var WITH ''.

Reward if helpful.

Regards,

Harini.S