DevOps and System Administration Discussions
Dive into SAP DevOps and system administration. Join discussions to collaborate on optimizing workflows, share knowledge, and leverage resources effectively.
Showing results for 
Search instead for 
Did you mean: 

Send Spool of background job via email - How to avoid sending email when there is no spool


I use the "Spool list recipient" functionnality in SM36 to send the result of a standard report by email. This report is executed via a background job running at a given frequency.

As explained here :

The issue is that quite often, the result of the report is empty. So no spool is generated. But the email is still sent.

Therefore the users receive most of the time emails without attachment. And sometimes there is an attachment. It's bothering them and they don't look at the emails anymore.

=> How can I avoid that emails are sent if no spool is generated?

Thanks in advance


0 Kudos

Anyone could help me?

Thanks in advance

Active Contributor
0 Kudos


I guess for suppressing empty emails you have to do this in an (own developed) ABAP program.

Switch off the "Spool list recipient" stuff in the job definition and add the own developed ABAP program after the step that (possibly) creates the spool list which has to be sent. If there is none, the own developed ABAP program would not find a spool list to be sent and does nothing.

I attached an ABAP that does the job. It's quite old and not adjusted to "modern" ABAP, but it still should work.

0 Kudos

A blank email will be triggered when there no output data if you add email id in "Email Notification" .

It can be avoided if you add the email id only in "Spool list recipient " .