on 12-21-2006 10:08 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.