Skip to Content
author's profile photo Former Member
Former Member

Why the statement: "IF SFSY-PAGE EQ SFSY-FORMPAGES" do not work?

Hi gurus,

I want to check if the current page is the last page and use this statement in Code Node:

IF SFSY-PAGE EQ SFSY-FORMPAGES.

V_G_SHOW = 'X'.

ELSE.

But when I try to debug this part of code, I find SFSY-PAGE and SFSY-FORMPAGES always have same value.

Why?

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 16, 2008 at 02:27 PM

    Hi Donghai Liang

    Its not possible to handle IF SFSY-PAGE EQ SFSY-FORMPAGES. But if u want to do some thing at the end ( on the last page or after the last page) put your code after the loop in main window. So that it works after printing of all the table entries. That means on the last page. If u still want to trigger another page there u can trigger using command line for new page.

    Reward if useful.

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2008 at 03:12 AM

    Hi,

    After processing all the elements inside the page,it will decide the page no.so it is not possible to use these system variables directly inside the page elements.Instead you can use the conditions ie. And Additional Events like only on first page etc..under conditions tab

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2008 at 09:47 AM

    Hi,

    control commands will work only in SAP scripts. Even though they will not give any syntax errors in smart forms, They will not work. You write the code in the program lines node. Create the node program lines where ever you want and in that you have to write the code.

    Reward.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2008 at 01:40 PM

    Smartforms evaluate &SFSY-FORMPAGES& during the execution of the form.

    If you want to know the final number of pages, you have to execute the Windows at the end of the form. Look at OSS [Note 588352 - '*' when you output the total number of pages |https://service.sap.com/sap/support/notes/588352] so the window will be "late" executed and the data of &SFSY-FORMPAGES& and &SFSY-PAGE& may be different. (the note relates to "final" window)

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 06:33 AM

    Hi,

    Check the window type if it is Secondary change to Final window

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.