Periodically auto generation of Report in background and send result to user mail ID
Hi,
This is common requirement getting from client. I want to share this to all. I hope for freshers and users it is helpful;
Requirement : GR value and qty , IR value and qty and balances can be viewed on purchasing organization basis using the T Code: MB5S. User requirement is need results for this report automatically through mail to HOD every day.
Means every day for this report results need to send automatically mail with out executing manually.
The below are steps for achieving this requirement.
Step 1: create Distribution lists in SO23
Click on create button.
Enter name and title
click on f4 functionality in place of folder.
click on create folder
enter folder and name and click on enter
click on enter
click on Distr.list content tab
enter your mail id in place of recipient and Recip. type
Here three boxes is there , purpose of these is
1) Send Express :
If you select this field, this document is sent to the recipient as an express message. A dialog box then appears informing the user that an express document has been sent, allowing him/her to switch to the inbox.
2) Send Copy :
If you select this field, the user receives the document as a copy. This means the user receives the document for his/her information and does not need to take any action.
3) Send : blind copy :
If this field is selected, the recipient receives the document as a blind copy.
Save.
Step 2: Execute Report with your requirement
T-code : MB5S
enter data in selection screen
Save as variant.
save
go to menu –> Program—>execute in back ground
click on date/time
select schedule start
and click on Period Values
Here you can select period values like hourly ,daily, weekly, monthly , other period means you can select job start like every minitiues
Here i selected every 5 minutes i need report results .
click on save.
Go to T- code SM37 :
enter Job name : * and execute
After five minutes you refresh the screen
It shows activity finished and it will show spool in the field of spool.
go to menu —> JOB —->chnage
click on spool list recipient
click on detail search
and enter and click on copy
click on F4 on recipient
and click on f5
save
You will get mail after five minutes with results of report.
Hope its helpful to all.
Hi Ravindra,
Thanks for sharing this document.
Hi ,
it is very helpful to all consultants and users .
Hi Ravindra,
Thanks a lot for very informative.
Regards
Sanjeet Kumar
Thanks, I wish there was a way to control the subject of the email.
Thank you so much Ravi for sharing. Indeed, very helpful.
With Warmest Regards,
Mahboob Rahman
Thanks for sharing the knowledge... Very useful information
Thanks,
very informative and easy to understand
Hi ravi
Thanks for the informative document
Thanks for sharing 🙂 Very useful !
Regards
Sathish
Hi Ravi,
Thanks ...for providing useful information.
Regards,
Prashant
Excellent Posting 🙂 ...........
Hi,
Thanks, very useful information...
I have tried this for one of our customized (Z-report) report and is not working.
Whether this will work only for standard SAP reports?
Regards
Nireesh
First check whether back ground job is working for your customized report. If it is working in up to SM37 then it will work for mail triggering also.
Check in SCOT, for object name INT, mail host and mail port is assigned currectly or not.
very good effort.
regards,
siva kumar
Thank x Siva Kumar.
Good Document. Very well explained with screenshots.
very good..nice document...
Hi Ravindra
Very informative and nicely explained.
Regards,
Krishna Chaitanya
Thank u ........ 🙂
very impressive...
Thank u very much
Hi Ravindra,
very good post for consultants to avoid development costs.
If you know is there a way to rename the mail/attachement title?
Regards,
Ralph
Very knowledgable.
Hi Ravindra,
Nice document and beautifully presented.
Thanks for sharing.
Regards,
AKPT
A useful document. Very good information. Thank you..
Regards,
Sudeep.
Very Useful Document. Thank you
Very useful document.
I am setting up same for my client, but unable to send same in excel format, can u please guide me how to send same in excel format.
Regards
Rashid
Hi,
As my understanding, We can't send same in excel format. Because excel format is a an option to download the data from Report. In our document we are generating report as peridoically and sending same data in to mail.
I hope it is not possible to send same in excel format.
Try with development.See below attachment.
Formatted Excel as Email Attachment - Code Gallery - SCN Wiki
Regards,
Ravindra
Nice One thanks.... if you can help me in getting the same in excel format it would greatful
Excellent article. Thanks for posting. Its very informative and helpfull
Nice One thanks... and please tell me how to kill or stop that periodic job...??
Thanks to this article, i know my question was not relate to this page, but ill take my chance on the last screenshot the report already send to your email, now my question was how did you group the report? is that layout in SQVI? hoping for your answer or if there's any link let me it would a great help for me thanks
Very useful.
Raja,
Can you tell me once the created, how to delete express mail option.
Hi,
Very useful document. Thanks for sharing.
Regards,
Aparna
Nice explanation with screen shots.
Its a new topic to me and very useful doc
Thanks
Sudhakar
Hi,
Its a great document and well defined by you.But I am facing a problem that mail is not going at external mail id while I followed same step as you mentioned.
Thanks
Regards
Gaurav Solanki
Hi there, this is a really clear guide so thank you. One question;
Is there a way to adjust the file name of the file that is sent out? I would like to set up a different file name if possible that will be sent on an e-mail.
Kind Regards
Darren
Dear All,
Any idea about crystal report email ?, normal ALV report are successfully going and received, but the ALV reports which convert on crystal report is not received.
Atif Arham
Hi, its useful document. However, when I tried it the reports are being sent to SAP inbox (TC sbwp - Business Workspace) instead of the specified external email address.
Can someone please let me know how I can get reports sent to an external email address. By the way, due to data privacy, the external email address i used is also the same as the one in my SAP profile.
Dear Ravi
I am using this option , but i facing some option in the output
Only i am able to receive 1000 records in mail , is there any option where we increase or we will get the full report
Regards.
Hi Ravi,
The detailed explanation is very helpful indeed. Would you please throw some light on option to not send a mail when data is blank. Mails are send with blank body message. Some of reports with variant get triggered & are send to external address, but in case the report has no DATA want to stop such mails.