Application Development 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: 

Need help on spooling for program run in background

Former Member
0 Kudos

Hi Team, I have a Z-Report which takes 77 mins to run in background and hence I need to capture the complete output for the same in Excel. When I am trying to retrieve the output from the spool, I get only 17 columns whereas there are 32 columns in all. Need help to get the complete output in Excel sheet.

7 REPLIES 7

Former Member
0 Kudos

Hi,

When you say excel. Do mean csv or xls?

How is the data being written to spool.

I have done something similar in the past, and wrote the data to the spool in a csv format.

You could write the data to a bespoke table and then download from there.

Thanks

Martin

joachimrees1
Active Contributor

Hi Aditya,

how about setting the "line-size" argument of the REPORT statement to the maximum (which is 1023 according to F1-help on REPORT)?

best

Joachim

former_member226519
Active Contributor

did you try LINE-SIZE 1023 statement?

kaus19d
Active Contributor

Better before printing, can check in the Print-Preview, if its taking all the rows & columns in SAP

Thanks,

Kaushik

Sandra_Rossi
Active Contributor

If you can see all columns in dialog, I guess your report is an ALV Grid (Control Framework). In background, the output switches automatically to the ABAP List mode. You may do as Volker and Joachim suggested (LINE-SIZE 1023), or you may also define the Print Parameters if you start manually the background job, and select a very wide "List Format" (you may even create one;

SAP Library: Creating List Formats).

raymond_giuseppi
Active Contributor

Either use a wide width (e.g. LINE-SIZE 1023) and adjust columns width to minimize width, or export the extracted internal table to some INDX-like database table (EXPORT TO DATABASE) then provide user a transaction which import back this data and display it.

Regards,

Raymond

Jelena
Active Contributor
0 Kudos

If it's a custom report then why not just have it create an Excel file instead of going through spool?

There are tons of SCN posts already about the output getting truncated in background, just use Google. It can still find the old SCN posts in the archive.