<?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 Automatic Mail generation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/automatic-mail-generation/m-p/4090271#M978033</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;IF the Difference between the Purchase requisition date and system date is 10days then i need to send a mail automatically to the mail ID of the Purchase requisition(PR) creator (EBAN-ERNAM) with the details of the Purchase requisition number , Purchase requisition item number and also with thes ome  message like (ex:-Your PR will be deleted in the next two days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to do a Report only not a work flow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Program is an Batch program and will be scheduled every day Morning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me how to solve this and if possible please give me the Sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thansk &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2008 09:35:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-25T09:35:01Z</dc:date>
    <item>
      <title>Automatic Mail generation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/automatic-mail-generation/m-p/4090271#M978033</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;IF the Difference between the Purchase requisition date and system date is 10days then i need to send a mail automatically to the mail ID of the Purchase requisition(PR) creator (EBAN-ERNAM) with the details of the Purchase requisition number , Purchase requisition item number and also with thes ome  message like (ex:-Your PR will be deleted in the next two days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to do a Report only not a work flow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Program is an Batch program and will be scheduled every day Morning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me how to solve this and if possible please give me the Sample program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thansk &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 09:35:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/automatic-mail-generation/m-p/4090271#M978033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T09:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Mail generation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/automatic-mail-generation/m-p/4090272#M978034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FORM sub_send_mail USING p_string1  TYPE string&lt;/P&gt;&lt;P&gt;                         p_string2  TYPE string&lt;/P&gt;&lt;P&gt;                         p_string3  TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA :   l_i_objtxt   TYPE STANDARD TABLE OF solisti1   INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;                                                       "Contents&lt;/P&gt;&lt;P&gt;          l_wa_objtxt TYPE solisti1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         l_wa_doc_chng type sodocchgi1 ,           "Attributes of Mail&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          l_i_objpack  TYPE STANDARD TABLE OF sopcklsti1 INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;                                                       "Packing list&lt;/P&gt;&lt;P&gt;          l_wa_objpack TYPE  sopcklsti1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          l_i_reclist  TYPE STANDARD TABLE OF somlreci1  INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;                                                       "Receivers list&lt;/P&gt;&lt;P&gt;          l_wa_reclist TYPE somlreci1 ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          l_tab_lines  LIKE sy-tabix.                "No. of lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE p_string1 p_string2&lt;/P&gt;&lt;P&gt;              INTO l_wa_doc_chng-obj_descr SEPARATED BY space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF p_string3 IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    CONCATENATE l_wa_doc_chng-obj_descr p_string3&lt;/P&gt;&lt;P&gt;              INTO l_wa_doc_chng-obj_descr SEPARATED BY space.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_wa_objtxt-line = l_wa_doc_chng-obj_descr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND l_wa_objtxt TO l_i_objtxt.&lt;/P&gt;&lt;P&gt;  CLEAR l_wa_objtxt .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_tab_lines = LINES( l_i_objtxt ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE l_i_objtxt INTO l_wa_objtxt INDEX l_tab_lines.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    l_wa_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 +&lt;/P&gt;&lt;P&gt;                                   STRLEN( l_wa_objtxt ).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the entry for the compressed document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR l_wa_objpack-transf_bin.&lt;/P&gt;&lt;P&gt;  l_wa_objpack-head_start = 1.&lt;/P&gt;&lt;P&gt;  l_wa_objpack-head_num   = 0.&lt;/P&gt;&lt;P&gt;  l_wa_objpack-body_start = 1.&lt;/P&gt;&lt;P&gt;  l_wa_objpack-body_num   = l_tab_lines.&lt;/P&gt;&lt;P&gt;  l_wa_objpack-doc_type   = 'RAW'.&lt;/P&gt;&lt;P&gt;  APPEND l_wa_objpack TO l_i_objpack.&lt;/P&gt;&lt;P&gt;  CLEAR l_wa_objpack .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'EFG_GEN_GET_USER_EMAIL'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_uname        = sy-uname&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     E_EMAIL_ADDRESS = l_wa_reclist-receiver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_wa_reclist-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;  APPEND l_wa_reclist TO l_i_reclist.&lt;/P&gt;&lt;P&gt;  CLEAR l_wa_reclist .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending the document&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              = l_wa_doc_chng&lt;/P&gt;&lt;P&gt;      put_in_outbox              = c_check&lt;/P&gt;&lt;P&gt;      commit_work                = c_check&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      packing_list               = l_i_objpack&lt;/P&gt;&lt;P&gt;      contents_txt               = l_i_objtxt&lt;/P&gt;&lt;P&gt;      receivers                  = l_i_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;      OTHERS                     = 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0 .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  write: 'Notification not send'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward point if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 09:36:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/automatic-mail-generation/m-p/4090272#M978034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T09:36:39Z</dc:date>
    </item>
  </channel>
</rss>

