Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

split string into itab

Former Member
0 Likes
722

Hello,

I am trying to split a string into an internal table with:

split content at '##' into table it_content

but as the expected 6 line I only get 1 line into the table with the complete string.

Any ideas?

regards

stefan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
689

try this

split content at CL_ABAP_CHAR_UTILITIES=>CR_LF into table it_content

6 REPLIES 6
Read only

Former Member
0 Likes
690

try this

split content at CL_ABAP_CHAR_UTILITIES=>CR_LF into table it_content

Read only

Former Member
0 Likes
689

hi stefan,

the # you see is not actual #.

instead you should do this.

split content at cl_abap_char_utilities=>CR_LF into it_content.

Read only

0 Likes
689

thanks to all,

split content at cl_abap_char_utilities=>CR_LF into it_content.

perfectly worked.

regards

stefan

Read only

Former Member
0 Likes
689

Hi

can you provide the code?

Sandeep

Read only

0 Likes
689

I think it's more likely to be

split content at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into table it_content

Read only

Former Member
0 Likes
689

Hi,

You need to write the Program like below

DAta: DEL(3) VALUE '***'.

SPLIT content AT DEL INTO TABLE <itab>.

The system adds a new line to the internal table <itab> for each part of the string.

Regards

Sudheer