‎2007 Jun 13 1:00 PM
I need to fill the dynamic internal table from string.
String contains continues data fields are separated by '#'.
So, I need to split the string at '#' into dynamic work area fields. Can any body please help me at this point.
Thanks, Pedda
‎2007 Jun 13 1:03 PM
Hi,
You can use the command SPLIT which does this.
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 '#' INTO TABLE itab.
Regards,
Sesh
.
‎2007 Jun 13 1:05 PM
Use the split statement...
SPLIT <c> AT <delimiter> INTO <c1> ... <cn>.
this should do it
‎2007 Jun 13 1:05 PM
Hello,
do like this.
data: begin of itab occurs 0,
line(15),
end of itab.
split string at '#' into table itab.Vasanth
‎2007 Jun 13 1:06 PM
‎2007 Jun 13 1:06 PM
Hi,
Use <b>SPLIT <c> AT '#' INTO TABLE <itab>.</b>
Regards,
Padmam.
‎2007 Jun 13 1:57 PM
Hi,
You can split a string into the individual lines of an internal table as follows:
SPLIT <c> AT <del> INTO TABLE <itab>.
The system adds a new line to the internal table <itab> for each part of the string.
If all target fields are long enough and no fragment has to be truncated, SY-SUBRC is set to 0.
Otherwise it is set to 4.
Ex.
Data : begin of itab occurs 0,
txt(30) type c,
end of itab.
Data : string(30) type c value 'abc#def#ghi'.
SPLIT string AT '#' INTO TABLE itab.
Regards,
Bhaskar
‎2007 Jun 27 1:10 PM
‎2010 May 28 3:52 AM
Hello,
How you fix it ?
In my program, I opened the dataset succesfully.Then I want to use split .
My code is split data as '# ' into iT.
but it does not work.'#' are keep into the internal table.
How you fix your problem ?