on 11-13-2006 2:30 PM
Dear Friends,
In SAPScript, i have defined only one page: header, main and footer. In the ouput,there are more than 1 page, suppose 3 pages. so the footer will come in all the 3 pages. how to make the footer appear in only the last page.
Thanx in Advance.
I Promise to reward.
Geetu.
Hi Geeta,
You need to create an element in the MAIN window. You can do it in two ways:
1. In SE71, you can create:
/:E FOOTER
/:BOTTOM
Text
/:ENDBOTTOM
In the print program, just call this element.
2. In you print program, populate parameter type = BOTTOM in FM, WRITE_FORM.
Ex.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
type = 'MAIN'
window = 'BOTTOM'
EXCEPTIONS....
However, if you issue new page having new header data. Thus, new item data. And if it will exceed more than 1 page, the footer will still appear. To solve this, you need to create a new element in MAIN. Ex. INIT_FOOTER. It just contains the following:
/:E INIT_FOOTER
/:BOTTOM
/:ENDBOTTOM
Call this after passing all item data.
Regards,
Dru
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
write this code then the footer will be printed in last page itself
/: IF &NEXTPAGE& EQ 0
whatever footer you want.
/: ENDIF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Geeta,
If u r not interested to change the print program. Then simply insert simple code in the footer wondow.
now insert this code in ur footer window
IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES&.
*all code in footer goes here.
ENDIF.
&TTXSY-PAGE& holds the page number of current page.
&SAPSCRIPT-FORMPAGES& holds total form pages.
This will work.
Add points if usefull.
Thanks,
Sharat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Geeta
In such senario no need to use a window for footer.
In the<b> Script form:</b>
-> In the Main Window itself after all the main data create an Element.
-> Use BOTTOM and END-BOTTOM; write your footer information between them.
In your <b>Driver Program:</b>
-> After printing all the data (means after passing to form and before closing the form) call one WRITE-FORM with the footer element.
I'm sure it will work.
Regars
Surya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.