cancel
Showing results for 
Search instead for 
Did you mean: 

SAP script page problem

Former Member
0 Kudos

Hi experts,

I have 3 pages in my form First page, next page and first_b page

if there is 5 pages in script then page 1 will be first page and last page will be first_b page and page 2,3,4 should be next page

please help me.

Thanks in advance

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

You need to write this code in the Driver Program

/: if &PAGES& = &SAPSCRIPT-FORMPAGES&
/: NEW-PAGE page_b
/: endif

Or else, you can write the logic in the Driver Program also ..

Call Function 'CONTROL_FORM'
 Exporting.
  Command = 'NEW-PAGE page

_b'.

Regards

Sudheer

Former Member
0 Kudos

Hi Sudheer,

Thanks for your response.

My driver program is a standard program.

So I have to use a subroutine and the logic will be inside the form of subroutine pool program. But where to use that perform<subroutine>.......endperform statement.

Thanks

Dillip

Former Member
0 Kudos

Hi Dillip,

We are not specified what data is displayed in each page...

If you want to print some particular data in the first_b page then you can achevie the same using the test elements.

when ever the particula text exlement is trigged just

/: NEW-PAGE FIRST_B.

Regards,

Satya

Former Member
0 Kudos

In you next page you need to check if the last page has occured. I assume you print the page_b only at the end. The following code will be useful to you. Put it at the end of your nextpage's main window.

/: if &NEXTPAGE& = 0 "Indicates this is the last page

/: NEW-PAGE page_b

/: endif

Former Member
0 Kudos

Hi Vivek,

Thanks a lot for quick response.

I have tried the code in side a text element of main window and footer window of next page as well. But still the last page is not appearing.

Could you please tell me where to write the code?

Thanks

Dillip

Former Member
0 Kudos

Hi,

for Page1 the Next page would be NExt page and for the Next page the next page would be the Nextpage only.

just write this condition. if the &PAGE& = &SAPSCRIPT-FORMPAGES&.

then write a Perform and inside of the perform, call a <b>CONTROL_FORM</b> function module, in that one pass the command 'New page ' firstb''.

Regards

Sudheer