2007 Mar 14 8:57 PM
I have a requirement where i need to run the transaction stad on a daily basis for a particular id for the preceeding 24 hrs and send the output through an email to two particular persons. I have written the wrapper program for the transaction but how do we store the output in a file.
2007 Mar 14 9:21 PM
Hi,
Why don't you create and schedule a job (SM36) to run program RSSTAT20 with defining spool list recipient to send out the output file?
First, you need to setup distribution list with all user email address (SBWP) which like to receive the output report. Then you can attach the distribution list to the above spool list recipient.
Regards,
Ferry Lianto
2007 Mar 14 9:11 PM
You need not store in the file if you are sending the mail from the program only.
Just pass your resultant table directly to the Email Function Module.
Regards,
Amit
Reward al helpful replies.
2007 Mar 14 9:13 PM
i dont have the output in any time .. i have to send the output of the transaction stad. I have an idea of how to send an email with an attachment . My problem is how to get the output of the transaction to a file
2007 Mar 14 9:17 PM
I just executed the transaction and it gives a list output. Then you can use the Submit statement and export the list to memory. Then later get back the list output from the memory and attach it to the email.
For more details on how to do this refer:
/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
Hope this helps,
Sudhi
2007 Mar 14 9:18 PM
2007 Mar 14 9:23 PM
Use -
SUBMIT RSSTAT26 and return exporting list to memory.
Now call function LIST_FROM_MEMORY.
This will give you the output in the table now you can use that.
Regards,
Amit
2007 Mar 14 10:00 PM
Go through the weblog:
/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface
There is a smaple code as well of how you can extract the list output and send it in the mail.
2007 Mar 14 10:14 PM
Sudhi,
I checked the example before also. Its pretty helpful . I am thinking instead of coding if we can set the spool list recipients . what do u suggest ? which one is better.
2007 Mar 14 10:27 PM
It is upto you to choose the method. Of course the spool list recipients do not have any coding involved. In the method of sending the mail through the Function module you can do much more fancier things like sending it to a distribution list and changing the format of the mail by reading it from a standard text.
It depends on how our client wants it!
All the best,
Sudhi
2007 Mar 14 10:36 PM
Thanks. Let me try doing it with the program just like the way you said. I appreciate your response
2007 Mar 14 9:13 PM
Hi,
Does this transaction give a list output by any chances. If yes then you can use the Function module SO_DOCUMENT_SEND_API1 to send the output of the report as an 'ALI' (ABAP List output attachment).
Hope this helps,
Sudhi
2007 Mar 14 9:21 PM
Hi,
Why don't you create and schedule a job (SM36) to run program RSSTAT20 with defining spool list recipient to send out the output file?
First, you need to setup distribution list with all user email address (SBWP) which like to receive the output report. Then you can attach the distribution list to the above spool list recipient.
Regards,
Ferry Lianto
2007 Mar 14 9:58 PM
I am not supposed to create the batch job . My lead does that so i will ask him if he can create a spool list recipient to send the output file. I think this is the easiest way instead of changing the program. I appreciate others also for their replies.