2009 Feb 21 6:11 AM
Hi,
I want to print a custom footer text in every pages like 'CONTD..TO PAGE 2' on page one and contionously till the last second page.
so have done something like this
DEFINE &PRINT& = ' '.
PERFORM GET_PAG IN PROGRAM YSUBPOOL_PAGEFOOTER
USING &PAGE(3ZC)& &SAPSCRIPT-FORMPAGES(3ZC)&
CHANGING &PRINT&
ENDPERFORM
,,,,,,,,,,,,,,,,,,&PRINT&
FORM get_pag TABLES intable STRUCTURE itcsy
outtable STRUCTURE itcsy.
DATA:totpgno TYPE i.
DATA:txt TYPE string.
txt = 'Contd to page:'.
READ TABLE intable INDEX 1.
pgno = intable-value.
READ TABLE intable INDEX 2.
totpgno = intable-value.
IF totpgno <> 1 AND pgno <> totpgno.
pgno = pgno + 1.
CONCATENATE txt pgno INTO outtable-value.
CONDENSE outtable-value.
SHIFT outtable-value LEFT DELETING LEADING space.
ENDIF.
ENDFORM. "get_pag
But here when form is debugged the value of SAPSCRIPT-FORMPAGES(3ZC) is the current page no only.
so its getting failed.
Any ideas ... do help
Keshav
2009 Feb 21 6:31 AM
Hi,
Declare the pgno aslo in Subroutine, just see the output, if you see in debugger, it will show the current page - 1 value, but in print preview it show currect values.
or
You can do it without Subroutine
Create a Footer window and this code, Main window does not show &NEXTPAGE& value
/: IF &NEXTPAGE& NE 0
P1 Continued in Page : &NEXTPAGE&
/: ENDIFRegards
Bala Krishna
Edited by: Bala Krishna on Feb 21, 2009 12:05 PM
Hi,
I want to print a custom footer text in every pages like 'CONTD..TO PAGE 2' on page one and contionously till the last second page.
so have done something like this
DEFINE &PRINT& = ' '.
PERFORM GET_PAG IN PROGRAM YSUBPOOL_PAGEFOOTER
USING &PAGE(3ZC)& &SAPSCRIPT-FORMPAGES(3ZC)&
CHANGING &PRINT&
ENDPERFORM
,,,,,,,,,,,,,,,,,,&PRINT&
FORM get_pag TABLES intable STRUCTURE itcsy
outtable STRUCTURE itcsy.
DATA:totpgno TYPE i.
DATA:txt TYPE string.
txt = 'Contd to page:'.
READ TABLE intable INDEX 1.
pgno = intable-value.
READ TABLE intable INDEX 2.
totpgno = intable-value.
IF totpgno <> 1 AND pgno <> totpgno.
pgno = pgno + 1.
CONCATENATE txt pgno INTO outtable-value.
CONDENSE outtable-value.
SHIFT outtable-value LEFT DELETING LEADING space.
ENDIF.
ENDFORM. "get_pag
But here when form is debugged the value of SAPSCRIPT-FORMPAGES(3ZC) is the current page no only.
so its getting failed.
Any ideas ... do help
Keshav
2009 Feb 21 6:31 AM
Hi,
Declare the pgno aslo in Subroutine, just see the output, if you see in debugger, it will show the current page - 1 value, but in print preview it show currect values.
or
You can do it without Subroutine
Create a Footer window and this code, Main window does not show &NEXTPAGE& value
/: IF &NEXTPAGE& NE 0
P1 Continued in Page : &NEXTPAGE&
/: ENDIFRegards
Bala Krishna
Edited by: Bala Krishna on Feb 21, 2009 12:05 PM
2009 Feb 21 7:02 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |