Skip to Content

How to show long text in TextView control in formatted form?

Hi,

I have requirement to show long text from backend text edit control to WD application. I am using READ_TEXT Fm to read the long text and passing it to text view UI element.

The text is shown in simply one long line but I want it to show in the same format as stored in backend textedit control.

If I take textedit UI control then it shows the text in formatted form.

Could you please let me know how to achieve these for TextView control? My requirement is that I have to use only TextView control.

Thanks,

Chandra

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 20, 2008 at 06:29 AM

    if your requirement is ONLY to show the formatted text, you can very well use FORMATTED_TEXT_VIEW ui element.

    -Haresh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 06:45 AM

    Hi Chandrasekhar,

    use cl_abap_char_utitilities=>newline to fill the attribute which is attached to the text view UI element.

    Also check this forum thread for more information.

    https://forums.sdn.sap.com/click.jspa?searchID=17650463&messageID=6260706

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      The Problem solved to some extend but still the exact formatting is not happening though i am using cl_abap_char_utilities=>newline.

      for eg. if the long text is as below.

      "To display the external component, you can now embed an interface view of any window of this component in a window of your current embedding a view of oneu2019s own component. By setting up navigation from one outbound plug of a view of your inbound plug of the inter external component, you enable the external component to be displayed. New line ."

      and if in backend the Last line " New line ." is on next line, on WD it is not displayed on next line.

      Thanks,

      Chandra