Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripts - Footer window only in last page

Former Member
0 Kudos

Hi all,

How to place a footer window only in the last page?

1)I have tried &nextpage& eq 0. It didn't work.

2)And then i have tried writing the code in BOTTOM..ENDBOTTOM...

But the lines in the main window gets overlapped over the window...

So plz give me the best solution...

Thanking you all in advance...

Chandra Sekhar

6 REPLIES 6

Former Member
0 Kudos

When you are on your window, in the third tab 'Conditions', you can try option : 'Only after End of Main Window '

Perhaps, you can also check when sfsy-page = sfsy-formpages in a routine then use an alternative routine.

Hope it helps,

That option is available in smartforms.

Former Member

Former Member
0 Kudos

Hi Sekhar,

write all the code in the footer window within a TEXT ELEMENT. now this footer window will be visible only wen u call this text element from ur program using FM "WRITE_FORM".. so, wat u ve got to do is call this element after u ve looped through all ur item details in the main window.. so that after the last item is printed(in the last page), u call this text element in the footer window n hence gets printed as required.

hope it helps,

Regards,..

Bikash

Former Member
0 Kudos

Hi kishan,

Can u give me clear details abt the conditions tab and only after main window option please.

Regards,

Chandru

0 Kudos

.- the window footer must be declared in both pages FIRST and NEXT

2.- within window footer do:

/: IF &NEXTPAGE& = 0

HERE GOES YOUR CODE

/: ENDIF

Note that the key here is &NEXTPAGE& = 0

0 Kudos

Hi chandra sekhar,

Use &sapscript-formpages& to get the total number of pages and hence you can use

IF &page& = &sapscript-formpages&

Your Code

ENDIF.

Let me know if this helps..

Regards,

Suman.