<?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: SEND EMAIL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229430#M1380372</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;Check with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: objpack TYPE TABLE OF sopcklsti1 INITIAL SIZE 2,     
            objhead TYPE TABLE OF solisti1 INITIAL SIZE 1,    
           objbin  TYPE TABLE OF solisti1 INITIAL SIZE 10,   
           objtxt  TYPE TABLE OF solisti1 INITIAL SIZE 10,
            reclist TYPE TABLE OF somlreci1 INITIAL SIZE 5.

 CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = doc_chng
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = objpack
            object_header              = objhead
            contents_bin               = objbin
            contents_txt               = objtxt
            receivers                  = reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            operation_no_authorization = 4
            OTHERS                     = 99.
IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2009 04:26:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-24T04:26:33Z</dc:date>
    <item>
      <title>SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229427#M1380369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Gurus,&lt;/P&gt;&lt;P&gt;Please kindly help out on the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try to send email using &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Send Mail&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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_DATA              = EV_DOCUMENT_DATA&lt;/P&gt;&lt;P&gt;      DOCUMENT_TYPE              = 'RAW'&lt;/P&gt;&lt;P&gt;      PUT_IN_OUTBOX              = 'X'&lt;/P&gt;&lt;P&gt;      COMMIT_WORK                = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      SENT_TO_ALL                = IV_SENT_TO_ALL&lt;/P&gt;&lt;P&gt;      NEW_OBJECT_ID              = IV_NEW_OBJECT_ID&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      OBJECT_HEADER              = CT_OBJECT_HEADER&lt;/P&gt;&lt;P&gt;      OBJECT_CONTENT             = CT_OBJECT_CONTENT&lt;/P&gt;&lt;P&gt;      CONTENTS_HEX               = CT_CONTENTS_HEX&lt;/P&gt;&lt;P&gt;      OBJECT_PARA                = CT_OBJECT_PARA&lt;/P&gt;&lt;P&gt;      OBJECT_PARB                = CT_OBJECT_PARB&lt;/P&gt;&lt;P&gt;      RECEIVERS                  = CT_RECEIVERS&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      TOO_MANY_RECEIVERS         = 1&lt;/P&gt;&lt;P&gt;      DOCUMENT_NOT_SENT          = 2&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The email was found in SBWP but not in SCOT.&lt;/P&gt;&lt;P&gt;The email was not automatically send out. I need to go into SBWP to click SEND and then it will go into SCOT.&lt;/P&gt;&lt;P&gt;Please kindly advise me how to make it automatically send out.&lt;/P&gt;&lt;P&gt;Thanks very very very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:34:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229427#M1380369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-23T15:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229428#M1380370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to pass commit_work = 'X' and then have to&lt;/P&gt;&lt;P&gt;Submit RSCONN01 program to send it immediately to SCOT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229428#M1380370</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2009-09-23T15:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229429#M1380371</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;Please use the following. Its working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      exporting
        document_data              = lv_document_data
        put_in_outbox              = space
        commit_work                = 'X'
      tables
        packing_list               = i_objpack
        object_header              = i_objhead
        contents_bin               = i_audit_output
        contents_txt               = i_objtxt
        receivers                  = i_reclist
      exceptions
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        others                     = 8.

    if sy-subrc &amp;lt;&amp;gt; 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

*   Display message saying email was sent successfully.
    else.

      write: /1 text-t23.

    endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aravind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 04:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229429#M1380371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T04:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229430#M1380372</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;Check with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: objpack TYPE TABLE OF sopcklsti1 INITIAL SIZE 2,     
            objhead TYPE TABLE OF solisti1 INITIAL SIZE 1,    
           objbin  TYPE TABLE OF solisti1 INITIAL SIZE 10,   
           objtxt  TYPE TABLE OF solisti1 INITIAL SIZE 10,
            reclist TYPE TABLE OF somlreci1 INITIAL SIZE 5.

 CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = doc_chng
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = objpack
            object_header              = objhead
            contents_bin               = objbin
            contents_txt               = objtxt
            receivers                  = reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            operation_no_authorization = 4
            OTHERS                     = 99.
IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 04:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229430#M1380372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T04:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229431#M1380373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;            document_not_sent          = 2&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229431#M1380373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229432#M1380374</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;Please add &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;commit_work                = 'X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to krupa jani's reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229432#M1380374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: SEND EMAIL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229433#M1380375</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;Check the below link. it will help you to solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/Snippets/Email%2bfrom%2bSAP" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/Snippets/Email%2bfrom%2bSAP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2009 07:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email/m-p/6229433#M1380375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-24T07:15:37Z</dc:date>
    </item>
  </channel>
</rss>

