Application Development and Automation 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 only

READ_TEXT function modue.

0 Likes
1,638

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
Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
1,456

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

Read only

RaymondGiuseppi
Active Contributor
1,456

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?

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,456

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

Read only

Former Member
0 Likes
1,456

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.

Read only

Former Member
0 Likes
1,456

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