<?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: Trigger the mail on selecting the screen elements. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148385#M1514253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAP has provided you with the ability to reuse their Business Communication Services (BCS) email class CL_BCS ... have a look in SE38 at the programs that start with BCS_* as there are lots of sample pieces of code there that you can easily reuse.  Do note the need for a "commit work" to trigger the send.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Aug 2010 03:06:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-12T03:06:35Z</dc:date>
    <item>
      <title>Trigger the mail on selecting the screen elements.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148383#M1514251</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;I have a requirement where I have to trigger the mail on selecting certain screen elements as below:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.) On pressing the pushbutton on the custom screen the mail should be sent to the email id's given. I have the body of the    email to be sent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.)  On selecting the respective values from the drop down in the I/O selection screen element the respective email should be sent. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please respond to the query at the earliest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Aug 2010 17:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148383#M1514251</guid>
      <dc:creator>former_member288488</dc:creator>
      <dc:date>2010-08-08T17:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the mail on selecting the screen elements.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148384#M1514252</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 just need to use the function module when the user presses the send mail button or whatever button u provide him.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'SO_NEW_DOCUMENT_ATT_SEND_API1' &lt;/P&gt;&lt;P&gt;check even these :&lt;/P&gt;&lt;P&gt;sap_new_document_send_api1(send document)&lt;/P&gt;&lt;P&gt;sap_new_document_att_send_api1(send with attachments) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and ya one more thing, you need to check with your BASIS guys whether they have provided you the option of sending mails to external ids.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cordially,&lt;/P&gt;&lt;P&gt;Danish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 17:58:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148384#M1514252</guid>
      <dc:creator>Danish</dc:creator>
      <dc:date>2010-08-10T17:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the mail on selecting the screen elements.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148385#M1514253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAP has provided you with the ability to reuse their Business Communication Services (BCS) email class CL_BCS ... have a look in SE38 at the programs that start with BCS_* as there are lots of sample pieces of code there that you can easily reuse.  Do note the need for a "commit work" to trigger the send.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 03:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148385#M1514253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-12T03:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the mail on selecting the screen elements.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148386#M1514254</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 need to use FM 'SO_DOCUMENT_SEND_API1' to send mail. Please refer below code to call it. To use this, you need to have your internal table in binary format. In below code 'T_ATTACHMENT' is the internal table with binary format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you need to convert your internal table into binary format and then use this FM to send mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
            sender_address             = ld_sender_address
            sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Archana Pawar on Aug 12, 2010 5:45 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Archana Pawar on Aug 12, 2010 5:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 03:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148386#M1514254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-12T03:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the mail on selecting the screen elements.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148387#M1514255</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 let me know how to proceed on this as i have the body and id where i need to send the mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 10:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/trigger-the-mail-on-selecting-the-screen-elements/m-p/7148387#M1514255</guid>
      <dc:creator>former_member288488</dc:creator>
      <dc:date>2010-08-12T10:46:33Z</dc:date>
    </item>
  </channel>
</rss>

