03-04-2011 1:09 PM
Hi,
Is it possible to run a Tcode report in background and have the results spooled to a file.
I know this is possible when running a TCode in the foreground interactively, but is there a way to automate this when running in the background?
Thanks for your help!
Andy
03-04-2011 1:12 PM
Yes this is possible by using GET_PRINT_PARAMETERS FM, you can directly redirect the spool output to a PDF file. There are some threads already available in SDN regarding this.
Regards
Ranganath
03-04-2011 1:12 PM
Yes this is possible by using GET_PRINT_PARAMETERS FM, you can directly redirect the spool output to a PDF file. There are some threads already available in SDN regarding this.
Regards
Ranganath
03-04-2011 1:38 PM
Ranganath...thank you for the reply.
So in the case of a standard SAP program, this would require an enhancement or user exit in order to call the FM?
Andy
03-04-2011 2:13 PM
In that case i would sugest to build a wrapper around your standard program, and call the srandard program using one of the two options,
1) Using submit statement with exporting list to memory option. Then read the list from memory using FM LIST_FROM_MEMORY, and then download this data to a file with regular FM's like GUI_DOWNLOAD.
2) Call the FM GET_PRINT_PARAMETERS, with New-page addition and call the standard program by SUBMIT program so that file can be downloaded to a file based on the spool generated.
Regards
Ranganath
03-04-2011 3:00 PM