‎2007 Jul 13 6:09 AM
Hi all,
Thanks in Advance.
I here i have my data in one internal table called g_t_comp. so here i need to attach a screen on which i need to add text boxes.
1) source string
2) destination string
what i need to do is from my data in the internal table. i need to replace the source string with the destination string into my internal table.
FOR EXAMPLE....
i have data in my ITAB like.
govardhan
rajesh
govarrao
rajan
rajasekhar
so
if i give source string as 1)gov
and destination as 2)hello
my ITAB shoul be filled with
helloardhan
rajesh
helloarrao
rajan
this is the situation......
please help me out......
‎2007 Jul 13 6:26 AM
loop at itab.
replace all occurrences of 'gov' in itab-fieldname with 'hello'. "put the reqd fieldname
modify itab.
endloop.
‎2007 Jul 13 6:26 AM
loop at itab.
replace all occurrences of 'gov' in itab-fieldname with 'hello'. "put the reqd fieldname
modify itab.
endloop.
‎2007 Jul 13 6:32 AM
‎2007 Jul 13 6:39 AM
HI,
see this code.
data:begin of itab occurs 0,
field(30),
end of itab.
PARAMETERS:source(10),dest(10).
itab = 'GOVARDHAN'.
append itab.
itab = 'RAJESH'.
append itab.
itab = 'GOVARRAO'.
append itab.
itab = 'RAJAN'.
append itab.
itab = 'RAJASEKHAR'.
append itab.
loop at itab.
write:/ itab.
endloop.
loop at itab.
replace source in itab-field with dest IGNORING CASE.
modify itab.
endloop.
SKIP.
loop at itab.
write:/ itab.
endloop.
rgds,
bharat.
‎2007 Jul 13 8:09 AM