cancel
Showing results for 
Search instead for 
Did you mean: 

smartform page break after 6 lines?

Former Member
0 Kudos

Hi experts,

I'm new to smartforms. I have created a smartform with a table loop in the main window.

Is it possible to create a page break after printing 6 lines in the table? How?

Thx.

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

In the Loop, put a program lines to keep the count of the rows.

After the Line type which prints the data, create a page-break node. And in the condition tab fo the node, put the condition like:

W_COUNT = 6.

Regards,

Naimesh Patel

Former Member
0 Kudos

How do I create a program line in the loop of an internal table in a smartform?

Former Member
0 Kudos

Ok, I found how to create a program line. But how do i declare w_count?

naimesh_patel
Active Contributor
0 Kudos

Delcare W_COUNT in the Global definitions.

In the program lines, Add the W_COUNT in the Input Parameters.

Code like:


W_COUNT = W_COUNT + 1.

Regards,

Naimesh Patel

Former Member
0 Kudos

Thanks, I did what you told me.

But the counting isn't working.

You said I should place the code in the loop. I don't know if I did that right.

I did a right click on the table and created a program line like you said: w_count = w_count + 1.

The code is placed automatically under the footer of the table.

Now when I put a break-point after the line of code, I can see it stops there once and w_count becomes 1, but after that I get the output, so it only counts 1 time, and never gets to 6.

What am I doing wrong?

Thx.

Former Member
0 Kudos

Hi

U don't have to put the abap code to set the counter after the footer of table, but before of it. In this way it should be triggered by every loop.

Max

Former Member
0 Kudos

I can't seem to get it to work.

Here's a link with a picture of how it looks. I can't seem to place the loop before the footer. I can place it between main and table, but then it doesn't count either.[pic|http://img72.imageshack.us/my.php?image=bouclezk8.jpg]

Edited by: christophe latinne on Oct 7, 2008 7:09 PM

Former Member
0 Kudos

I got it to work. Thx!

Answers (0)