I want to print page n of 'total pages + 1' in the footer section of my SAPSCRIPT FORM. I have used a PERFORM to add 1 to value of SAPSCRIPT-FORMPAGES symbol. But the problem is that it works fine on second page (prints page 2 of 3) but on the first page it always prints page 1 of 1.
I think the value of SAPSCRIPT-FORMPAGES symbol is not getting passed to the PERFORM parameter on first page but is working fine on subsequent pages.
/: DEFINE &PAGEOUT& = '&SPACE(5)'
/: PERFORM PAGE_SUMM IN PROGRAM ZAPFM06P
/: USING &SAPSCRIPT-FORMPAGES(C)&
/: CHANGING &PAGEOUT&
AS <B>Page &PAGE& of &PAGEOUT&</>
Thanks for your help in advance.