Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

READ_TEXT function modue.

0 Kudos
568

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

5 REPLIES 5

DominikTylczyn
Active Contributor
386

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

raymond_giuseppi
Active Contributor
386

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?

Sandra_Rossi
Active Contributor
0 Kudos
386

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 !?

0 Kudos
386

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.

0 Kudos
386

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