Skip to Content

Enforce a line break in a TEXTVIEW

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 21, 2007 at 05:14 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 07:54 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.