08-06-2008 12:32 PM
Hi,
I have used ALV to display my report output. Now, when I run the report in background and check the spool , the header that I am printing using gt_list_top_of_page[] , repeats on all the pages.
How can I stop this in ALV? I just want the header to appear once in the spool.
Thanks & Regards
08-06-2008 12:37 PM
Please go through the document in the below link...
http://www.erpgenie.com/sapgenie/docs/Using%20ALV.pdf
you will get all the relevant information.
08-06-2008 12:40 PM
In ur top of page routine u a static variable to control it.
Pl. see this code block:
FORM top_of_page.
Local variable declaration*
STATICS: l_comm TYPE i. " Store user command
l_comm = l_comm + 1.
Check for print or print preview
IF ( sy-ucomm = c_prin OR
sy-ucomm = c_rnt_prev OR
sy-ucomm = c_rnt ).
IF l_comm = 1.
Write top of page info
ENDIF. " l_comm <> sy-ucomm
else. " << This is for normal display
Write top of page info
ENDIF.
ENDFORM. " top_of_page
08-11-2008 10:42 AM
thanks!!
it worked !!
Just need one more thing - user does not want the column names also to appear on each page. Basically he just wants column names to appear only once on starting of the list display in the spool.
Is it feasible to handle this in ALV?
Thanks & Regards
09-22-2008 5:56 AM