Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Printing duplicates when Spooled

Former Member
0 Likes
778

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 .

5 REPLIES 5
Read only

Former Member
0 Likes
731

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.

Read only

0 Likes
731

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.

_______________________________________________

Read only

0 Likes
731

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?

Read only

0 Likes
731

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.

Read only

0 Likes
731

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.