‎2007 Nov 28 3:28 AM
hi i am getting some text like " abc defg ijkl njhuk "
in this text i have to split the words like
"abc" "defg" "ijkl " "njhuk" with space as seperator
and i have to store these in an internal table
is there possibilit pls any one can help me regarding this
‎2007 Nov 28 3:41 AM
DATA: str1 TYPE string,
str2 TYPE string,
str3 TYPE string,
itab TYPE TABLE OF string,
text TYPE string.
text = `What a drag it is getting old`.
SPLIT text AT space INTO: str1 str2 str3,
TABLE itab
reward if useful.
‎2007 Nov 28 3:30 AM
loop at itab into wa.
splite here.
move to work arae.
append itab.
endloop.
else.
declear 5 variable move 5 values to that variable.
splite text move into variable.
loop at itab into wa.
move vaiable to work arae.
append itab.
endloop.
‎2007 Nov 28 3:31 AM
loop at itab into watab.
contatenate watab+0(3) watab+3(3) watab+6(3) watab+9(3) into l_length separated by ' ' .
append l_length to itemp.
endloop.
‎2007 Nov 28 3:41 AM
DATA: str1 TYPE string,
str2 TYPE string,
str3 TYPE string,
itab TYPE TABLE OF string,
text TYPE string.
text = `What a drag it is getting old`.
SPLIT text AT space INTO: str1 str2 str3,
TABLE itab
reward if useful.
‎2007 Nov 28 3:48 AM
Try:
data: begin of itab occurs 0,
f1(10),
end of itab,
text(20) value 'abc defg ijkl njhuk'.
SPLIT text at SPACE INTO itab.
I'm not in R/3 right now so it's not tested, but it shows what I would do.
Rob