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

Need help on spooling for program run in background

Former Member
0 Likes
1,797

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.

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
Read only

Former Member
0 Likes
1,605

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

Read only

joachimrees1
Active Contributor
1,605

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

Read only

former_member226519
Active Contributor
1,605

did you try LINE-SIZE 1023 statement?

Read only

kaus19d
Active Contributor
1,605

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

Thanks,

Kaushik

Read only

Sandra_Rossi
Active Contributor
1,605

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).

Read only

RaymondGiuseppi
Active Contributor
1,605

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

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,605

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.