<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sending mail through FM : SO_NEW_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154556#M750249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here we go... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the 'To' email address.  " Receiver mail id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; clear buyer_receivers.&lt;/P&gt;&lt;P&gt; buyer_receivers-receiver = wa_zmala-smtp_addr.&lt;/P&gt;&lt;P&gt; buyer_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt; buyer_receivers-copy = ' '.&lt;/P&gt;&lt;P&gt; append buyer_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the 'CC' email address. " Reply back mail id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; clear buyer_receivers.&lt;/P&gt;&lt;P&gt; buyer_receivers-receiver = wa_zmala-rbmail.&lt;/P&gt;&lt;P&gt; buyer_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt; buyer_receivers-copy = 'X'.           " Indicates a carbon copy&lt;/P&gt;&lt;P&gt; append buyer_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the subject of the mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; concatenate sy-sysid wa_zmala-bukrs 'SINA' 'DocID'&lt;/P&gt;&lt;P&gt; wa_zmala-documentid wa_zmala-vname into subject_data-obj_descr&lt;/P&gt;&lt;P&gt; separated by '-'.&lt;/P&gt;&lt;P&gt; subject_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt; subject_data-sensitivty = 'F'.           " indicates functional&lt;/P&gt;&lt;P&gt; call function 'SO_NEW_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          document_type  = 'RAW'&lt;/P&gt;&lt;P&gt;          document_data = subject_data&lt;/P&gt;&lt;P&gt;          put_in_outbox = 'X'&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          object_content = object_content&lt;/P&gt;&lt;P&gt;          receivers = buyer_receivers&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;            too_many_receivers = 2&lt;/P&gt;&lt;P&gt;            document_not_sent = 3&lt;/P&gt;&lt;P&gt;            document_type_not_exist&lt;/P&gt;&lt;P&gt;            operation_no_authorization&lt;/P&gt;&lt;P&gt;            parameter_error&lt;/P&gt;&lt;P&gt;            x_error&lt;/P&gt;&lt;P&gt;            enqueue_error&lt;/P&gt;&lt;P&gt;         document_not_sent          = 2&lt;/P&gt;&lt;P&gt;         others                             = 99.&lt;/P&gt;&lt;P&gt;   case sy-subrc.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;   update zmalainbox set&lt;/P&gt;&lt;P&gt;          mail_date = sy-datum&lt;/P&gt;&lt;P&gt;          mail_time = sy-uzeit&lt;/P&gt;&lt;P&gt;   where documentid = wa_zmala-documentid.&lt;/P&gt;&lt;P&gt;   condense temp_mailid1. condense temp_mailid2.&lt;/P&gt;&lt;P&gt;   write: / temp_docid, text-002, temp_mailid1, ',', temp_mailid2.&lt;/P&gt;&lt;P&gt;   uline.&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;   write: / temp_docid, text-003.&lt;/P&gt;&lt;P&gt;   uline.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form initiate_mail_send_program.&lt;/P&gt;&lt;P&gt;       submit rsconn01 with mode = 'INT'&lt;/P&gt;&lt;P&gt;                       with output = 'X'&lt;/P&gt;&lt;P&gt;                       and return.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2007 06:49:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-12T06:49:44Z</dc:date>
    <item>
      <title>Sending mail through FM : SO_NEW_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154554#M750247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the Function Module : SO_NEW_DOCUMENT_SEND_API1 to send mails to MS Outlook. My program is working perfectly fine, when I execute in the foreground. However, when I schedule a job for the same program, it is throwing up an exception. Not sure if it something to do with the user authorization? In fact, user has full authorization. Could someone help on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 11:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154554#M750247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T11:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sending mail through FM : SO_NEW_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154555#M750248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please specify the exception. and if possible paste your function call(code) here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 12:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154555#M750248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T12:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sending mail through FM : SO_NEW_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154556#M750249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here we go... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the 'To' email address.  " Receiver mail id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; clear buyer_receivers.&lt;/P&gt;&lt;P&gt; buyer_receivers-receiver = wa_zmala-smtp_addr.&lt;/P&gt;&lt;P&gt; buyer_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt; buyer_receivers-copy = ' '.&lt;/P&gt;&lt;P&gt; append buyer_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the 'CC' email address. " Reply back mail id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; clear buyer_receivers.&lt;/P&gt;&lt;P&gt; buyer_receivers-receiver = wa_zmala-rbmail.&lt;/P&gt;&lt;P&gt; buyer_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt; buyer_receivers-copy = 'X'.           " Indicates a carbon copy&lt;/P&gt;&lt;P&gt; append buyer_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the subject of the mail.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; concatenate sy-sysid wa_zmala-bukrs 'SINA' 'DocID'&lt;/P&gt;&lt;P&gt; wa_zmala-documentid wa_zmala-vname into subject_data-obj_descr&lt;/P&gt;&lt;P&gt; separated by '-'.&lt;/P&gt;&lt;P&gt; subject_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt; subject_data-sensitivty = 'F'.           " indicates functional&lt;/P&gt;&lt;P&gt; call function 'SO_NEW_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          document_type  = 'RAW'&lt;/P&gt;&lt;P&gt;          document_data = subject_data&lt;/P&gt;&lt;P&gt;          put_in_outbox = 'X'&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          object_content = object_content&lt;/P&gt;&lt;P&gt;          receivers = buyer_receivers&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;            too_many_receivers = 2&lt;/P&gt;&lt;P&gt;            document_not_sent = 3&lt;/P&gt;&lt;P&gt;            document_type_not_exist&lt;/P&gt;&lt;P&gt;            operation_no_authorization&lt;/P&gt;&lt;P&gt;            parameter_error&lt;/P&gt;&lt;P&gt;            x_error&lt;/P&gt;&lt;P&gt;            enqueue_error&lt;/P&gt;&lt;P&gt;         document_not_sent          = 2&lt;/P&gt;&lt;P&gt;         others                             = 99.&lt;/P&gt;&lt;P&gt;   case sy-subrc.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;   update zmalainbox set&lt;/P&gt;&lt;P&gt;          mail_date = sy-datum&lt;/P&gt;&lt;P&gt;          mail_time = sy-uzeit&lt;/P&gt;&lt;P&gt;   where documentid = wa_zmala-documentid.&lt;/P&gt;&lt;P&gt;   condense temp_mailid1. condense temp_mailid2.&lt;/P&gt;&lt;P&gt;   write: / temp_docid, text-002, temp_mailid1, ',', temp_mailid2.&lt;/P&gt;&lt;P&gt;   uline.&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;   write: / temp_docid, text-003.&lt;/P&gt;&lt;P&gt;   uline.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form initiate_mail_send_program.&lt;/P&gt;&lt;P&gt;       submit rsconn01 with mode = 'INT'&lt;/P&gt;&lt;P&gt;                       with output = 'X'&lt;/P&gt;&lt;P&gt;                       and return.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 06:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sending-mail-through-fm-so-new-document-send-api1/m-p/3154556#M750249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T06:49:44Z</dc:date>
    </item>
  </channel>
</rss>

