IF Current Page = Last Page [SAPscript]

SAPscript

The request is to print an element inside the windows if the page is the last page onyl. You can do with a IF statement like that:

/:IF &PAGE& = &SAPSCRIPT-FORMPAGES(C)&

/:ENDIF

&PAGE& specifies the current page number and &SAPSCRIPT-FORMPAGES& specified the 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).

If you don’t use (C) specificaation, total page value will be like that ‘   2′ although current page value will be ‘1′ and it is obvious they are not equal!

Reference:

Tags: , ,

Leave a Reply