09-30-2008 11:41 AM
In my internal table I want to replace the SPACES by a character '%20'.
I am using
REPLACE ALL OCCURENCES OF ' ' IN TABLE GT_TAB WITH '%20'.
But I am getting an exception CX_SY_REPLACE_INFINITE_LOOP.
Let me know if there is any way to replace all the SPACE in an internal table.
Thanks.
09-30-2008 11:45 AM
Loop at internal table into work area and then use REPLACE ALL for that work area.
Else try TRANSLATE keyword.
09-30-2008 11:43 AM
Hi,
Loop thru the table and do the replace on each line...
Regards
Stu
09-30-2008 11:45 AM
Loop at internal table into work area and then use REPLACE ALL for that work area.
Else try TRANSLATE keyword.
09-30-2008 12:28 PM
09-30-2008 11:52 AM
hi
loop at itab into wa.
replace all accurances of ' ' in wa-<field> with '%20'.
endloop.
09-30-2008 12:00 PM
Hi,
Use the REGEX addition of REPLACE as follows;
REPLACE ALL OCCURRENCES OF REGEX '\s' IN TABLE itab with '%20'.
But remember to remove any trailing spaces in the string and be sure that your string can hold the result as you are replacing a single space with three characters '%20'.
Regards
Karthik D