cancel
Showing results for 
Search instead for 
Did you mean: 

page numbering problem sap script

Former Member
0 Kudos

Hi ,

I have request to rapaire page numbering problem in sap script.

The code is

Page:,,&PAGE& of &SAPSCRIPT-FORMPAGES& I tried with Page:,&PAGE& of &SAPSCRIPT-FORMPAGES(C)&

The problem is whathever is the number printed pages on the form it is always printed

"Page :  1 of  1"

So if I have 5 pages form on each of them is printed tha same thing  - 1 of 1.

Please advice .

Chris

Accepted Solutions (0)

Answers (2)

Answers (2)

VijayCR
Active Contributor
0 Kudos

Hello Krsto,

Check Whether yo have assigned next page or not.

Thnaks

vijay

Former Member
0 Kudos

Hi

Do you mean under the PAGE> standard attributes.

There i have FIRST page  > NEXT page

                  NEXT  page  > NEXT page

Former Member
0 Kudos

Hi Chris,

i use

Page &PAGE& / &SAPSCRIPT-FORMPAGES(2)&

and it works fine.

The (2) indicates the max. length of the page. 2 digits so the highest value is 99.

I don't know what (C) stands for.

Regards

Former Member
0 Kudos

Hi Georg ,

Thanks  but it doesn't work with your solution. I am wondering is that problem with Page standard attributes.

In the script I found two pages 'FIRST' and 'NEXT'

Page : FIRST

NextPage: NEXT

Page counter  is set in following manner

MODE:  INC

Numb type : Arabic

Output length : 00 ( i changed lately into 02 but nothing has change in numbering)

Please advice

Chris

Former Member
0 Kudos

Try &PAGE(3ZC)& of &SAPSCRIPT-FORMPAGES(3ZC)& and also make sure the window or place holder is big enough to hold the entire page text

Former Member
0 Kudos

Hi Chris,

Try the following setting

"FIRST" page

Standard Settings:

Page        FIRST
Next page   NEXT

Page Counter:

Mode                 START
Numbering Type       ARABIC
Output length    00

"NEXT" page

Standard Settings:

Page        NEXT
Next page   NEXT

Page Counter:

Mode                 INC
Numbering Type       ARABIC
Output length    00

Regards

Georg

Former Member
0 Kudos

Hi ,

Thanks . It works but only partially i replaced SAPSCRIPT-FORMPAGES(3ZC)& with

&SAPSCRIPT-JOBPAGES(2C)&  and now  the total pages is ok.

Page no is still 1 for all  five pages so instead having 1 of 1 now i have 1 of 5 on all pages.

Jobpages I inserted from insert>simbols>sapscrip  i tried to find something for page but i didn't found it.

Only one was in insert>simbols>TTXSY  (ttxsy-page) but this one doesn't work.

I did try in start mode but without success.

Please advice

Chris

Former Member
0 Kudos

Hi Chris,

for me it seems that you always (e.g. 5 times) print the "FIRST" page.

Try following setting:

Try the following setting

"FIRST" page

Standard Settings:

Page        FIRST
Next page   NEXT

Page Counter:

Mode                 INC
Numbering Type       ARABIC

Output length    00

Best regards

Georg

Former Member
0 Kudos

Hi Georg,

I did try vith start and inc and with settings like you seid ( first , next) but current page no is always 1.

The page is not the same becuase all conten is different in all five pages.

thanks

Former Member
0 Kudos

Hi Chris,

what are you printing and are you using standard program?

former_member230486
Contributor
0 Kudos

Hi Krsto,

While writing Print program you have to use START_FORM...END_FORM for different pages.

CALL FUNCTION 'OPEN_FORM'

  EXPORTING

    FORM                              = 'ZTEST'.

CALL FUNCTION 'START_FORM'

  EXPORTING

    STARTPAGE              = 'PAGE1'.

CALL FUNCTION 'WRITE_FORM'

  EXPORTING

    ELEMENT                        = 'ITEMDETAILS'

    WINDOW                         = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'

  EXPORTING

    WINDOW                         = 'ADDRESS'.

  CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'START_FORM'

  EXPORTING

    STARTPAGE              = 'PAGE2'.

CALL FUNCTION 'WRITE_FORM'

  EXPORTING

    ELEMENT                        = 'ITEMDETAILS'

    WINDOW                         = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'

  EXPORTING

    WINDOW                         = 'PAGES'.

  CALL FUNCTION 'WRITE_FORM'

  EXPORTING

    WINDOW                         = 'FOOTER'.

  CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'CLOSE_FORM'.

In the script form in page numbers in the text element of a window write this code,

PAGE &PAGE& of &SAPSCRIPT-JOBPAGES&

Former Member
0 Kudos

Hi ,

In this program I found that  start _form export parameter is commented.

Second  question is how to pass the page no if in this form can be any no of pages.

Thanks

former_member230486
Contributor
0 Kudos

You have to pass Page name and Next Page name in the START_FORM export parameter.