on 06-22-2009 5:06 AM
hey guys,
I would like to ask on how to do i put a condition according to pages?
for example:
i would like to draw box on all pages but at the last page, i do not want to print the box.
the coding that i tried is this:
/: IF &PAGES& NE &PAGE&
/: BOX XPOS 0 MM YPOS 43 MM FRAME 10 TW WIDTH 59 MM HEIGHT 216 MM
/: ENDIF
but still, it print the box in all pages....
can anyone help me...!!!
thanks in advance!!!!
this statement is working
IF &NEXTPAGE& NE 0
BOX...
ENDIF.
but guys when i try to do for the lastpage i try to execute the dynamic box condition, (the coding below)
IF &NEXTPAGE& EQ 0
BOX XPOS 0 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 59 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 84 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 107 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
POSITION YORIGIN +5 MM
ENDIF.
,,&ilist-zname1&,,&ws1(R)&,,&ws2(R)&,,&ws3(R)&,,&ws4(R)&,,&ws5(R)&,,
it doesnt execute the box...
i also try this for the condition
IF &PAGE& EQ &SAPSCRIPT-FORMPAGES&
BOX
ENDIF
also doesn't working...
can u guys help me..
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bob,
The statement IF &nextpage& eq '0' doesnot work in the main window, this is because the main window will always have the next page number only variable window will contain the nextpage as '0' if there is no next page so this statement works in the variable window only.
The statement &PAGE& EQ &SAPSCRIPT-FORMPAGES& will also not work this is because the formpages will get generated only in the runtime for each page.
so take the box commands which you want to get printed in a seperate variable window and call the box commands like this
Ex: Variable window 3
IF &NEXTPAGE& EQ 0
BOX XPOS 0 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 59 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 84 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
BOX XPOS 107 MM WIDTH 0 MM HEIGHT 5 MM FRAME 20 TW
POSITION YORIGIN +5 MM
ENDIF.
This will definitely work.
Thanks&Regards
Sarves
HI,
IF &NEXTPAGE& NE '0'.
BOX
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try like below:
/: IF &NEXTPAGE& NE '0'
/: BOX....
/: ENDIF.
&NEXTPAGE& will always be 0 when it reaches to last page to print.
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
You can try Writing the Condition as....
/: IF &PAGE& NE &SAPSCRIPT-FORMPAGES&
/: BOX XPOS 0 MM YPOS 43 MM FRAME 10 TW WIDTH 59 MM HEIGHT 216 MM
/: ENDIF
AND TRY...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try with this if condition.
/: IF &SAPSCRIPT-FORMPAGES& NE &PAGE&
/: BOX XPOS 0 MM YPOS 43 MM FRAME 10 TW WIDTH 59 MM HEIGHT 216 MM
/: ENDIF
or
when you want the box in all the pages then you might have taken it in the variable window.
so you can even give the condition
/: IF &NEXTPAGE& NE '0'
/: BOX XPOS 0 MM YPOS 43 MM FRAME 10 TW WIDTH 59 MM HEIGHT 216 MM
/: ENDIF
Thanks&Regards
Sarves
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to debugg the code and check whether the value is getting passed to variable &Pages&
May there may not be any value in this variable.
Regards,
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.