Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the last page SAP Script form

Former Member
0 Kudos

How to get the last page SAP Script form.

I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.

Regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.

From SAP Help:

This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .

Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.

/: IF &NEXTPAGE& = '0'

  • Last page

/: ENDIF

Max

4 REPLIES 4

Former Member
0 Kudos

Hi

You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.

From SAP Help:

This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .

Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.

/: IF &NEXTPAGE& = '0'

  • Last page

/: ENDIF

Max

Former Member
0 Kudos

Hi Kiran,

The variable SAPSCRIPT-FORMPAGES contains the total number of pages in current Form.

So you can check the condition -

IF &PAGES& = &SAPSCRIPT-FORMPAGES&.

  • Print information

ENDIF.

Hope this helps!

Regards,

Saurabh

Former Member
0 Kudos

Hi Kiran.

& SAPSCRIPT-FORMPAGES& -> this will give the last apge no

anversha_s
Active Contributor
0 Kudos

hi,

& SAPSCRIPT-FORMPAGES& -> last page

so chk &PAGES& = & SAPSCRIPT-FORMPAGES&

rgds

anver

pls mark hlpful answers