‎2007 Oct 03 7:11 PM
Hi , I have a ALV grid with top of page event. THis is done entirely in OOPS. Now when I give a print with out creating a spool , then it is fine . If I also check the spool , then the printout has multiple top of page printed , however the ALV remains the same. How can I flush out the top of page and set it to print only once.
Thank you .
‎2007 Oct 03 7:30 PM
Put a condition in top of page event which will trigger the headings only once. For eg
IF SY-PAGNO = 1.
Paste your logic here
ENDIF.
‎2007 Oct 03 7:43 PM
My top of page contains abc ,
Ok ,, this is what the print out looks like if I spool it 3 times
abc
abc
abc
_________________________________________________
ALV data here.
________________________________________________
and it should look like
abc
________________________________________________
ALV data here.
_______________________________________________
‎2007 Oct 03 7:46 PM
I did not understand your comment "If i spool it 3 times".
Can you check if the internal table to store comments is getting refreshed correctly?
‎2007 Oct 03 7:53 PM
spooling 3 times means , I click on the print button in the ALV container and check the spool option and press continue , then again I click on print button and check the spool option and click continue , finally I click on the spool and the print check boxes and then press continue ,
What is happening is that the top of page is being stored in the memory as many times as the spool occured , while the ALV is getting cleared. THis is the problem.
‎2007 Oct 03 7:56 PM
Can you check this program BCALV_TEST_LIST_PRINT provided by SAP to print list. As I will not be able to see your program, i hope this program code will guide further.