cancel
Showing results for 
Search instead for 
Did you mean: 

triggering new page in script

Former Member
0 Kudos

Hi experts,

I have a script with two pages, it have driver program too.

Now my requirement is that, i need to add a third page to them.

For that i have created page3, and made it as next page for page2.

For page3 i dont have any text elements.

But here the problem is when i run the prgm only 2 pages are coming, the 3rd one not coming.

Plz some one help me in this regard.

Please suggest me what i need to do ay layout and in driver program to add a new page.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Normally when the content of the main window overflows SAPscript automatically triggers a page break so if your data is more the 3rd page should be printed.

But if you want your 3rd page to be printed irrespective of the data you can use the FM CONTROL_FORM and use command new -page.

Try this out and let me know if it solves your issue. I had done this long back so I dont have the exact code.

Answers (2)

Answers (2)

Former Member
0 Kudos

hi guys, thanks a lot....

my problem was solved.

Former Member
0 Kudos

hi,

thanks for the reply.

i have tried with CONTROL-FORM, but failed to get the 3rd page. when i use that its giing some error like control-form invalid start-form missing.

so, if possible, can u plz give me some sample code, or guide me where exactly i should use that control-form.

thanks in advance.

Former Member
0 Kudos

Hi Mytri,

First in your print program call FM 'START_FORM'.

Then call FM 'WRITE_FORM'

After this call FM 'CONTROL_FORM' :

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'NEW-PAGE'

  • EXCEPTIONS

  • UNOPENED = 1

  • UNSTARTED = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

At last call FM 'CLOSE_FORM'.

By using FM control_form and passing parameter 'NEW-PAGE' you will get one new page even thow if content of ur main window of previous page is not exceeding..

I think this will help u.

Regds,

Shweta.

Former Member
0 Kudos

Hi,

check whether you have main window in your 3 rd page.. if no... just add it

regards

padma