Application Development 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: 

decimal points

Former Member
0 Kudos

i have a string 123,45,0.89.

my requirement is to identiy the commas

where exactly it is and need to delete the

commas.the string i am getting from the flat file,so the

commas maybe at the third and 5th position or etc.

so i cannot predict the commas where they are.so what ever the

string is i need to delete the commas and period should be there ie

decimal should be the there.

so tell me how to handle this.

5 REPLIES 5

Former Member
0 Kudos

Dear,

Read this string and split the string and loop at that string check it with ',' if sy-subrc = 0 delete ',' and endloep.

Thanks,

jaten

0 Kudos

Jaten,

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

K.Kiran.

Former Member
0 Kudos

Hi,

You can use the REPLACE ALL OCCURANCE and CONDENSE statements to achieve this.

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

condense var1.

now var1 will not have any comma in it.

RahulKeshav
Active Contributor
0 Kudos

Hi MN,

you can read the string and

replace all occurrences of ',' in string with space.

condense string no-gaps.

thnx

Rohit

Former Member
0 Kudos

hii

you can use like follow code

loop at itab into wa_itab.

wa_value = wa_itab-currency.

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

endloop.

regards

twinkal