Flipkart.com

Tuesday, April 12, 2011

Hiding repetitive 'Top of Page' and column headers in spool output of a report

Hi team,

Scenario: You run a report in background and get the output in a spool, and you have output spanning multiple pages. Since the spool output has multiple pages, there will one page header and one column heading for each page.


Problem: When you download the spool into an spreadsheet, spreadsheet will have multiple headers and column headings, which is unnecessary in the spreadsheet hence needs to be cleaned up. This is a manual intervention and clients usually do not want it.

Requirement:  Spool to have only one 'top of page', and only one column header.

Solution 1: When you schedule a report in background mode, you will be asked to enter  a dummy printer, which will also ask the format of the output.

Click on Properties,

Note: I have entered 60000 in rows column. That means that spool will create one page for 60000 rows. hence there will be only one Top-of-page and only one column header for 60000 rows. 60000 is the maximum limit with this solution.

Solution 2: 
This solution is at "Top-of-Page" event.   
Here is the code.
if sy-pagno EQ 1.
  Call the top-of-page event code.
endif.

4 comments:

  1. Good day! I just wish to offer you a huge thumbs up for the excellent information you have right here
    on this post. I am coming back to your site for more soon.


    Here is my web blog; Private Krankenversicherungen

    ReplyDelete
  2. It was very nice article and useful to SAP learners. we also provide SAP SR course online training our Cubtraining is leader in providing Software Training

    ReplyDelete