on 05-26-2014 10:33 PM
I need to print a text but only for the last page in the main window.
I have tried with IF.
IF &PAGE& = &SAPSCRIPT-FORMPAGES&
BOTTOM
....TEXT
ENDBOTTOM
ENDIF
But it prints in all pages in every main window.
Can someone point me what I am doing wrong or how can I do this?
Regards,
Carlos
Hello Carlos,
the problem with this condition is the following.
The Sapscript composer cannot know during the processing of e.g. the first page,
how many pages will follow. So &SAPSCRIPT-FORMPAGES& still contains the same
value like& PAGE& and is filled with the correct values only at the very end of the processing.
(when the total number of pages is known).
So I suggest you to use the BOTTOM command in the print program,
when the processing of all item of the MAIN window is ended.
There is an other variable &NEXTPAGE&. &NEXTPAGE& will always be 0
when it reaches to last page to print. The problem with this variable that
it can not be used in a condition in MAIN window too, only in a separate page window.
Regards,
Hedvig
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you Hedvig, turns out I only needed to put the if inside the bottom command since once it printed it did it in all the pages
Regards,
Carlos
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
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.