on 05-07-2009 1:07 PM
Hi,
I want to find out the last page in the SAP script. I have used &NEXTPAGE& = '0', this is finding the last page of a one layout however I do have three layouts in my script. I have also used the &SAPSCRIPT-JOBPAGES(3ZC)& and I have taken one counter and comapred as follows-
If &SAPSCRIPT-COUNTER_1(+)& = &SAPSCRIPT-JOBPAGES(3ZC)&
LAST PAGE.
endif.
This is also not working. Please advise if there is anyway to find out the last page from print program.
Thanks,
Jyoti
Last page from print program? Impossible!
A print program does not know the window sizes of your form, how should it know what and how much will fit on a page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well it depends at which point of time you need the information and for what purpose.
A print program normally only needs data to give it to the form and print them.
So you probably need the information if you are on last page, while printing the form, means in the form and not in the print program itself.
So in your form a "/: IF &NEXTPAGE& = 0", should work.
maybe it needs some tweaking like /: IF &NEXTPAGE& = ' 0', debug the printout to find this out.
so if you got something you just wish to print on the last page, do it between this if and an according endif.
&nextpage& = 0 is giving me last page correctly however that is only for perticular layout. I have continue three different layouts in my output. I want dead end page which I am getting by using &SAPSCRIPT-JOBPAGES(3ZC)& but again to use this there is some datatype mismatch for camparing it with counter as I descibed. My requirement is to print something only on last page of all three layouts.
Thanks,
Jyoti
Hi,
U can do like this, Set a flag in ur driver program when u reach to print the last layout then pass this flag value to Script. In script check when this FLAG = 'X' & &NEXTPAGE& = 0 then u print the required in ur last page.
Eg:
define a FLAG in ur driver program and make the value as 'X' when it reach the last layout.
in script, write the condition like:
/: IF &FLAG& = 'X' AND &NEXTPAGE& = 0
write text.
/: ENDIF.
Hope it helps!!
Rgds,
Pavan
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.