09-10-2008 10:27 AM
hi ,
"I have searched the SDN , but could not find the solution to my issue.
I have developed an classical report.
In this end-of-page is not triggering at the last page...
Can you people help me to solve this issue...
Regards...
Always Learner
09-10-2008 10:31 AM
Hi
you have use the LINE-COUNT addtion of the report statement
Regards
Pavan
09-10-2008 10:32 AM
hi Pavan,
Thanks for your instant response...
"yes , i had used line-count statement after the report statement
09-10-2008 10:35 AM
hi,
check this.
[http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba06935c111d1829f0000e829fbfe/content.htm]
09-10-2008 10:33 AM
09-10-2008 10:34 AM
Hi
You must use 'LINE-COUNT<>' statement in addition to report line.
Eg:
Report ZAS_EXAMPLE No standard page heading
LINE_SIZE <xx>
LINE_COUNT <yy>
message-id <ZC>.
09-10-2008 10:34 AM
Hi
REPORT sample LINE-COUNT 10(2).
DO 20 TIMES.
WRITE :
/ sy-index.
enddo.
END-OF-PAGE.
ULINE.
WRITE :/45 'PageNumber : ' , sy-pagno.
See when END-OF-PAGE should get triggred then you printing lines should reach to the number that you have reserved for teh end of page like in the above snippent i have reserved 10 lines for each page in the report in those 10 line 2 lines are for report Heading and 6 lines for the report body and when the control reaches to the 8 th line then your ENd-of-page is triggred
Regards
Pavan
09-10-2008 10:36 AM
it will not be triggered if the number of records on that page is less than the line count. Check that!!!!
09-10-2008 10:39 AM
hi,
i used the follwoeing statements, except last page of my report , on all pages endofpage is printed
w_lines = sy-linct - sy-linno .
RESERVE w_lines LINES.
Regards,
09-10-2008 10:42 AM
09-10-2008 10:44 AM
09-10-2008 10:47 AM
HI
DATA :
w_lines TYPE i.
DO 25 TIMES.
WRITE :
/ sy--index.
ENDDO.
IF sy-linno NE 8. " <---- My Line-coutn is 10(2) that means 10-2 = 8 on 8th line end of page is triggered
w_lines = sy-linct - sy-linno.
RESERVE w_lines LINES.
ENDIF.
END-OF-PAGE.
ULINE.
WRITE :/45 'PageNumber : ' , sy-pagno.
Regards
Pavan
09-10-2008 10:37 AM
09-10-2008 10:47 AM
Hi....
say your line count = 25
And 3 lines for end of page.
So here your pages must contain 22 lines to trigger end of page.
Other,
you have to build logic for the same like..
Before the end-of-page event.
data: COUNT(2) type n.
COUNT = SY-LICNT - SY-LINNO.
skip COUNT.
<-----we are skipping the empty lines
Thanks,
Naveen.I
09-10-2008 10:55 AM
Hi...
Check this code...
its working...for line count 25(3).
data: itab like vbak occurs 0 with header line .
data: count(2) type n.
start-of-selection.
select * from vbak into corresponding fields of table itab up to 54 rows.
loop at itab.
write:/ itab-vbeln.
endloop.
count = sy-linct - sy-linno.
skip count.
end-of-page.
uline.
write:/ sy-datum,
sy-pagno.
Thanks,
Naveen.I
09-10-2008 11:05 AM
09-10-2008 11:12 AM
09-10-2008 11:14 AM
Hi...
In my above code we are having system fields SY_PAGNO.
That is to display the page number, you can capture last value of that field.
Thanks,
Naveen.I
09-10-2008 11:40 AM