Application Development 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: 

storing the output of a transaction

Former Member
0 Kudos
318

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.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos
248

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

12 REPLIES 12

amit_khare
Active Contributor
0 Kudos
248

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.

0 Kudos
248

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

0 Kudos
248

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

0 Kudos
248

how to get the list output in a file through the program.

0 Kudos
248

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

0 Kudos
248

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.

0 Kudos
248

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.

0 Kudos
248

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

0 Kudos
248

Thanks. Let me try doing it with the program just like the way you said. I appreciate your response

0 Kudos
248

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

ferry_lianto
Active Contributor
0 Kudos
249

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

0 Kudos
248

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.