cancel
Showing results for 
Search instead for 
Did you mean: 

Table line item control in Smartform

Former Member
0 Kudos

Hi,

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)

Template

Template

Template

Table (For Printing Line Item Details)

(row 1

row 2

program line (Whre I am counting Number of Line items

Command (Go to next page is activated )

Template ( For Printing the footer details

Page%2

Template

Template

Template

Looking out for your valuable help .

Thanks and Regards

Rani

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can add a break point where u have written the program lines and check why the next page is not getting trigerred.

BREAK <YOUR ID> . '

and activate smartform.

also you can count the number of lines before populating template.

for a particular header data populate corresponding item level data in one internal table.

get the no of lines of that internal table.

and if you want to go next page after 5 lines add one command like if v_lines id Gerater than 5.

go to new page.

Thanks .

Mona Singh

Sandra_Rossi
Active Contributor
0 Kudos

Is the question about "go to page" command, or about headers? (Do you mean that the page 2 is printed, but not the headers?)