<?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: FM to trigger E-Mail in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436623#M1648145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should we need to do something with SOST.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2011 10:40:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-12-13T10:40:17Z</dc:date>
    <item>
      <title>FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436619#M1648141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No of error messages = 200&lt;/P&gt;&lt;P&gt;No of warning messages = 250&lt;/P&gt;&lt;P&gt;No of information messages = 200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i execute the program, it has to send a mail to xxxxxx, with the above 3 lines of information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message : Spec dumping not allowed, search for available information, thread locked. &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vinod Kumar on Dec 13, 2011 5:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 08:56:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436619#M1648141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-13T08:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436620#M1648142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use FM 'SO_NEW_DOCUMENT_SEND_API1'  for same purpose,if u do not have attachments.If u have them,&lt;/P&gt;&lt;P&gt;use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 09:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436620#M1648142</guid>
      <dc:creator>former_member907073</dc:creator>
      <dc:date>2011-12-13T09:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436621#M1648143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;use this FM to send mails from  "so_new_document_att_send_api1"  &lt;/P&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              = DOC_CHNG&lt;/P&gt;&lt;P&gt;      COMMIT_WORK                = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      PACKING_LIST               = OBJPACK&lt;/P&gt;&lt;P&gt;      OBJECT_HEADER              = OBJHEAD&lt;/P&gt;&lt;P&gt;      CONTENTS_TXT               = OBJTXT&lt;/P&gt;&lt;P&gt;      CONTENTS_HEX               = OBJBIN&lt;/P&gt;&lt;P&gt;      RECEIVERS                  = RECLIST&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;      OPERATION_NO_AUTHORIZATION = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check tcode :  SOST  to check send messages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 09:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436621#M1648143</guid>
      <dc:creator>former_member216611</dc:creator>
      <dc:date>2011-12-13T09:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436622#M1648144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used this code many times and works very well,..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lt_message TYPE bcsy_text.
DATA lv_mail_title TYPE so_obj_des.
DATA document TYPE REF TO cl_document_bcs.
DATA recipient TYPE REF TO if_recipient_bcs.
DATA send_request TYPE REF TO cl_bcs.
DATA sent_to_all TYPE os_boolean.
DATA bcs_execption TYPE REF TO cx_bcs.
DATA email_id TYPE ADR6-SMTP_ADDR&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Email Message, and receipients....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;send_request = cl_bcs=&amp;gt;create_persistent( ).

*Create Title
CONCATENATE 'Mail Subject' '-' 'xxx'
INTO lv_mail_title RESPECTING BLANKS.


*Create Message(EMAIL Body)
APPEND '&amp;lt;p&amp;gt;No of error messages = 200&amp;lt;/p&amp;gt;' TO lt_message.
APPEND '&amp;lt;p&amp;gt;No of warning messages = 250&amp;lt;/p&amp;gt;' TO lt_message.
APPEND '&amp;lt;p&amp;gt;No of information messages = 200&amp;lt;/p&amp;gt;' TO lt_message.
APPEND '&amp;lt;br&amp;gt;' TO lt_message.


*Create Document
document = cl_document_bcs=&amp;gt;create_document(
     i_type = 'HTM'
     i_text =  message_body
     i_subject = subject ).


*Add Attachement(If Needed only)
document-&amp;gt;add_attachment(..
...). "Check this method 


*Add document to email
send_request-&amp;gt;set_document( document ).
 
recipient = cl_cam_address_bcs=&amp;gt;create_internet_address(
i_address_string = email_id ).


*add recipients to send request
send_request-&amp;gt;add_recipient( i_recipient = recipient ).
sent_to_all = send_request-&amp;gt;send(
i_with_error_screen = 'X' ).
COMMIT WORK.


IF sent_to_all = 'X'.
MESSAGE s398(00) WITH 'Message Sent Succesfully'.
RETURN.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also dynamically write the Email Message Body... Just inside the loop ... append the message table...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 09:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436622#M1648144</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2011-12-13T09:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436623#M1648145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should we need to do something with SOST.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 10:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436623#M1648145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-12-13T10:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: FM to trigger E-Mail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436624#M1648146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing to do in sost , but after sending you need to check format thats why I had given this tocde , like here it contains the sent mails .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to send mail to group of pepole at a time you need to create distribution list .tcode will be so15 ,&lt;/P&gt;&lt;P&gt;if you the solution close the thread&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;=&amp;gt; Again. Leave it to the OP.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Dec 13, 2011 10:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 10:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-to-trigger-e-mail/m-p/8436624#M1648146</guid>
      <dc:creator>former_member216611</dc:creator>
      <dc:date>2011-12-13T10:57:11Z</dc:date>
    </item>
  </channel>
</rss>

