Skip to Content
author's profile photo Former Member
Former Member

Mail not being sent for a background job scheduled.

Hello all,

We have a report which is scheduled in background. The job runs for every 10 mins in development server and sends the status to various mail IDs. The job runs successfully and the status shows as 'FINISHED'. But users are not able to recieve the mail.

Mails are sent using the FM "SO_DOCUMENT_SEND_API1".

When the debug the report everything works fine and the user recieved the mail. Any pointers to this would be of great help.

I tried searching in SDN for existing posts but could not find any relevant thread.

Thanks in advance.

Regards,

Chandra.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 07, 2009 at 11:55 AM

    Hi,

    Check the email id of background user used to send the mails in user profile.

    It should be valid email id as SAP internally needs a valid mail id of the user which it is using to send the mail.

    When you execute in foreground its your user id which is used to send mails. I feel that your user profile contains a valid email address. Also, check if any configuration is missing in SCOT or SOST transactions.

    KR Jaideep,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2009 at 12:05 PM

    Hello Chandra,

    Can you please share the code how you are calling the FM: SO_DOCUMENT_SEND_API1?

    Please revert back.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      PFB piece of code showing how the FM is called.

      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

      EXPORTING

      document_data = wa_doc

      sender_address = wf_sender

      sender_address_type = 'SMTP'

      TABLES

      packing_list = it_paklist

      object_header = it_obj_head

      contents_bin = it_obj_bin

      contents_txt = it_obj_txt

      receivers = it_obj_rcv.

      Also , please note that this report has been scheduled some time in last year i.e. 2008 and it was running successfully by sending mails. But from past 2 months the report is not sending mails.

      Regards,

      Chandra

      Edited by: Chandra A on Sep 7, 2009 2:17 PM

      Edited by: Chandra A on Sep 7, 2009 2:17 PM

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2009 at 12:10 PM

    Hi,

    It may be because of the delay in the SCOT, you can try the following code after calling the above said mail send FM;

    SUBMIT rsconn1 WITH MODE = 'INT' WITH OUTPUT = ' ' AND RETURN.

    Regards

    Karthik D

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2009 at 12:20 PM

    Check in debug mode(of background scheduled report) whether I_Receiver has any values?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.