cancel
Showing results for 
Search instead for 
Did you mean: 

new page in sap script

Former Member
0 Kudos

hi all,

my requirement is i want to display internal table items in new page when forst page is filled.

ihve given the code like

loop at it_table.

write form

given the text element inthe write form.

endloop.

how to trigger new-page when the first page is filled. in this code.ihve created new page and in script and first pages next page is new page.how to call this page.data is displayed in new page with out any format.

regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For the first page, give the next page as new page. Once the first page gets filled ,it will automatically go to next page ( new page). So, if your page format is same for both pages, then u need not create new page, instead you can hide the variable windows and for first page,give next page as first only.

If you have different formats,then copy the same contents of main window in new page also.

Former Member
0 Kudos

ihve created page2 with main window as that of page1.but when im trying to change main window page2 ,page1 main window is also changes.page1 main window is different from page2 main window.how to get this.data in page2 is displayed in plain format.how to deal..

regards

Former Member
0 Kudos

It should not happen... size of main window of one page can be different from other pages. but in smartforms we cant change the width of main window on different pages.

Answers (2)

Answers (2)

GSerfiotis
Participant
0 Kudos

Hello everyone.

I have a similar requirement. When printing a sales order, I need to always print a bitmap in the 2nd page. This means that:

If the order's line items can fit in the first page's main window, I want to have a two pages output, one page with line items and one page with the bitmap.

If the order's line items cannot fit in the first page's main window, I want to have three (or more) pages output, first page with line items, second page with the bitmap and the remaining pages with line items.

I have defined three pages: "first", "second" and "next".

"First" page has "second" page as next.

"Second" page has "next" page as next.

"Next" page has "next" page as next.

The problem is that when all line items fit in the main window of the "first" page, the "second" page is not triggered. How can I figure out that there will be only one page printed in order to trigger a new one explicitly as soon as the loop in the line-items' internal table finishes?

Can it be done with an 'IF &SAPSCRIPT-FORMPAGES& = 1' statement? If yes, where should I put it? I have tried it and it doesn't work.

Thank you in advance.

Edited by: George Serfiotis on Oct 30, 2009 10:52 AM

Former Member
0 Kudos

hi all

how to define next page2.page1 main window im dispalying basic data with a tex element TE1.and im loop the internal tabel and displaing them with another text element TE2. inthe second page i want to display only text elements of TE2 with its header in box.and then items.how to do it.im able to display the items .but i want header also.pls suggest.

regards,

Former Member
0 Kudos

solved

Former Member
0 Kudos

create one more page in the script and in the first page's properties, put this new page as next page. and in the new page's properties, put this new page again as next page. and on this new page, create main window and put the same logic which you have written in the main window of the first page.

I think you have not created main window and the logic of that on the next page. try this once. then it will automatically trigger the next page.

Hope it will help you

Edited by: Sujeet Karn on Oct 29, 2009 3:54 PM