08-03-2009 12:59 PM
HI guys I have one reqiurment,
In clasical reports In I am displaying output,
Here For every page I am adding header and footer at top and bottom
My Problem is for last page my client wants to save gap ,
In last page If the output data completed for the first 3 lines then he wants display fotter with gap of 3 lines.
08-04-2009 5:17 AM
HI Raju,
Welcome To SDN.
Consider the following case:
Report zdemo1 line count 20(1).
Start-of-selection.
Data: m type i.
Write: / u2018this is first lineu2019.
Do 3 times.
Write: / u2018the number isu2019, sy-index.
Enddo.
M = sy-linct, sy-linno u2013 1.
Skip x.
End-of-page.
Write: / u2018page endu2019.
The output of above example is as follows :
This is first line.
The number is 1
The number is 2
The number is 3
After skipping 3 lines
Page end
In this case, with all write statement, you donu2019t reach to the end of page. After all write statement, m is calculated in this case:
3 lines are skipped after write statement and end of page is reached.
If you dont want to END THE PAGE you can make your required coding overthere .
Hope this solves your problem.
Have a great day ahead,
Pavan.
08-04-2009 6:05 AM
08-04-2009 6:35 AM
Hello Raju
to achieve your requirement ,we first need to calculate the total nuumber of pages ,which will give us the last page
i dont think there is any direct way of calculating the total number of pages please refer to these links to understand how to calculate the page numbers
http://www.sapfans.com/forums/viewtopic.php?t=29597
once we have the last page number
we can use the condition in END-OF-PAGE .
if sy-pagno = last_page.
skip 3 line
endif.
Hope it will solve your problem..
Thanks & Regards
Rohit
08-04-2009 8:14 AM
Hi Rohit thanks for your inputs,
Upto this point I did.
I caliculated total no of pages and suppressed ,
In the last page t End-of-page is triggering normally ( at page last , footer is displaying But I want to bring that one up , But I am unable do that one).
08-04-2009 9:08 AM
Hi
So the requirement is to bring the footer up in th last page
so that there is a blank gap Below the footer
I am not aware if this can be done , it would have been easy if it was SCRIPT or smartform .
never the less logically one thing can be done
Do not execute the "statements" in the end-of-page for the last page condition
i.e
execute the "statements" just below the part where your display end for the last page condition
if
sy-pagno = last_page .
statements
endif.
end-of-page.
if sy-pagno <> last_page .
statements
endif.
if u search google u will get some posts where top of page is disabled and lines are shifted up
there could be an alternative solution to this
but u can try this for now .
Thanks
08-04-2009 6:35 AM
Hi Raju,
here is the link go through this i hope this will provide some help to u...
http://help.sap.com/search/highlightContent.jsp
thanks
Ashu
08-04-2009 6:45 AM
Hi Raju,
you should maintain line-count in declaration as
Report zdemo1 no standard page heading line-count 65(5)
line size 255.
Hope this will help you.
Regards,
Vijay