Skip to Content
Former Member
Sep 26, 2006 at 03:52 AM

Formatting text in an internal table with carriage returns and word wrap



I have an internal table of characters that contains text with the "##" carriage return and the text is not word wrapped. Each line of this input table can contain multiple carriage returns or none at all. I am trying to reformat this text into another internal table with word wrapping and put the lines that end with a carriage return on it's on line in the output internal table.

I know how to use the split command and put the lines with carriage returns onto separate lines in an internal table. But each line is not word wrapped.

After searching this forum, I have found function modules that will word wrap (ex: RKD_WORD_WRAP, SOTR_SERV_STRING_TO_TABLE). But, these do not take into account the carriage returns.

Does anyone have any suggestions?