Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Send mail when job fails

Former Member
0 Kudos

Hi ,

I have a job scheduled to run every 10 mins in SM37.

I have a requirement that i have to send mails to a couple of people everytime the job fails.

How can i go about doing this?

3 REPLIES 3

Former Member
0 Kudos

Schedule Job from your Program and send the email using the FM 'SO_NEW_DOCUMENT_SEND_API1'.

Follow:

http://www.saptechies.com/send-mail-from-background-job/

Former Member
0 Kudos

>

> Hi ,

>

> I have a job scheduled to run every 10 mins in SM37.

> I have a requirement that i have to send mails to a couple of people everytime the job fails.

> How can i go about doing this?

hi Sivasakthi,

read the table TBTCP and check the job status if it is 'S' that means the job is executed successfull

else the job is not completed or check for status 'C that means job is failed..

the send a mail using ..

RS_SEND_MAIL_FOR_SPOOLLIST - Send message from ABAP/4 program to SAPoffice.

SO_NEW_DOCUMENT_SEND_API1 - Sending express mail ( SAP office )

RS_SEND_MAIL_FOR_SPOOLLIST - Send message from ABAP/4 program to SAPoffice.

SO_NEW_DOCUMENT_ATT_SEND_API1 - SAPoffice: Send new document with attachments via RFC

regards,

Prabhudas

Former Member
0 Kudos

thanks