Skip to Content
Author's profile photo Ravindra Devarapalli

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

/wp-content/uploads/2013/07/1_249278.png

Click on create button.

Enter name and title

click on f4 functionality in place of folder.

/wp-content/uploads/2013/07/3_249279.png

click on create folder

/wp-content/uploads/2013/07/4_249280.png

enter folder and name and click on enter

/wp-content/uploads/2013/07/5_249281.png

click on enter

click on Distr.list content tab

/wp-content/uploads/2013/07/6_249282.png

enter your mail id in place of recipient and Recip. type

/wp-content/uploads/2013/07/7_249283.png

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.

/wp-content/uploads/2013/07/8_249297.png

Step 2:  Execute Report with your requirement

T-code : MB5S

enter data in selection screen

/wp-content/uploads/2013/07/9_249298.png

Save as variant.

/wp-content/uploads/2013/07/10_249299.png


save

go to menu –> Program—>execute in back ground

/wp-content/uploads/2013/07/11_249300.png

/wp-content/uploads/2013/07/12_249301.png

/wp-content/uploads/2013/07/13_249302.png

click on date/time

select schedule start

/wp-content/uploads/2013/07/14_249303.png

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

/wp-content/uploads/2013/07/16_249304.png

Here i selected every 5 minutes i need  report results .

click on save.

/wp-content/uploads/2013/07/17_249305.png

Go to T- code SM37 :

enter Job name : * and execute

/wp-content/uploads/2013/07/18_249306.png

After five minutes you refresh the screen

/wp-content/uploads/2013/07/19_249309.png

/wp-content/uploads/2013/07/19_249309.png

/wp-content/uploads/2013/07/20_249308.png

It shows activity finished and it will show spool in the field of spool.

go to menu —> JOB —->chnage

/wp-content/uploads/2013/07/21_249310.png

/wp-content/uploads/2013/07/22_249311.png

click on spool list recipient

/wp-content/uploads/2013/07/23_249312.png

/wp-content/uploads/2013/07/24_249314.png

click on detail search

/wp-content/uploads/2013/07/25_249315.png

and enter and click on copy

click on F4 on recipient

/wp-content/uploads/2013/07/26_249316.png

and click on f5

/wp-content/uploads/2013/07/27_249323.png

save

You will get mail after five minutes with results of report.

/wp-content/uploads/2013/07/28_249324.png

/wp-content/uploads/2013/07/30_249326.png

Hope its helpful to all.

Assigned Tags

      43 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Ravindra,

      Thanks for sharing this document.

      Author's profile photo Ganesh Babu
      Ganesh Babu

      Hi ,

      it is very helpful to all consultants and users .

      Author's profile photo Sanjeet Kumar Yadav
      Sanjeet Kumar Yadav

      Hi Ravindra,

      Thanks a lot for very informative.

      Regards

      Sanjeet Kumar

      Author's profile photo Former Member
      Former Member

      Thanks, I wish there was a way to control the subject of the email.

      Author's profile photo Former Member
      Former Member

      Thank you so much Ravi for sharing. Indeed, very helpful.

      With Warmest Regards,

      Mahboob Rahman

      Author's profile photo Former Member
      Former Member

      Thanks for sharing the knowledge... Very useful information

      Author's profile photo Former Member
      Former Member

      Thanks,

      very informative and easy to understand

      Author's profile photo Praveen Kumar G
      Praveen Kumar G

      Hi ravi

      Thanks for the informative document

      Author's profile photo Former Member
      Former Member

      Thanks for sharing 🙂 Very useful !

      Regards

      Sathish

      Author's profile photo Former Member
      Former Member

      Hi Ravi,

      Thanks ...for providing useful information.

      Regards,

      Prashant

      Author's profile photo basavaraj evani
      basavaraj evani

      Excellent Posting 🙂 ...........

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Ravindra Devarapalli
      Ravindra Devarapalli
      Blog Post Author

      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.

      Author's profile photo Siva kumar Devana
      Siva kumar Devana

      very good effort.

      regards,

      siva kumar

      Author's profile photo Ravindra Devarapalli
      Ravindra Devarapalli
      Blog Post Author

      Thank x Siva Kumar.

      Author's profile photo Former Member
      Former Member

      Good Document. Very well explained with screenshots.

      Author's profile photo Former Member
      Former Member

      very good..nice document...

      Author's profile photo Krishna Chaitanya
      Krishna Chaitanya

      Hi Ravindra

      Very informative and nicely explained.

      Regards,

      Krishna Chaitanya

      Author's profile photo Ravindra Devarapalli
      Ravindra Devarapalli
      Blog Post Author

      Thank u ........ 🙂

      Author's profile photo Former Member
      Former Member

      very impressive...

      Author's profile photo Ravindra Devarapalli
      Ravindra Devarapalli
      Blog Post Author

      Thank u very much

      Author's profile photo Ralph Kerschbaumer
      Ralph Kerschbaumer

      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

      Author's profile photo Gaurav Sharma
      Gaurav Sharma

      Very knowledgable.

      Author's profile photo PRASOON AK
      PRASOON AK

      Hi Ravindra,

         Nice document and beautifully presented.

         Thanks for sharing.

      Regards,

      AKPT

      Author's profile photo Sudeep A
      Sudeep A

      A useful document. Very good information. Thank you..

      Regards,

      Sudeep.

      Author's profile photo Former Member
      Former Member

      Very Useful Document. Thank you

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Ravindra Devarapalli
      Ravindra Devarapalli
      Blog Post Author

      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

      Author's profile photo Abhishek Sehgal
      Abhishek Sehgal

      Nice One thanks.... if you can help me in getting the same in excel format it would greatful

      Author's profile photo Former Member
      Former Member

      Excellent article. Thanks for posting. Its very informative and helpfull

      Author's profile photo Vikash Babu Sharma
      Vikash Babu Sharma

      Nice One thanks... and please tell me how to kill or stop that periodic job...??

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Former Member
      Former Member

      Very useful.

      Author's profile photo Sanjeet Kumar Yadav
      Sanjeet Kumar Yadav

      Raja,

      Can you tell me once the created, how to delete express mail option.

      Author's profile photo Aparna Hegade
      Aparna Hegade

      Hi,

      Very useful document. Thanks for sharing.

      Regards,

      Aparna

      Author's profile photo Former Member
      Former Member

      Nice explanation with screen shots.

      Author's profile photo Sudhakar Chaganti
      Sudhakar Chaganti

      Its a new topic to me and very useful doc

      Thanks

      Sudhakar

      Author's profile photo Gaurav Solanki
      Gaurav Solanki

      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

      Author's profile photo Darren Heslin
      Darren Heslin

       

      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

      Author's profile photo Saqlain Arham
      Saqlain Arham

      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

      Author's profile photo Hai VU
      Hai VU

      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.

      Author's profile photo Ravi G
      Ravi G

      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.

       

      Author's profile photo raju M
      raju M

      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.