cancel
Showing results for 
Search instead for 
Did you mean: 

how to find the total number of pages in smartforms

Former Member
0 Kudos

Dear experts,

        I have design a smartform with only one page,

and one of window(Secondly window) should be displayed according to current page number and total pages

when I debug the code  i find SFSY-PAGE and SFSY-FORMPAGES

1, SFSY-PAGE = 1 and SFSY-FORMPAGES =1

2, SFSY-PAGE = 2 and SFSY-FORMPAGES =2

3, SFSY-PAGE = 3 and SFSY-FORMPAGES =3

i need the total number of pages to print the window basdes on the total number of pages.

Any help would be highly appreciated.

thanks in advance.

Raja.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Raja

Current page ==> SFSY-PAGE

Total pages   ==> SFSY-JOBPAGES

Cordially,

Faycel MOSLAH.

aidan_black
Active Contributor
0 Kudos

Hi Raja,

As you found in debugging, the Smartforms composer cannot know the final total number of pages while processing e.g. the first page.

Can you try using a late processing window(window type Final Window) for the calculation?

Regards,

Aidan

Former Member
0 Kudos

Hi,

If I have understood your issue correctly, you want to display in last the page no. of total no. of pages.

click on field list on/off button, then drag the system fields as you require. Hope it helps.

Regards

Purnand

Former Member
0 Kudos

Hello Raja,

Refer following thread

http://scn.sap.com/thread/1357917

Katrice

FredericGirod
Active Contributor
0 Kudos

Hi Raja,

don't debug the number of page in smartforms/sapscript.  SAP put something like a flag to change all the value at the end of the print. So you will never had the good value in debug.

trust your sfsy values.

Fred

Former Member
0 Kudos

Hi Fred,

Thanks for Quick response.

Actually i am developing a smartform for PO, the requirement is the supplier address should print on first and last page only. if i take the supplier address in a window (WIN_ADDR) and it is coming on first and last page based on the "Only After End of Main Window" Event.

If Suppose the form has 5 pages the address window is coming on first and last page,But the in the middle pages empty space is coming in the place of address window,  after empty space the main window is displaying the item details.

The client don't want the empty space, they want that empty space also filled by main window.

Thanks,

Rajareddy

FredericGirod
Active Contributor
0 Kudos

Hi Raja,

There is no simply answer for you ..

for me the solution is to create an alternative, one with little main, one with big main. But I'm not sure SAP will appreciate that there are two "main" in one page.

do you have border in the main window ?  if not you could print blank lines to set the space needed by the WIN_ADDR ...

Fred