cancel
Showing results for 
Search instead for 
Did you mean: 

Split String value into internal table at Carriage return

Former Member
0 Kudos

Hi All,

I have given a string type context ( text edit box ) to the user to enter the values. The data can have carriage returns also.

My Requirement is that I want to split the data at carriage returns and store it in my tables.

I tired with a constant value of '%CR_LF' as available in CL_ABAP_CHAR_UTILITIES but to no good result.

Can the Experts suggest some solution?/??

Thankx in advance.

Regds,

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srini,

Have you looked at your string containing the text in the debugger to verify that you really have <CR>+<LF> (i.e. reflecting CL_ABAP_CHAR_UTILITIES=>CR_LF, which should be easily visible when looking at the hex codes of the string)? Maybe it's just a <LF> (i.e. CL_ABAP_CHAR_UTILITIES=>NEWLINE). Might be good to do a REPLACE first using a regular expression for identifying the line feeds and then doing the SPLIT.

Cheers, harald

p.s.: If you still cannot get it to work, provide some more details of what you're doing...

Former Member
0 Kudos

Thankx Herald,

That is exactly the way I did it. It worked. Could not Update the thread. Thankx again. Points awarded nevertheless.

Regds,

Srinivasan

Answers (0)