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

Spool output

Former Member
0 Likes
723

Hi,

I have a Z report that has a character width of approx 2000 characters. We cannot run this report in the background since the spool gets truncated(list format max being 1023) and the output is useless. Can someone suggest a way to run this report in the background so that the output can be downloaded in excel with each record in a single row and not divided into multiple rows.

Thanks in advance.

4 REPLIES 4
Read only

rui_nunes
Explorer
0 Likes
593

You can change the program to download the report directly into a file instead of using the spool/report output. I think it's the best way to do it if you want to run the report in background mode.

Hope it helps,

Rui

Read only

Former Member
0 Likes
593

Hi Rui,

Thanks for the reply. I am not a technical consultant. Can you please tell me what you mean by writing directly to file? Do you mean write a custom ABAP code to write it to an excel file once the program is run in the background or would it be a basis function?

Read only

Former Member
0 Likes
593

It has to be ABAP code change.

You mentioned that it is a Z report. This report needs to be modified.

In the code have something like this


IF SY-BATCH EQ 'X'.
* Program is running in background.
* Download to file code here. 
* Also, you will have to do it using the OPEN DATASET
* commands. IN background, you cannot use any of the
* GUI/OLE related functions
* Since you said that you are not technical, please consult your ABAP programmer regarding this.
ELSE.
* Current online report code.
ENDIF.

Hope it clarifies your doubt.

Regards,

-Ramesh

Read only

Former Member
0 Likes
593

When the job is running in batch, the files can be stored in Application server - Unix.

Better Use INDX table to store the data in Unix and retrive the same using EXPORT and IMPORT statments. Download the data to the presentation server from application server and you can get the output as you wish.If you need the format also I can help you.

Warm Regards,

Baburaj