cancel
Showing results for 
Search instead for 
Did you mean: 

Page break in smartform

Former Member
0 Kudos

Hi All,

I have a smartform in which all the line items from the internal table are printed on a first and second page.

Now the requirement is to print each line item on a separate page.

How can achieve page break for each line item?

Any answer would be appreciable

thanks in advance

sandeep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Go through this link in smart forms...

it may helps u...

http://help.sap.com/saphelp_47x200/helpdata/en/70/e17a37dec511d3b575006094192fe3/frameset.htm

<b>In this Using smart forms --> Flow control --> Page sequence and numbering --> Dynamic page break.</b>

reward if it helps u...

sai ramesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I guess you are using the page break after printing the line item . So after printing the last item of an internal it is again giving a page break and after coming out of loop. SO keep a condition on the page break. Find the no of entries in the internal table and say in the condition tab c_count < no of entries. create a programing lines in the internal table for c_count = count + 1.

Br,

Laxmi

Former Member
0 Kudos

Hi,

In the internal table in the main area after the text element , create one command node and set new page in that.

Procedure is as follows:

through tables-- loop at itab into wa_itab -- .

In text element : &wa_itab-matnr&.

Right click>create>command>General attributes tab>click on the new page option..

Command node : new-page.

endloop.

Br,

Laxmi

Command node:

Right click

former_member181962
Active Contributor
0 Kudos

Create a COMMAND element inside the LOOP element.

This command element should be checked with the check box for new page triggered.

loop

- text element

- COMMAND

create a new page with the same text element that is inside the loop element.

also read this link:

http://help.sap.com/saphelp_nw04s/helpdata/en/d1/8031a9454211d189710000e8322d00/content.htm

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi

I got the page break but there is an extra page which is printing everytime at the end.

Why is it printing an extra page?

Thanks

Sandeep

former_member181962
Active Contributor
0 Kudos

Hi Sandeep,

Suryadevara has put it correctly.

Trigger the next page using the command only till the last but one item, by keeping a condition in the command node.(current_line <> total_lines).

the current_line and total_lines should be calculated before.

Have another command node (outside the loop). which will be called for the last time. This command should however trigger another page say page3 which is same as the page2 except for the next page in the page3 should be left blank.

page1

-main window

--loop

---text element

---command(With condition, trigger page2)

--command(triggers page3)

page2(Next page = Page1)

-window

--text element

page3 (No next page)

-window

--text element

Regards,

Ravi