2020 Nov 02 9:09 PM
issue with read_text FM in smartfomrs.
1. when the text has multiple lines then it displays all lines together with " # "in between.
2. TRANSLATE I_text using '#' does not work
3. replace all occurrences of '#' in string1 with ' '. does not work too
2020 Nov 03 7:42 AM
Hello kyle.barz
That's the standard behavior of READ_TEXT function. It returns a long text in the ITF format.
You can use CONVERT_ITF_TO_STREAM_TEXT function to convert ITF format to a string table format.
Best regards
Dominik Tylczynski
2020 Nov 03 2:45 PM
Why do you use READ_TEXT in Smartforms, consider using a text node with type Include text and pass the key/parameter used in READ_TEXT?
Or
Are you actually using a FM such as PRINT_TEXT or PRINT_TEXT_ITF?
2020 Nov 03 8:55 PM
You say "multiple lines ... # ...", then it's probably the newline character (LF / U+000A / cl_abap_char_utilities=>newline / string template |\n|)
How come do you have a newline character in a long/standard text !?
2020 Nov 04 9:32 AM
You will have ‘#’ in a long/standard text which is cl_abap_char_utilities=>newline in some cases where you save from Web element like SAPUI5 RichTextEditor Control.
2020 Nov 04 10:04 AM
I have faced this concern the ‘#’ character and my workaround to get the text lines without ’#’ is by using SPLIT statement AT cl_abap_char_utilities=>newline.
Hope this help