<?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: HTML email using SO_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275874#M783219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow...ECC7.0....light years ahead of the rest of the SAP Universe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Apr 2010 02:55:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-02T02:55:01Z</dc:date>
    <item>
      <title>HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275865#M783210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;We have an issue with a custom program that sends HTML email notifications. I am using function module SO_DOCUMENT_SEND_API1. The CONTENTS table will have HTML tags. The issue here is that the content or body of certain emails are blank. Not all emails generated from this program has this issue. When i look at these blank emails in SOST, i could see the contents. Only thing is when the user receives this email in his external email address, the contents are missing and he can see only the subject of the email. Has anyone faced this issue before? Is there any desktop settings that needs to be changed inorder to view HTML email? Let me know ASAP. Points will be rewarded for sure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my code to send HTML emails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;packing_list-head_start = 1.&lt;/P&gt;&lt;P&gt;packing_list-head_num = 1.&lt;/P&gt;&lt;P&gt;packing_list-body_start = 1.&lt;/P&gt;&lt;P&gt;packing_list-body_num = count.&lt;/P&gt;&lt;P&gt;packing_list-doc_type = 'HTML'.&lt;/P&gt;&lt;P&gt;packing_list-obj_descr = 'Notification'.&lt;/P&gt;&lt;P&gt;packing_list-obj_name = 'Notification.htm'.&lt;/P&gt;&lt;P&gt;packing_list-doc_size = ( count - 1 ) * 255 +&lt;/P&gt;&lt;P&gt;STRLEN( contents-line ).&lt;/P&gt;&lt;P&gt;APPEND packing_list.&lt;/P&gt;&lt;P&gt;CLEAR packing_list.&lt;/P&gt;&lt;P&gt;&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 = document_data&lt;/P&gt;&lt;P&gt;commit_work = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;packing_list = packing_list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;contents_bin = &lt;/P&gt;&lt;P&gt;contents_txt = contents&lt;/P&gt;&lt;P&gt;receivers = real_recipients&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;Regards,&lt;/P&gt;&lt;P&gt;Maria.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 21:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275865#M783210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T21:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275866#M783211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same problem, did you already find any solution?  &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Ana Carolina Ramalho&lt;/P&gt;&lt;P&gt;Fertilizantes Heringer - Brazil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2008 13:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275866#M783211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-15T13:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275867#M783212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on this topic as well, but I am facing some major problems.&lt;/P&gt;&lt;P&gt;We are running 4.6C at the moment (yes, I know, its old &lt;SPAN __jive_emoticon_name="grin"&gt;&lt;/SPAN&gt;) and I am not able to send any HTML email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using the document_type = 'HTM'. Unfortunately, it is not available in 4.6C.&lt;/P&gt;&lt;P&gt;The document_type refers to the truth table TSOTD which does not contain HTM. &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add HTM manually but its still not working. Which System are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 15:05:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275867#M783212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275868#M783213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maria,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever figure out how to get html into the body of an email?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 21:26:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275868#M783213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T21:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275869#M783214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 submit yattr0001 exporting list to memory
           with p_docno = xdocno
           and return.

  call function 'LIST_FROM_MEMORY'
    tables
      listobject = report_list
    exceptions
      not_found  = 1
      others     = 2.

  call function 'WWW_HTML_FROM_LISTOBJECT'
    exporting
      template_name = 'WEBREPORTING_REPORT'
    tables
      html          = report_html
      listobject    = report_list.

  loop at report_html.
    move report_html to objtxt.
    append objtxt.
  endloop.
  objpack-doc_type = 'HTM'.

  describe table objtxt lines tab_lines.
  objpack-body_start = v_lines.

  objpack-body_num  = tab_lines.
  objpack-doc_size  = tab_lines * 255.
  objpack-obj_descr = w_docno_temp.
  append objpack.
  clear  objpack.

  doc_chng-obj_name  = w_docno_temp.
  doc_chng-obj_descr = w_subject.

  reclist-receiver = to_smtp_addr.
  reclist-rec_type = 'U'.
  reclist-express  = 'X'.
  append reclist.

  v_unm = sy-uname.
 
  move v_unm to v_saddress.
  call function 'SO_DOCUMENT_SEND_API1'
    exporting
      document_data              = doc_chng
      sender_address             = v_saddress
      sender_address_type        = 'U'
      commit_work                = 'X'
    tables
      packing_list               = objpack
      contents_bin               = objbin
      contents_txt               = objtxt
      receivers                  = 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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 21:35:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275869#M783214</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-02-28T21:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275870#M783215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ArS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the code.  It fails to send anything in the e-mail body.  It just has the subject filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideas why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ken&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 22:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275870#M783215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-28T22:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275871#M783216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code works for me.  I have ECC 700.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 15:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275871#M783216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-01T15:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275872#M783217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same issue. &lt;/P&gt;&lt;P&gt;I noticed that, document_data-doc_size info doesn't send correctly to the function. I suggest you to control this information, it solves my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 05:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275872#M783217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-01T05:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275873#M783218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I kindly suggest you to read thid blog by the great Thomas Jung:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/789] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 08:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275873#M783218</guid>
      <dc:creator>andrea_olivieri</dc:creator>
      <dc:date>2010-04-01T08:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: HTML email using SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275874#M783219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow...ECC7.0....light years ahead of the rest of the SAP Universe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Apr 2010 02:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-email-using-so-document-send-api1/m-p/3275874#M783219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-02T02:55:01Z</dc:date>
    </item>
  </channel>
</rss>

