Smartforms System Field &SFSY-JOBPAGES& - Total Number of Pages on a SmartForm document
While working with SmartForms, ABAP developers can use SFSY system fields within the SmartForms form.
&SFSY-JOBPAGES& is one of the system fields that during the processing of smartforms, the engine sets &SFSY-JOBPAGES& system value with the total page number or the number of total pages of all forms in the current print request.
The most common use of &SFSY-JOBPAGES& and &SFSY-PAGE& in a smartform is as in the following code format:
But the above code might cause an "*" asterix problem on your forms.
In many SAP /ABAP forums, I see posts complaining from "Page 1 of *" similar text outputs as I had experienced in a recent SAP Smart Form (SFF) document.
Although the output length might also cause a similar problem during displaying page numbers on smart form documents, the correct usage of paging code is as follows :
The above code will reserve 4 characters space for printing the total number of pages on a smartform document.
For example I solved my problem by instead of using :
&sfsy-page(CIZ)& / &sfsy-formpages(CIZ)& / &sfsy-jobpages(CIZ)&
You can use :
&sfsy-page(CIZ)& / &sfsy-formpages(4CZ)& / &sfsy-jobpages(4CZ)&
format conditions in your SAP Smart Forms documents.
For a detailed list of system fields that Smartform developers can use, you can refer to SAP Help Portal Smart Forms SAP Library System Fields.
If the problem on your SAP Smartform document is related with displaying current page false, please refer to Smartforms tutorial SAP Smartform Current Page Number using SFSY-PAGE and Page Numbering using Page Counter.