Skip to Content
avatar image
Former Member

Smartforms - truncated/lost characters; contin. fill of two cells/windows

Hi Experts,

I would write a long text into two columns. I would use a dynamic solution to define the break point between the two columns (I wouldn't use fixed lengthed rows).

The form contains only secondary windows, the text written is longer than the space available in the first column. So the end of the text may be truncated and lost.

Is there any function to get the last character of the first column (paying attention for the style, upper-case, lower-case, ...)?

Or, is there any settings to link two cells (in a template, fixed height)/two secondary windows together, to not to lost the text, but continue in the second node?

Thanks a lot,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Oct 19, 2008 at 05:20 PM


    Could please explain you problem that we can help.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2008 at 06:17 PM


    Use below FMs



    to wrap the texts in Smartforms. or below code may be help to wrap the text.


    lv_length TYPE i,

    lv_field_length TYPE i,

    lv_rest TYPE i,

    lv_times TYPE i,

    lv_start_point TYPE i,

    ls_text_line TYPE tline.

    • convert string to text table

    lv_field_length = STRLEN( iv_longtext ).

    lv_times = lv_field_length DIV 132.

    lv_rest = lv_field_length MOD 132.

    IF ( lv_rest > 0 ).

    lv_times = lv_times + 1.


    lv_start_point = 0.

    DO lv_times TIMES.

    CLEAR: ls_text_line.

    lv_length = lv_field_length - 132.

    IF lv_length <= 0.

    MOVE iv_longtext+lv_start_point(lv_field_length)

    TO ls_text_line-tdline.


    MOVE iv_longtext+lv_start_point(132) TO ls_text_line-tdline.


    APPEND ls_text_line TO rt_longtext.

    lv_field_length = lv_field_length - 132.

    lv_start_point = lv_start_point + 132.




    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2008 at 08:11 AM


    Thanks for the answers. I try to write an example:

    column 1:

    line1: This is a continous

    line2: text, get from an

    line3: itab. I would write

    line4: it into two columns

    (bottom of secondary window)


    line1: like a newspaper. At first, I

    line2: should fill the first column,

    line3: continue in the second one.

    The two columns are side by side. All the text above is stored in an itab-tline. I write the text in a text node in sec.window1:

    This is a continous (right side of sec.window1 is reached, the text is wrapped into a new line)

    text, get from an (and so on)

    When the bottom of sec.window1 is reached the remain text is truncated.

    However, I should continue the text in another column/sec.window (column2)

    The text written in column1/lines depends on the used font type, size, and the char too (check width: i or W). If the text is written in upper-case, the printed text is modified:


    line1: THIS IS A

    line2: CONTINOUS

    line3: TEXT, GET FROM


    Smartforms wraps the text dynamically at the right side of the window. I've written a code to wrap the text when a declared length is get. But it is not a perfect solution, see example above.

    So, I would need a FM which is able to calculate the wrap points before printing, or a solution to link sec.window2 to sec.window1 to continue the text printing.

    I've tried template node in a secondary window too, w/o success.

    Hope, the description is better now.



    Add comment
    10|10000 characters needed characters exceeded