cancel
Showing results for 
Search instead for 
Did you mean: 

Page Number Problem.

former_member383741
Participant
0 Kudos

Hi,

I have one script . its have three pages.every page end i want to write page number like in the first page i want to write

Page 1 of 3 in the second page Page 2 of 3 in the third page Page 3 of 3.can you help me.

Regards,

K.Karthikeyan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

use 2 system symbols:

&SAPSCRIPT-FORMPAGES&

Total page number based on the current output layout set:

&SAPSCRIPT-JOBPAGES&

Total page number based on all output layout sets created with the function modules OPEN_FORM, START_FORM .. ENDFORM, START_FORM .. END_FORM, ..., CLOSE_FORM

Examples:

Page &PAGE& of &SAPSCRIPT-FORMPAGES(C)&

Specifies the current page number and total page number. The additional specification (C) outputs the symbol in a compressed form, that is the leading blanks are omitted in the 4-character output (default).

Number of all output pages: &SAPSCRIPT-JOBPAGES(C)&

Outputs the total number of output pages. Caution: When using this symbol, all output pages must be held in the main storage so that the total page number can be inserted at the end of the output. Larger outputs can affect performance.

Regards,

Anil

former_member383741
Participant
0 Kudos

Hi Anil,

I am new to sap-script can you tell more clearly where i have to use these system symbols.

Regards,

K.Karthikeyan.

Former Member
0 Kudos

Hi,

Use the system fields in form painter in the window where you want to display the page numbers.

&PAGE&- Page Number

&SAPSCRIPT-FORMPAGES&. - Total number of pages .

For more info check this [System symbols|http://wiki.sdn.sap.com/wiki/display/ABAP/SAPscript#SAPscript-HowtoconvertasapscripttoSmartForm%3F]

Hope this helps you.

Regards,

Rajani

former_member383741
Participant
0 Kudos

Hi Anil,

Thank you for your answering.

I got the output.

Regards,

K.Karthikeyan.

former_member383741
Participant
0 Kudos

Hi Rajani,

I got the answer .

Thank you Very much.

Regards,

K.Karthikeyan.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

In the form write the code as

page &PAGE& of &SAPSCRIPT-FORMPAGES&.

Hope this solves the issue.

Regards,

Rajani

former_member383741
Participant
0 Kudos

Hi Rajani,

i worte like u in the footer window.But it will not show anything.Its coming blank only.

Regards,

K.Karthikeyan.

Former Member
0 Kudos

Hi,

Just use &PAGE& of &SAPSCRIPT-FORMPAGES&.

This would print the page numbers