<?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: SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669190#M1098311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt; try this also  SO_OBJECT_SEND  . just give a try.........points if answer is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Oct 2008 15:14:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-15T15:14:10Z</dc:date>
    <item>
      <title>SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669187#M1098308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using 4.6c version and i would like to send emails from abap report to external users.&lt;/P&gt;&lt;P&gt;i am using the above function module and i tried all the examples discussed in forums.&lt;/P&gt;&lt;P&gt;but i am getting exception  DOCUMENT_NOT_SENT = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to maintain anything in SCOT OR SU01 ....Transactions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once again i tried all the examples in diff abap sites,but when the point reachecs to function&lt;/P&gt;&lt;P&gt;SO_NEW_DOCUMENT_ATT_SEND_API1 i am getting the above exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone got this kind of problem...?&lt;/P&gt;&lt;P&gt;Kindly advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2008 21:14:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669187#M1098308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-14T21:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669188#M1098309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You usually get this if you email id is not correct... Check the email ids and also check the receiver type... if you are sending through to a dist. lsit it should be of type 'C' .. Create the dist. list in SO23 and then pass 'X' to express mail option...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg..&lt;/P&gt;&lt;P&gt;      receiver-receiver  = dist list.&lt;/P&gt;&lt;P&gt;      receiver-express  = 'X'.          " Express mail&lt;/P&gt;&lt;P&gt;      receiver-rec_type = 'C' for dist. lsit and 'U' for internet address..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regds,&lt;/P&gt;&lt;P&gt;Madan...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2008 01:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669188#M1098309</guid>
      <dc:creator>madan_ullasa</dc:creator>
      <dc:date>2008-10-15T01:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669189#M1098310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using sap 4.6c&lt;/P&gt;&lt;P&gt;just i want to send an attachements from abap using SO_NEW_DOCUMENT_ATT_SEND_API1 function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the example program i am using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: psubject(40) type c default  'Hello',&lt;/P&gt;&lt;P&gt;            p_email(40)   type c default 'MY VALID EMAIL ID' .  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:   it_packing_list like sopcklsti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        it_contents like solisti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        it_receivers like somlreci1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        it_attachment like solisti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        gd_cnt type i,&lt;/P&gt;&lt;P&gt;        gd_sent_all(1) type c,&lt;/P&gt;&lt;P&gt;        gd_doc_data like sodocchgi1,&lt;/P&gt;&lt;P&gt;        gd_error type sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:   it_message type standard table of SOLISTI1 initial size 0&lt;/P&gt;&lt;P&gt;                with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform populate_message_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Send email message, although is not sent from SAP until mail send&lt;/P&gt;&lt;P&gt;*program has been executed(rsconn01)&lt;/P&gt;&lt;P&gt;PERFORM send_email_message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Instructs mail send program for SAPCONNECT to send email(rsconn01)&lt;/P&gt;&lt;P&gt;perform initiate_mail_execute_program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  POPULATE_MESSAGE_TABLE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Adds text to email text table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form populate_message_table.&lt;/P&gt;&lt;P&gt;  Append 'Email line 1' to it_message.&lt;/P&gt;&lt;P&gt;  Append 'Email line 2' to it_message.&lt;/P&gt;&lt;P&gt;  Append 'Email line 3' to it_message.&lt;/P&gt;&lt;P&gt;  Append 'Email line 4' to it_message.&lt;/P&gt;&lt;P&gt;endform.                    " POPULATE_MESSAGE_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  SEND_EMAIL_MESSAGE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Send email message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form send_email_message.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill the document data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_doc_data-doc_size = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the subject/generic message attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_doc_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt;  gd_doc_data-obj_name  = 'SAPRPT'.&lt;/P&gt;&lt;P&gt;  gd_doc_data-obj_descr = psubject.&lt;/P&gt;&lt;P&gt;  gd_doc_data-sensitivty = 'F'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Describe the body of the message&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear it_packing_list.&lt;/P&gt;&lt;P&gt;  refresh it_packing_list.&lt;/P&gt;&lt;P&gt;  it_packing_list-transf_bin = space.&lt;/P&gt;&lt;P&gt;  it_packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;  it_packing_list-head_num = 0.&lt;/P&gt;&lt;P&gt;  it_packing_list-body_start = 1.&lt;/P&gt;&lt;P&gt;  describe table it_message lines it_packing_list-body_num.&lt;/P&gt;&lt;P&gt;  it_packing_list-doc_type = 'RAW'.&lt;/P&gt;&lt;P&gt;  append it_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add the recipients email address&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear it_receivers.&lt;/P&gt;&lt;P&gt;  refresh it_receivers.&lt;/P&gt;&lt;P&gt;  it_receivers-receiver = p_email.&lt;/P&gt;&lt;P&gt;  it_receivers-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;  it_receivers-com_type = 'INT'.&lt;/P&gt;&lt;P&gt;  it_receivers-notif_del = 'X'.&lt;/P&gt;&lt;P&gt;  it_receivers-notif_ndel = 'X'.&lt;/P&gt;&lt;P&gt;  append it_receivers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM to post the message to SAPMAIL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            document_data              = gd_doc_data&lt;/P&gt;&lt;P&gt;            put_in_outbox              = 'X'&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            sent_to_all                = gd_sent_all&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            packing_list               = it_packing_list&lt;/P&gt;&lt;P&gt;            contents_txt               = it_message&lt;/P&gt;&lt;P&gt;            receivers                  = it_receivers&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            too_many_receivers         = 1&lt;/P&gt;&lt;P&gt;            &lt;STRONG&gt;document_not_sent          = 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;            document_type_not_exist    = 3&lt;/P&gt;&lt;P&gt;            operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;            parameter_error            = 5&lt;/P&gt;&lt;P&gt;            x_error                    = 6&lt;/P&gt;&lt;P&gt;            enqueue_error              = 7&lt;/P&gt;&lt;P&gt;            others                     = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Store function module return code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_error = sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get it_receivers return code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at it_receivers.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endform.                    " SEND_EMAIL_MESSAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  INITIATE_MAIL_EXECUTE_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Instructs mail send program for SAPCONNECT to send email.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form initiate_mail_execute_program.&lt;/P&gt;&lt;P&gt;  wait up to 2 seconds.&lt;/P&gt;&lt;P&gt;  if gd_error eq 0.&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;  endif.&lt;/P&gt;&lt;P&gt;endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to check anything..? (in user settings or in SCOT)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2008 14:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669189#M1098310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-15T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669190#M1098311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt; try this also  SO_OBJECT_SEND  . just give a try.........points if answer is helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:14:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669190#M1098311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-15T15:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 -- DOCUMENT_NOT_SENT = 2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669191#M1098312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try debugging and looking at all the field you are passing...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: docdata TYPE sodocchgi1, 
objpack TYPE TABLE OF sopcklsti1,
objpack_line LIKE LINE OF objpack,
objhead TYPE TABLE OF solisti1,
objbin  TYPE TABLE OF solisti1,
reclist TYPE TABLE OF somlreci1


  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data = docdata
      put_in_outbox = 'X'
      commit_work   = 'X'
    TABLES
      packing_list  = objpack
      object_header = objhead
      contents_bin  = objbin
      contents_txt  = objtxt
      receivers     = reclist.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2008 15:26:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-document-not-sent-2/m-p/4669191#M1098312</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-10-15T15:26:14Z</dc:date>
    </item>
  </channel>
</rss>

