cancel
Showing results for 
Search instead for 
Did you mean: 

How to decide the last page in smartforms

Former Member
0 Kudos

Hi experts,

I want to display a signature block only in the last page, can anybody tells me the perfect way to decide when it's the last page?

Now I'm using a window with the check EVENT "Only Before End of Main Window", a flag is set in this window, and then use another window for signature block with the condition of flag is on.

This method is not working perfectly, sometimes it works fine, sometimes not.

Please let me know how will you do this, thank you

Best Regards

Raymond

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Raymond,

Try this logic!!!!

I hope you have used table in main window to display items. Just after the table in your main window, create a program line and set a variable(let say "x').

Cretae a separate window to display the signature. In the signature window use a text element to display the required value. Go to conditions tab of text element and set the condition (i.e. check your variable value which you have assignes before) and accordingly your text will get printed.

Hope this will help you to resolve the issue & close the thread.

Do appreciate if found useful.

BR,

Vinit

Former Member
0 Kudos

Hi,

Try to write yr code specifically in the Footer portion of smartform. May be with the use of above suggested calling Function (function Module).

Regards,

Akg

Edited by: akg.amit on Mar 23, 2011 12:06 PM

Edited by: akg.amit on Mar 23, 2011 12:07 PM

Former Member
0 Kudos

Hello Raymond,

In the signature window's condition tab, check u2018Only After End of Main Windowu2019 instead of u2018Only Before End of Main Windowu2019

If you select after end of main window, then signature window/block will appear only in the last page when main window printing is completed.

Try it. Hope it helps!

Regards,

Saba

Former Member
0 Kudos

set a global variable using program lines at the end of main window. ie make sure that changing this variable value is the last line to execute in the main window.

then use the global variable in conditions of the signature window.

otherwise you can make the signature window as final window and use condition SFSY-PAGE = SFSY-FORMPAGES

former_member196280
Active Contributor
0 Kudos

Try to create a new window and place a text, make sure in the attributes tick the check box - " Only at end of main window".

I hope it helps you.

Regards,

Sairam

Former Member
0 Kudos

if SFSY-PAGE = SFSY-FORMPAGES then its last page.

Dhiraj

Former Member
0 Kudos

Hi thank you for your reply

I tried but it's not working, have you used this in your smartform?

I'm not sure but I remember I read some documents saying these two fields will have the value of total page when used like this.