cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Prevent Occurence of list header and page breaks in spool file of ALV Grid

Former Member
0 Kudos
7,757

Prevent Occurence of list header and page breaks in spool file of ALV Grid Display.

When we run the ALV in background and create spool request then:

Spool file output is coming like this.

Column1 Column2 Column3 Column4

data data data data

data data data data

data data data data

Column1 Column2 Column3 Column4

data data data data

data data data data

data data data data

But the required is like this

Column1 Column2 Column3 Column4

data data data data

data data data data

data data data data

data data data data

data data data data

data data data data

Please suggest a posible answer

Accepted Solutions (0)

Answers (4)

Answers (4)

dkle
Participant

Hello all,

if you have not yet solved this on your own, here is my solution: use a format type that has 60000 lines per page for your spool output device.

It all depends on the format type that was used for creating the spool output.

By default (in our system), we have 65 lines per page. And after each page the column headings of the ALV will appear.

What i did:

  1. create a new format type via transaction SPAD->full administration->device types->format types (copy an existing one)
  2. change"Number of Rows" to 60000 or something applicable
  3. edit the device type of your output device (e.g. LOCL) to contain the newly created format type (via SPAD; Button "Formats" in device type maintenance).

That's it! Be sure to use this format type for your output device in the "Background Print Parameters" window (-> Button "Properties").

Regards

Daniel Klein

All other parameters you discussed before didn't do it. All ALV-Settings will be overwritten by the output device settings and its print properties.

robert_hello
Explorer
0 Kudos

In addition, in a scenario where you don't want / can't use the SPAD to create a new format type, you can influence the number of lines (page break occurrence) during a single printout.

In order to do that, select the "Properties" available under a "Print Parameters" pop up window. Afterwards choose "Format" parameter name and adjust the number of rows.

Former Member
0 Kudos

Got it by myself

Former Member
0 Kudos

Hi,

I am also getting the page break problem when exporting the spool output to excel.

How did you solve the issue..?

Thanks & Regards,

Rajendra

Former Member
0 Kudos

Wa_ALV_print_Cat-no_new_page = 'X'.

Wa_ALV_print_Cat-no_print_listinfos = 'X'.

Wa_ALV_print_Cat-no_print_hierseq_item = 'X'.

Wa_ALV_print_Cat-no_print_selinfos = 'X'.

I tried all the paramaters. But when Spool request is created in the background then header are again coming.

To see the preview of the problem

Run txn code: VA05N.

In menu: goto Program -> Execute in Background.

Then check the spool request created in SP01.

Header are coming on every page created. Please help remove those list headers since output needs to be exported to the excel file.

Please help.

Former Member
0 Kudos

I have the same problem..Any help on this??

Former Member
0 Kudos

ya i implemented its solution...

When going for print Goto print-> click propeties TAB

Pop up appears.... parameter name-> general properties ->cover sheets-> select SAP cover Page uncheck the checkbutton.

parameter name->general properties -> Output-> uncheck the checkbutton named "Spool list with structure information"...

After these settings it prevents list header as well as page breaks, you can check with other options also. I think this would be helpful

Former Member
0 Kudos

I tried the same thing while running ME2N in background..Still the same problem..

Former Member
0 Kudos

Then you can try as in Properties There will be sunken box to specify the number of columns and number of rows...

Specify number of rows as 60,000 (upper limit). then in me23n you can restrict the list header and page breaks for upto 60,000 records.

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Mukesh,

In the FM: REUSE_ALV_GRID_DISPLAY, you have IS_PRINT.

In IS_PRINT, there is a field NO_NEW_PAGE. Pass 'X' to it.

This may solve your problem.

BR,

Suhas

WO1
Associate
Associate
0 Kudos
Please see https://me.sap.com/notes/2861244. It is required that you set print parameter 'Spool List with Structure Information' for the job step.