cancel
Showing results for 
Search instead for 
Did you mean: 

How to print a field on the last page of Smartform with more of 2 pages?

Former Member
0 Kudos

HI FRIENDS,

I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM

HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE

SFSY BUT NOT worked.

The form has more of 2 pages.

Thank you.

ROGERIO VAZ

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Create a new window and select the option "only after end of main window".

And here write ur variable to be print.

Regards,

adesh

Former Member
0 Kudos

Hi ,

You dont have to hard code anything to achieve this functionality,

just create a window and in that window define a text element to print

that variable.In the conditions tab of that window check the check box

"only after end of main window".i think you might have used a main window,

so irrespective of the no of pages the smartform prints,it always displays that

field in the last page of the smartform.

regards,

srikanth.

Former Member
0 Kudos

HI,

Try,

If SFSY-PAGE eq SFSY-FORMPAGES

Print u r text.

endif.

Otherwise.

Check 'Only after end of the Main Window'

Former Member
0 Kudos

can you try this way.

in your main window table in FOOTER event create COMMAND , in command general attributes

check the checkbox GO TO NEW PAGE there you can use LASTPAGE.

so you need to create one more page is LASTPAGE.

Former Member
0 Kudos

the window in which you have your element must be defined as window late. (i do not have an english version at the moment to be sure of the name). because SAP only knows the number of pages when the smartform has reached the end. after the end all pages will be executed again for the windows late. and at that time the pagecounter and total number of pages are working correctly.

Regards,

Guido

Former Member
0 Kudos

hi,

before the printing insert code lines

and check sfsy-page = sfsy-formpages and set one flag ..

i.e u are checking whethrer ur current page is last page

to print that particular field in last page simply put that variable in text element and in condition tab check fr that flag ..

hope it would prove useful to u

regards,

prashanti

Former Member
0 Kudos

hi, Prashant

The counting is done and time of execution, debug I saw that the field formpage progresses along with the field page, I found that the field formpage would bring the total number of pages but not, it increases with the field page.

You know another way for me to identify the last page of the form?

Thanks friend.