Skip to Content
Former Member
Oct 28, 2008 at 08:08 AM

How to determine LASTPAGE


Hi gurus,

Heres my scenario.

I have more than two pages form.

Now the word "TOTAL AMOUNT DUE", must only be written on the lastpage of the form and on the first and the succeeding pages , the word "SUBTOTAL AMOUNT DUE" must be written.

So what i did is, I write a code on the program lines. And here it is:

if sfsy-page = sfsy-formpages.

subname = 'TOTAL Amount Due'.


subname = 'SUBTOTAL Amount Due'.


I know that sfsy-page will output the current page number and sfsy-formpages output the total number of pages. Thus i just check if sfsy-page and sfsy-formpages are just the same to determine the lastpage of the form.

But when I run and debug the program, sfsy-page and sfsy-formpages are always the same wherein fact, it should be not.

How could i solve this problem?