‎2008 Aug 14 8:51 AM
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.
‎2008 Aug 14 8:54 AM
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
‎2008 Aug 14 8:56 AM
Jaten,
REPLACE ALL OCCURRENCES OF ',' IN test1 WITH space.
K.Kiran.
‎2008 Aug 14 8:57 AM
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.
‎2008 Aug 14 8:59 AM
Hi MN,
you can read the string and
replace all occurrences of ',' in string with space.
condense string no-gaps.
thnx
Rohit
‎2008 Aug 14 9:10 AM
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