We have a form that includes a long text in the main window. When the length of the text is more than will fit on a single page, the system automatically starts the text on a new page. This is not a problem in itself, but when this occurs on the first item it results in a blank first page.
Is there any way to suppress the automatic page break that is created for text that does not fit on a page.
Try the following:
1) Inside the MAIN window create one LOOP where you loop at the internal table into work area.
2)Inside loop create one node for PROGRAM LINES.In that calculate the number of lines in that table and compare values of the sy-tabix with the total number of lines of the table.If sy-tabix is less then or equal to the total number of lines of the table,set a flag.
3) Inside that program lines create one COMMAND node and in that node in the GENERAL ATTRIBUTES tab give the next page as the FIRST PAGE(the current page name) and then in the CONDITION tab check if the flag is not initial.
This way a new page will get triggered only for change in line item.
Hope it serves useful to you.
Just create a command in your main window.
select the Go To new page check box and set the page no.
In condition tab give condition as sy-tabix ne 1.
or u can give condition as 1 eq 2
Hope this works for your case .
<removed by moderator>
Edited by: Thomas Zloch on Feb 28, 2012
To Clarify, this only occurs when the text is longer than will fit on a single page. If the text is short enough to fit, then it appears on the first page correctly.
Also I have another very similar form where the text displays correctly, so there must be some subtle difference that I have not been able to identify that is causing this error to occur.
I do not want to have additional page breaks between items. The ideal would be for there to be no page breaks at all between items.