cancel
Showing results for 
Search instead for 
Did you mean: 

Last Page Value Printing Issue

Former Member
0 Kudos

Hi All,

I tried to print the last page number in a separate window with the field &SAPSCRIPTS-FORMPAGES&. But my last page value is not printing When I debugg the script the value is there in the field but before printing new-page event is called.

Can anyone help me to print the last page number in my SAP script .

Thanks & Regards,

Sweta Tyagi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Use &SFSY-FORMPAGES& to display total pages.

and &SFSY-PAGE& to display current page.

Former Member
0 Kudos

Hi ,

try this way.

use this way...

/: IF &NEXTPAGE& EQ 0 "this will trigger when it comes to last page

/: &PAGE&

/: ENDIF

Or

check the Paragaraph format or commad used properly while calling &SAPSCRIPT_FORMPAGES&

Prabhdas

Former Member
0 Kudos

The value is not printing on last page. The value is there in the field. The output should be like 1 0f 2 2 of 2 and I am getting

1 of 2 , 2 of blank here.

Former Member
0 Kudos

Hi,

You can try this way, do store the total page number in a variable and use that variable throught the page, example in main window at top of all codes, do like,

/: DEFINE &TOTAL_PAGE& = &SAPSCRIPT-FORMPAGES&

& whenever you need just use,

Page &PAGE& of &TOTAL_PAGE&

Thats it, try this way solve your problem, if you come accross any other solution, please share with me

Thanks!