<?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: Problem using FM SO_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-fm-so-document-send-api1/m-p/7042935#M1500965</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;Try this.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lokeswari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jul 2010 08:28:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-28T08:28:50Z</dc:date>
    <item>
      <title>Problem using FM SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-fm-so-document-send-api1/m-p/7042934#M1500964</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;Am using the below code followed by a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    submit rsconn01&lt;/P&gt;&lt;P&gt;      with mode eq 'INT'&lt;/P&gt;&lt;P&gt;      and return.&lt;/P&gt;&lt;P&gt;*// Adding a commit to "Trigger" the movement of mails.....&lt;/P&gt;&lt;P&gt;    commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, in SCOT the mails are with the status 'Still not Entered in Queue' and they are not sent out....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out fix this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form send_email_to_employee  tables   p_it_receivers type somlreci1_t&lt;/P&gt;&lt;P&gt;                             using    p_lf_barea type ben_area&lt;/P&gt;&lt;P&gt;                                      p_lf_event type ben_event&lt;/P&gt;&lt;P&gt;                                      p_lf_ltext type ben_evnttx&lt;/P&gt;&lt;P&gt;                                      p_lf_emp   type char1&lt;/P&gt;&lt;P&gt;                                      p_innnn    type prelp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  constants: gc_endda type endda value '99991231',&lt;/P&gt;&lt;P&gt;             gc_x(1)  type c     value 'X'.   "For X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: it_objtxt type soli_tab with header line,&lt;/P&gt;&lt;P&gt;  it_packing_list like sopcklsti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;  it_objhead like solisti1 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;  it_orec type  string      occurs 0 with header line,&lt;/P&gt;&lt;P&gt;  it_objbin like solisti1   occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: gd_doc_data like sodocchgi1,&lt;/P&gt;&lt;P&gt;        lf_sender   type soextreci1-receiver,&lt;/P&gt;&lt;P&gt;        lf_bdate(10)  type c,&lt;/P&gt;&lt;P&gt;        lf_edate(10)  type c,&lt;/P&gt;&lt;P&gt;        gd_sent_all(1) type c,&lt;/P&gt;&lt;P&gt;        lf_tablines like sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: lf_nachn type pad_nachn,   "Last name&lt;/P&gt;&lt;P&gt;        lf_vorna type pad_vorna,   "First name&lt;/P&gt;&lt;P&gt;        lf_midnm type pad_midnm.   "Middle name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Populate the subject/generic message attributes&lt;/P&gt;&lt;P&gt;  gd_doc_data-obj_langu = sy-langu.&lt;/P&gt;&lt;P&gt;  gd_doc_data-obj_name = 'SAPRPT'(002).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Populate the Subject of the mail &lt;/P&gt;&lt;P&gt;    gd_doc_data-obj_descr =  'Many Happy Returns of the day(001).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gd_doc_data-sensitivty = 'F'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Describe/Build the body of the message&lt;/P&gt;&lt;P&gt;  clear: it_objtxt, it_objtxt[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Build the Body of the Email message&lt;/P&gt;&lt;P&gt;*//Set the Body background colour&lt;/P&gt;&lt;P&gt;  it_objtxt-line = '&amp;lt;BODY bgcolor = "#E6E6FA"&amp;gt;'.&lt;/P&gt;&lt;P&gt;  append it_objtxt.&lt;/P&gt;&lt;P&gt;  clear it_objtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*//Set font color and its type&lt;/P&gt;&lt;P&gt;  it_objtxt-line =  '&amp;lt;FONT COLOR = "#191970" face="Veranda" size="4"&amp;gt;' .&lt;/P&gt;&lt;P&gt;  append it_objtxt.&lt;/P&gt;&lt;P&gt;  clear it_objtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate  '&amp;lt;p&amp;gt;' 'Happy Birthday ' lf_nachn lf_vorna &amp;lt;/p&amp;gt;'&lt;/P&gt;&lt;P&gt;  into it_objtxt-line separated by space.&lt;/P&gt;&lt;P&gt;  append it_objtxt.&lt;/P&gt;&lt;P&gt;  clear it_objtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate  '&amp;lt;p&amp;gt;' '&amp;lt;b&amp;gt;' 'Human Resources Division'(020) '&amp;lt;/b&amp;gt;' '&amp;lt;/p&amp;gt;'&lt;/P&gt;&lt;P&gt;        into it_objtxt-line separated by space.&lt;/P&gt;&lt;P&gt;  append it_objtxt.&lt;/P&gt;&lt;P&gt;  clear it_objtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it_objtxt-line = '&amp;lt;/FONT&amp;gt;&amp;lt;/BODY&amp;gt;'.&lt;/P&gt;&lt;P&gt;  append it_objtxt.&lt;/P&gt;&lt;P&gt;  clear it_objtxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table it_objtxt lines lf_tablines.&lt;/P&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-doc_size = ( lf_tablines - 1 ) * 255 + strlen( it_objtxt ).&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;  it_packing_list-body_num = lf_tablines.&lt;/P&gt;&lt;P&gt;  describe table it_objtxt lines it_packing_list-body_num.&lt;/P&gt;&lt;P&gt;  it_packing_list-doc_type = 'HTM'(003).&lt;/P&gt;&lt;P&gt;  append it_packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gd_doc_data-doc_size = ( lf_tablines - 1 ) * 255 + strlen( it_objtxt ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Build the Subject of the Mail&lt;/P&gt;&lt;P&gt;  it_objhead = 'Your Benefits Status Change Information'(001).&lt;/P&gt;&lt;P&gt;  append it_objhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Set Sender mailID&lt;/P&gt;&lt;P&gt;  lf_sender = &amp;lt;email address here&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*// Call the FM to post the message to SAPMAIL&lt;/P&gt;&lt;P&gt;  call function 'SO_DOCUMENT_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              = gc_x&lt;/P&gt;&lt;P&gt;      sender_address             = lf_sender&lt;/P&gt;&lt;P&gt;      sender_address_type        = 'INT'&lt;/P&gt;&lt;P&gt;      commit_work                = gc_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;      object_header              = it_objhead&lt;/P&gt;&lt;P&gt;      contents_bin               = it_objbin&lt;/P&gt;&lt;P&gt;      contents_txt               = it_objtxt&lt;/P&gt;&lt;P&gt;      receivers                  = p_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;endform.                    " SEND_EMAIL_TO_EMPLOYEE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 07:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-fm-so-document-send-api1/m-p/7042934#M1500964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-28T07:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using FM SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-fm-so-document-send-api1/m-p/7042935#M1500965</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;Try this.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lokeswari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 08:28:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-using-fm-so-document-send-api1/m-p/7042935#M1500965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-28T08:28:50Z</dc:date>
    </item>
  </channel>
</rss>

