cancel
Showing results for 
Search instead for 
Did you mean: 

Last Page of Smartform

Former Member
0 Kudos

Hello everybody,

I have a Smartform in which to display a secondary window , but only in the last page  of the document.

I have read a lot of discussions in the forum, but it isn't working yet.

I have a FIRST page, and the next one in the Smartform is NEXT, which has itself has next page.

The MAIN Window has to be on all pages, it just has a layout in the FIRST different from the NEXT.

The secondary window, has to be displayed on the last page, just below the MAIN Window.

Here is what I have tried:

  1. Putting a SFSY-PAGE = SFSY-FORMPAGES condition on the secondary window
    • It shows the secondary window in all pages
  2. Printing SFSY-PAGE and SFSY-FORMPAGES in the secondary window, just to be sure that the values are correct
    • They are correct, SFSY-PAGE acts as a counter and SFSY-FORMPAGES is always the no. of pages, so the previous condition should have  worked
  3. Flagging "Only after end of Main Window" on secondary window conditions
    • The secondary window is not shown altogether
  4. Both n. 1 and 3
    • The secondary window is not shown altogether
  5. Declaring a boolean value GV_FLAG, put in the the secondary window conditions the "GV_FLAG = 'X' " condition, then add program lines to the secondary window with code:
    • IF sfsy-page EQ sfsy-formpages.
        GV_FLAG = 'X'.
      ENDIF.

    • The secondary window is not shown altogether !!!

Any ideas what's going on? I'm going to check how smartforms react to voodoo dolls and report back. In the meantime, does anyone know how to implement the intended behaviour?

Thanks in advance


Accepted Solutions (1)

Accepted Solutions (1)

Rudy_Clement1
Participant
0 Kudos

Hi Guiseppe,

The total number of pages can only be known after all main pages have been processed. If you use conditions that check sfsy-formpages, make sure your window is defined as a 'Final' window.

Here's a help link explaining the window type 'Final':

http://help.sap.com/erp2005_ehp_04/helpdata/en/81/e2685ef2be11d4b65a006094192fe3/content.htm?framese...

Good luck!

KR, Rudy.

Former Member
0 Kudos

Thank you!

I changed the secondary window to 'Final' and it works now.

Answers (0)