SAPBR Technologies home

SAP in Brazil, explained

Report results via e-mail / distribution lists / periodic jobs

Users often ask me to run a report on a schedule and email them the results automatically.

Here’s how to do it with SAP distribution lists. There are other ways, but this one is simple and straightforward.

In this example I schedule report MB5S (List of GR/IR Balances) to run periodically and send the results to the email addresses I choose. The same steps work for nearly any report.

Illustration

Create the distribution list

  • Go to SO23 and click Create.
SAP screen: Create the distribution list
  • Click Folder, then the search help (match code).
SAP screen: Create the distribution list
  • Click Create Folder.
SAP screen: Create the distribution list
  • Enter the folder name and description, and complete the other fields on this screen.
SAP screen: Create the distribution list
  • Click Continue on the screen above and the one below.
SAP screen: Create the distribution list
  • Enter the distribution list name and description, and select the folder (the names don’t need to match).
SAP screen: Create the distribution list
  • Click the Distr. list content view.
  • Enter all the email recipients:
SAP screen: Create the distribution list
  • Click Save. This isn’t transportable, so create it directly in the target client (production, for example).

Create the job

  • Go to MB5S (or any report whose results you want to email).
  • Enter the selection criteria.
SAP screen: Create the job
  • Create a variant.
SAP screen: Create the job
  • Select your variant.
  • Go to Program > Execute in Background.
SAP screen: Create the job
  • Click Continue.
SAP screen: Create the job
  • Click Date/Time.
  • Select a start date and time.
  • Select the Periodic job checkbox and click Period Values.
SAP screen: Create the job
  • Choose how often the job runs (which is also how often the user gets the email).
SAP screen: Create the job
  • Once you’ve chosen the period, click Save, then Save again.

Assign the distribution list to the job

  • Go to SM37 and find your job.
SAP screen: Assign the distribution list to the job
  • Select the job and go to Job > Change.
SAP screen: Assign the distribution list to the job
  • Click Spool List Recipient.
  • Click Recipient, look for distribution lists, pick the one you created, press Enter and click Copy.
SAP screen: Assign the distribution list to the job
  • The job runs at the date and time you chose. When it finishes, everyone in the distribution list gets the results, like this:
SAP screen: Assign the distribution list to the job
SAP screen: Assign the distribution list to the job

That’s it. Easy, and it works with any report that can run in the background.

Comments

Leave a Reply