cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORM

Former Member
0 Kudos

I want to print a window in smartform only on the last page. I do not want it on the first or second. It should be printed only on the last page of the total number of pages.

For that i tried putting conditon i.e. SFSYPAGE = SFSY-FORMPAGES,

SFSY-PAGE = SFSY-JOBPAGES.

But still it gets printed on all the pages.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Priti,

The problem with sfsy formages is that it increments for every page

and so it is always equal to pages.

Try this.

At the last point in ur main window

insert a code snippet. Set falg = "X".

Check this flag in the Footer window as a printing condition.

It will work.

This flag should be global and declared locally in the code snippet import?export parameters.

Former Member
0 Kudos

Yes. Its done. Thank u so much.

Former Member
0 Kudos

by the way how many pages have you declared. On each page put the condition on the window which you want to display on the last page 'At the end of main window'. It will serve your purpose. The problem you had is you declared the condition on first page, put the condition on all the pages.

Regards,

Mallick

Former Member
0 Kudos

Yes. Its done.

Thank u so much.

Former Member
0 Kudos

hi priti,

For the particular window go to conditions tab there u can specify the condition u want like ONLY AFTER THE END OF MAIN WINDOW or PAGE (here specify the last page)....

regards,

sujatha.

Former Member
0 Kudos

Yes, in the condition tab only i am trying to write the condition. But how do i capture the last page. Like i tried writing condition as

SFSY-PAGE = SFSY-FORMPAGES, SFSY-PAGE = SFSY-FORMPAGES.

But still it gets printed on all the pages.

Former Member
0 Kudos

Just tell me the condtion , what should i write. How do i get that window in the last page of all pages.

Former Member
0 Kudos

hi,

No condition is required to be mentioned just check the option (<b>ONLY AFTER END OF MAIN WINDOW</b>) under condition tab for that window

regards,

sujatha

Former Member
0 Kudos

I tried doing that. But now the window does not appear on the first page, But appears on all next pages upto the last page.

I want to show the window only on the last page.

Like if the main window is flowing upto 5 pages,Then i want to print that window only on the 5th page.

Former Member
0 Kudos

hi priti,

It should work, i done the same thing and it worked for me....

Just check that option only no need of formpages condition.

If not, then there might be some other mistake in ur form just check it again

regards,

sujatha

Former Member
0 Kudos

Yes. Its done.

Thank U so much.

Former Member
0 Kudos

Hi

Its simple one just select window type as final window. It will trigger at last. i also faced same with my one of my developments. This final window serve this task.

Reward me if useful

Regards

Sreenivas

Former Member
0 Kudos

Hi Priti,

use the condition

/: IF &PAGE(3ZC)& = &SAPSCRIPT-FORMPAGES(3ZC)&

  • [your END OF PAGE text here]

/: ENDIF

Reward if helpful

Thanks,

Mandeep

Former Member
0 Kudos

Hi,

You can also use if &NEXTPAGE& ='0'.

Former Member
0 Kudos

But it is not a sapscript.It is a smartform.

So it doesn't take sapscript-formpages

Former Member
0 Kudos

But it is not a sapscript. It is smartform.

So it does not take sapscript-fompages.