cancel
Showing results for 
Search instead for 
Did you mean: 

next page in smartform ( variable number of coloums)

Former Member
0 Kudos

Dear All

I have a variable internal table.so my number of coloums are vaiable.how can i print these coloums in my smartform where in each page only 5 coloums should print.

how can i go to the next page after each 5 coloums.

Regrads

Bunty.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Bunty,

Adjust the main window in such a way that it prints only 5 items.

look at sample print out and then adjust it.

keep adjusting the main window till u r able to print 5 items exactly.

this will work fine if the no of line sin each item are constant and does not vary for each and every item.

Then create the main window of same size in the next page also.

This will work if the item lines are fixed.

Former Member
0 Kudos

Hi bunty,

You introduce a program line in your main window and call the following function.

DESCRIBE TABLE i_tab LINES l_line.

l_line = l_line - 1.

if l_line = 5.

PERFORM tab_calc_rem_height(saplstxbc) CHANGING l_remheight.

IF sfsy-page eq 1.

  • 744 is the minimum length for page 1

IF l_remheight < 744.

v_flag_pb = lc_chkd.

ENDIF.

ENDIF.

end if.

l_remheight is a variable which contains the page height and it may vary, so adjust your code accordingly,

now after the program line introduce a command which moves to next page on condition

v_flag_pb = lc_chkd.

This will solve your problem.

Regards,

Vasanth.

P.S: award points if it was helpful.

Former Member
0 Kudos

hi bunty,

adjust your main window accordingly which is enough for five <b>records</b>,

then u just define next screen with same main window which is there in first page,

then it solvew your problem if i think right.

regards,

seshu.