2009 Nov 25 5:57 AM
Hi experts,
I am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send an mail to internaet address. There is explicit COMMIT WORK written after FM call.
I have scheduled a job in Production to so. But it is not working. No mail is sent when i checked in SOST.
Also When I run the program in foreground it works fine and sends mail.
Please suggest.
Hi experts,
I am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send an mail to internaet address. There is explicit COMMIT WORK written after FM call.
I have scheduled a job in Production to so. But it is not working. No mail is sent when i checked in SOST.
Also When I run the program in foreground it works fine and sends mail.
Please suggest.
2009 Nov 25 6:16 AM
Hi,
When you schedule a job, check whether the user(in the step definition) has enough authorizations to send mail. Check the SCOT setting also in meantime. Also check in the your SAP outbox.
Contact the Basis for the same, they can help.
Regards,
Aditya
2009 Nov 25 9:24 AM
Hi vinit,
Adding to Aditya's post you can also write below code after calling function module SO_NEW_DOCUMENT_ATT_SEND_API1.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
IF sy-subrc <> 0.
WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.
This rsconn01 program is used to send file from application server to SMTP. so there is no need to go to SOST, SCOT, SBWP for sening mails.
Also you can check from SCOT transaction. if you find documnets are pending in SCOT then execute the send process.
it will work for you.
As you mentioned you have scheduled a job in production system and it's not working. The reason behind this may be heavy load on background workprocessor. Usually in production system a bunch of background jobs run simultaneously so the less priority jobs will have to wait. You can see it either tranaction sm50 also. You change the job priority to high. May be it will work.
Regards,
Sourabh Batwara
Edited by: Sourabh Batwara on Nov 25, 2009 2:55 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |