cancel
Showing results for 
Search instead for 
Did you mean: 

Enforce a line break in a TEXTVIEW

daniel_humberg
Contributor
0 Kudos

I have a textview that displays some text which is stored in the database.

For the textview, i have enabled the wrapping option.

Now, I would like to enforce a wrapping after the first sentence of the text.

Can I add a special character into the text on the database, that is interpreted as a line break in the TEXTVIEW (like <BR> in HTML or \n in Java)?

Accepted Solutions (1)

Accepted Solutions (1)

raja_thangamani
Active Contributor
0 Kudos

There are two ways:

1. You can bind the text view ui element to a context attribute of type string_table. Each row in the internal table corresponds to a new line in the text view. Since the split statement is able to place the result into an internal table, this might be the way of choice.

2. As an alternate solution you can use CL_ABAP_CHAR_UTILITIES=>LF. Simply concatenate this constant into your string at the places you would like to have a line break.

Raja T

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

use the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/3b/219141c1d0ae5fe10000000a1550b0/frameset.htm">FormattedTextView</a> instead, the link to supported tags is in the documentation.

Regards, Heidi