Skip to Content
author's profile photo Former Member
Former Member

How to wrap text in ALV?

Hi Guys,

I am facing one problem with displaying text in output list.The text is more than one line and I am trying to bring it to the next line.

As there are too many fields in output, I am displaying in 4 rows ( So, each record in 4 rows ). But my last field is some text and it could be any number of lines.

Any suggestions how to get this?

Thanks in advance,

Br

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2005 at 02:04 AM

    How about put the first line of text on the screen. In front of that put an integer field that lists the total number of lines. Make the integer field a hotspot. You could also make the text field a hotspot. If the user clicks on it, then display a popup window with an ALV grid or editor control to display all of the text.

    Lot of details missing here. Let us know how it goes.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Put the first line of text in a char field. Put all lines of text in an internal table that is the last component of the internal table that you are displaying in the ALV grid.

      So now we have an internal table with a field defined at the end that is another internal table. The structure that you pass on to ALV should not include any definition for the internal table component at the end. As far as I know, ALV cannot handle an internal table within an internal table so by putting it at the end and not defining it in your structure and/or fieldcatalog, ALV will ignore.

      Now you can hotspot the one char field that you are displaying to bring up a popup window that shows all of the text that was hiding in the internal table at the end of the row. You could also add an interger field as I mentioned earlier to let the user know how much text is hiding. That can also be a hotspot.

      Again, lots of details missing but maybe this will help.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2005 at 05:51 PM

    All,

    You should not use REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY for this. For lists that have multiple lines per record, you have 2 choices:

    1) Use REUSE_ALV_HIERSEQ_LIST_DISPLAY. This will output a multi-line line in ALV, albeit and ALV list. You will still need to split your long text into multiple rows in your internal table.

    2) Use CL_SALV_HIERSEQ_TABLE if you are using WebAS 6.40. Same principle as (1) but in a SAP Control context.

    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.