cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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,

Tamá

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

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)

column2:

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:

column1

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.

Thanks,

Tamas

Former Member
0 Kudos

Hi,

Use below FMs

RKD_WORD_WRAP

FORMAT_TEXTLINES

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

DATA:

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.

ENDIF.

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.

ELSE.

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

ENDIF.

APPEND ls_text_line TO rt_longtext.

lv_field_length = lv_field_length - 132.

lv_start_point = lv_start_point + 132.

ENDDO.

Thanks,

Sree.

nivin_varkey
Active Participant
0 Kudos

hi,

Could please explain you problem better..so that we can help.