cancel
Showing results for 
Search instead for 
Did you mean: 

Not incrementing page no. in sap script

Former Member
0 Kudos

Hi Experts,

        I had devlelop SAP Script, in that i had taken 4 pages. First page having mode START and next page is Second, while Scond page having mode INC and next page is Third, while Thied page having mode INC and next page is Fourth, while Fourth page having mode INC and next page is Fourth.

        In page Counter Tab in Pages window i had taken number type as ARABIC.

       I had created a window name page which i want to print in bottom on each page, and create a page window in each pages. In that i have given &Page& of &SAPSCRIPT-JOBPAGES& for printing pages, but &SAPSCRIPT-JOBPAGES& is printing properly while &Page& is not printing properly. In all pages  it is printing as PAGE 1 of  4 , &Page& is not incrementing even though i have taken mode as INC.

     So can anyone tell how to increment the pages number in SAP SCRIPT.

Thanks In Advance,

Ashish

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member213851
Active Contributor
0 Kudos

Hi Ahsish,

Please use below code:

Page No: &PAGE(C2)& of &SAPSCRIPT-FORMPAGES(C2)&

&PAGE& : Gives  Current page

&SAPSCRIPT-FORMPAGES& : Gives  total pages

Former Member
0 Kudos

hi..

           Take the  &SAPSCRIPT- FORMPAGES&  instead of &PAGE&...

former_member200345
Contributor
0 Kudos

Hi, check the below code sample for your scenario.

I have create a page PAGE1 and next page is also PAGE1.

I am calling one MAIN WINDOW which has below logic on PAGE1.

/E MAIN1

*   &PAGE& / &SAPSCRIPT-FORMPAGES&

/:  NEW-PAGE

/E MAIN2

*   &PAGE& / &SAPSCRIPT-FORMPAGES&

/:  NEW-PAGE

/E MAIN3

*   &PAGE& / &SAPSCRIPT-FORMPAGES&

/:  NEW-PAGE

/E MAIN4

*   &PAGE& / &SAPSCRIPT-FORMPAGES&

/:  NEW-PAGE

In the driver program, I have four WRITE_FORM'S for the above 4 elements.

Try with this logic.

Former Member
0 Kudos

Hi,

I hope 'START_FORM' is getting executed only once.

Regards

Raju Chitale

Former Member
0 Kudos

Hi ,

In driver program i used 'START_FORM" for first, second , third and fouth pages. As on second page i am taking different windows then first page except page no. window same for third and fourth. Is this a write one.

Thanks for reply.

Regards,

Ashish