Home > ABAP > Multiple lines text element

Multiple lines text element

January 27th, 2009

Did you ever need a multiple lines input for your user interface in dialog programming using screen painter? Well, I did. And I spent the whole day searching for a way to implement what I wanted.

Guess what! A few minutes ago I thought why didn’t I use an internal table with one element and put it in my screen? Why didn’t I think of that? Bummer! I had to waste a whole day searching for a “multiple lines text element” :P .

Here’s the code you will need to get what you want:

  1. First, you will need to declare an internal table containing 1 field only. For example:
    data: BEGIN OF T_LINES OCCURS 0,
    lines(100),
    END OF T_LINES.
  2. Second, just make a table control in your screen with the same name: T_LINES. You can always use TABLE CONTROL WIZARD to get it done. And voila! You have your multiple lines text input ;)

It is easy to access too, you can get the content by getting values of T_LINES.

Here’s how the table control will look like:

Enjoy!

vera ABAP , ,

  1. No comments yet.
  1. No trackbacks yet.