cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS - Trasferring the last line of the table to the next page

Former Member
0 Kudos

Hi all.

I have a smartform with table and a template after it. And if the template does not fit into the page, on which the table ends (then is transferred to the next page), i also need to transfer the last line of the table to the next page as well. The point is that template cannot be separated from the table and the page which contains the template should also contain at least one line of the table. How can it be solved?

TIA, award for helpful answers guaranteed.

Nikolai.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

One idea ...

why dont you incude the last line of the table as the first line of the template.

use program lines in which first determine the no of lines of the table.

then print the table data upto the second last line.

then use before the template another program line wherein you transfer the last line data of the table into a similar structure and then print it in the template as the first line.

A bit tedious ...but there is no other way...

Regards,

Ram

Answers (2)

Answers (2)

Former Member
0 Kudos

try this...

in the main area of the table add a program lines.

in the program lines add this code.

increment a v_index with each loop

if v_index = lines( your_table)-> that is at last line

if &SFSY-PAGE& = &SFSY-FORMPAGE& - 1

v_flag = 1.

endif.

endif.

after program lines add a conditional page break.

giving the condition v_flag = 1.

Former Member
0 Kudos

Try this

Go to your table layout and drag down the last row. I mean to say increase your last row height. So automatically the last line data flows.

Jus try this and let me know if it works.

Former Member
0 Kudos

Thanks, but I don't think it's possible to increase the row height in smartfoms, it depends only on the amount of data inserted in it's fields. Even if it was, I have a condition, the last row should be transferred to the next page not in every case.

Regards, Nikolai

Former Member
0 Kudos

oops sorry its a table not template. i got it now.

for this try to do this as mentioned by ram

try to read the last line of table and append it to first line of template.

But even here there could be problem i guess.

Just try.