08-18-2007 12:10 PM
hi
I want to display the page number/total number of pages in the report.footer
for eg : 1/10,2/10 etc.
Plz reply.
regards.
Kamal
08-18-2007 12:29 PM
Hi Kamal
first u will get data in the internal table then findout the toal number of records and then divide these number by the number of lines that u have defind in the starting of program.
so u will get number of pages in a variable and use that one
i hope u understand
Rewad if helpful.
kiran.M
08-18-2007 12:30 PM
Hi Kamal,
For displaying page no you van use: SY-PAGNO.
for total page no you have to do manual calculation:
1. first get number of rows of the internal table that are used for showing in list
2. diivide number of rows to SY-LINCT and it will help you to get number of rows.
for showing you can write that piece of code in END-OF-PAGE event.
Regards,
Krishnendu
08-18-2007 12:47 PM
Hi kamal,
Just go through this hope u can do .
. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
&SAPSCRIPT-FORMPAGES&:
This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored. You can use this symbol to formulate information like
Page x of y for your output.
&SAPSCRIPT-JOBPAGES&:
This field contains a number representing the total number of pages of all forms contained in the currently formatted print request, in other words, of all forms created using the OPEN_FORM, START_FORM.. ENDFORM, START_FORM.. END_FORM,..., CLOSE_FORM function modules.
When using the SAPSCRIPT-FORMPAGES or SAPSCRIPT-JOBPAGES symbols, SAPscript leads all output pages of the current form or current print request into main memory to replace the symbol by the appropriate value. For large output jobs, this can mean a very large amount of memory.
reward points if helpful.
Thanks
Naveen khan
Message was edited by:
Pattan Naveen
08-18-2007 2:31 PM
Hi
It depends on the number (X) you give in the field LINE-COUNT 35(<b>X)</b>
by default footer will take 2 lines
say for example you gave LINE-COUNT 65(1)
then you can display the pagenumber by writing the small code like
DATA: N TYPE P,M TYPE I.
N = CEIL( SY-DBCNT / ( SY-LINCT - 3 ) ) .
M = N.
WRITE: / SY-PAGNO 'of' M.
THIS WILL WRITE the required format as 1 of 10
reward points
Regards
Anji