cancel
Showing results for 
Search instead for 
Did you mean: 

'##' displayed in strings for each line break

Former Member
0 Kudos

Hi,

I am trying to display a string in a table which may contain any number of characters. Since ABAP restricts the display to 255 characters, I am appending lines from this string to an internal table. But I get '##' for each line break in this string. Now I tried to append a new line to this internal table whenever I get '##'. So I tried with first finding these '##' in string :

DATA: result_tab TYPE match_result_tab.
  FIND ALL OCCURRENCES OF `##`
       IN it_free_text
       RESULTS result_tab.

Here it_free_text is string but every time this search fails. Can someone guide me to make this search successful.

Regards,

Shikha

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

The line break characters are actually represented by the class attributes:

CL_ABAP_CHAR_UTILITIES=>NEWLINE for newline

CL_ABAP_CHAR_UTILITIES=>CR_LF for "Carriage Return and Line Feed" Character Pair

so yo uhave to search for these attributes instead of #s.

FIND ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE

IN it_free_text

RESULTS result_tab.

Regards,

ravi

Former Member
0 Kudos

Thanks Ravi, it worked.

Answers (0)