Please help me out for following problem which I am facing in smartforms.
Scenario u2013 I am trying to print Bank Payment voucher, In this I am passing two internal tables from my driver program, One internal table is for header details and other internal table for Line item details.
I am Looping for header details and under the templates, I am populating header data into itu2019s appropriate places, for line item details, I am using Table and able to populate line item details, Now say my line item should print only 5 line items in one page and if there are more than 5 line items , it should print next line items on next page. when new page will start it should print header details and footer details also,
In last last row, I have put the program code where I am counting the number of line items, and below that i have put 'Command' and in command condition, I have stated that if linecnt > 5 , go to next page%2 and in page 2, I have again copied the header details but , it is not working,
In short the Flow of Smartforms is given below.
Loop (For Header details)
Table (For Printing Line Item Details)
program line (Whre I am counting Number of Line items
Command (Go to next page is activated )
Template ( For Printing the footer details
Looking out for your valuable help .
Thanks and Regards