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 request

Former Member
0 Likes
1,201

I got a requirement saying that

when the program is executed in background it is generating spool file

but they dont want the spool file to create

its normal alv report

can anyone tell me how to do it

thank you,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,169

Hi,

If you run any program in background and if there is a ALV, then it is going to create a spool request.

You can add a a check in your program IF SY-BATCH = space, then only you should call the ALV function module.

But if the program is run in background, how do you want report output to be displayed? Do you want to mail list to user?

ashish

10 REPLIES 10
Read only

Former Member
0 Likes
1,170

Hi,

If you run any program in background and if there is a ALV, then it is going to create a spool request.

You can add a a check in your program IF SY-BATCH = space, then only you should call the ALV function module.

But if the program is run in background, how do you want report output to be displayed? Do you want to mail list to user?

ashish

Read only

0 Likes
1,169

no just i want to download the output into a text file

there is a selection screen parameters to enter file name

when i run it in the background it should not create spool file how to make it

Read only

0 Likes
1,169

Hi,

In that case before calling ALV function module put a condition IF SY_BATCH = SPACE. This will display ALV only in foreground.

Also make sure that the file download is for Application server as Background job does not support Presentation server download.

Hope this helps.

ashish

Read only

0 Likes
1,169

if i submit it in background how to download as text file in my pc

Thank you

Read only

0 Likes
1,169

IF you run your program in background, then you can not download program in foreground. That is a limitation by SAP. You will have to download file to unix server.

ashish

Read only

Former Member
0 Likes
1,169

Hi,

You can delete the spool request using Function Module "RSPO_R_RDELETE_SPOOLREQ".

Even in background, if you want to display ALV & dont want spool, then refer this blog:

/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

Best regards,

Prashant

Read only

Former Member
0 Likes
1,169

Thank you ashish thank you very much

Just i need to check SY-BATCH eq Space

before calling ALV function module

thats it right

Thanks

Read only

0 Likes
1,169

Yes, and to tell you once again, if you add that check in report then you will not be able to see spool.

ashish

Read only

Former Member
0 Likes
1,169

Thank you Ashish

Read only

Former Member
0 Likes
1,169

Thank you Ashish and everyone