‎2007 Oct 03 8:38 AM
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.
‎2007 Oct 03 8:43 AM
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.
‎2007 Oct 03 8:49 AM
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.
‎2007 Oct 03 8:50 AM
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.
‎2007 Oct 03 8:51 AM
‎2007 Oct 03 8:55 AM
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