INTRODUCTION:
Lately I came across a requirement for sending spool details of a report through mail which gets executed in a background job.
On the first glance it looked like a cakewalk as it can be achieved with a couple of function modules in the program.
But now for the following reasons I was wondering why modifying the program for such task is not advisable.
1. Where to maintain the user id’s? It can’t be hard coded in program.
2. What if multiple user want the mail? How frequent this list will change?
So I started looking for other options.
There is an option of spool list recipient in SM36 while defining a background job where we can define the user id of the user who wish to receive the spool for the background job.
So any user who’s id is mentioned in the spool list recipient of the job would receive a mail in SAPoffice: Inbox(Tcode-So01) / Business workplace ( Tcode-SBWP)
Now once you schedule the job and the job is finished you will receive a message in your sap office inbox.
Now most of the users don’t check their SAP Office inbox often and also I need a group of people to be mailed for a single background job.
Now we will see how we can create a mail distribution list.
T-code : So23. You can also create it from Business workplace (T-code: SBWP).
Fill in all the required attributes.
In the distribution list content you can specify the external mail addresses which you want to include in the mailing group.
Note : Please make sure that your SMTP server is configured.
Also Check the following setting in SAPconnect Administration :
1. Go to transaction SCOT.( SAPconnect Administration).
2. Click on the SMTP node inside INT node. -> Go to maintain Node.
3. Click On the Set Button for Internet Supported address types.
4. Ensure that in the address area either your mailid or wildcard * is maintained.
5. Here you can also change the Output format of SAP document. By default for ABAP List the attachment would be in Html format.
Now every time a Spool is created for the job it will be immediately mailed to persons maintained the Distribution list.
Related posts
- Create a Web Service in 10 Minutes
- Enhancement of Code Inspector
- Learn SAP Best Practices for all SAP Modules
- SAP ALV Excel Inplace with with macro recording
- Try out SAP ABAP Quiz
- Webdynpro ABAP application to locate Employee’s location into google map
- SAP Teched 2011 Certification List with Cut Off Marks
- Field exit in sap abap with tutorial
- Ever Tried game in SAP ?!?!
- SAP ABAP interview questions and answers



















Dess
Awesome! I’m currently brainstorming on this and thank god I found this post. I don’t have full access in Tcode - So23 but I can access SBWP. Thank you again for this very informative post! Keep posting!
Dess
Awesome! I’m currently brainstorming on this and thank god I found this post. I don’t have full access in Tcode - So23 but I can access SBWP. Thank you again for this very informative post! Keep posting!
John V.
I have problem vith attachment. Aatt. is in format VIA, but i need format txt.
Thanks for information.
Ajay
Hi John,
You have an option in tcode SCOT for “Output format of SAP Documents” where you can define it as txt.
Please check the last screen shot of the article.
Thanks
Ajay
Reshma
Hi,
I want to change the receipent in the spool list.
It’s a single user.
Please help me with how I can change the receipent in the existing scheduled job?
Regards,
Reshma
Ajay
Hi Reshma,
You can very well do that as well. Please make sure that you can only modify the scheduled jobs.
1. Select your job in SM37 and goto Job->Change.
2. Click on Spool List recipients and fill in the recipient name with address type. i.e external mail address/ internal mail address etc.
Make sure that you have all your SMTP settings intact.
Let me know incase you are stuck somewhere.
Cheers
Ajay
ajay@sapignite.com
pratibha
Hi ajay,
I found ur article very useful. In my case i have to attach alv report output in excel format to email,this excel contains mnay columns, in sap inbox im getting mail,but format is not proper.please suggest me what i have to do to get, my mail attachment in proper excel format.
admin
Dear Pratibha,
The spool which is generated by the program is mailed. If you want to alter the format then either you need change the program or write a custom code for it.
Thanks
Ajay
Gurinder Singh
hi Ajay,
Your Post is nice and very useful for me, but i don’t know how to set spool, when I run reports in the background as you told, after getting the status as complete, I have to manually SPOOL it so that it can mailed to my Workplace.
Kindly tell me what Transaction code or authorisation required for this.
Ajay
Hi Gurinder,
I am not bit clear with your question. You can’t generate spool manually it gets generated automatically in background.
You can check them with Tcode SP01.
Request you to elaborate a little on where exactly you are stuck
Thanks
Ajay
Praveen Kumar Sharma
Hi Ajay,
I think you may be able to help me. when I use ME9F t-code to print POs in PDF format, it goes to my SAP inbox but I don’t have access to my inbox(SBWP). I remember once I had entered into SAP inbox(accidentally), but at that time I didn’t know that I didn’t have access. I want it now. Is there any other way of going to SAP inbox?
Thanks in advance.
Praveen
Ajay
Hi Praveen,
You can use tcode : so01 which is for SAP Inbox. If you don’t have access to this then go to se37 and run fm : c160_transaction_call and execute to directly enter tcode. This helps to skip the authority check maitained at tcode level.
There are thousands of way of doing it.
Let me know if it works for you..
Cheers
Ajay
Francis Talam
Hi Ajay,
I have a background job that send spool list to email recipients but they are not receiving all the spool lists since these job produce 2 spool lists. They only receive the last spool list. The first spool list is not mailed. Do you know how to send all the spool lists?
Thanks,
Francis