‎2007 Oct 25 4:41 AM
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,
‎2007 Oct 25 4:44 AM
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
‎2007 Oct 25 4:44 AM
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
‎2007 Oct 25 4:46 AM
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
‎2007 Oct 25 4:48 AM
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
‎2007 Oct 25 4:56 AM
if i submit it in background how to download as text file in my pc
Thank you
‎2007 Oct 25 4:58 AM
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
‎2007 Oct 25 4:44 AM
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
‎2007 Oct 25 5:03 AM
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
‎2007 Oct 25 5:07 AM
Yes, and to tell you once again, if you add that check in report then you will not be able to see spool.
ashish
‎2007 Oct 25 5:18 AM
‎2007 Oct 25 5:18 AM