<?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: Emailing in HTML format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759474#M1116041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhanu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Report SENDLIST&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Sample report from note 190669 for sending lists via SAPconnect&lt;/P&gt;&lt;P&gt;*&amp;amp; for releases as of 6.10:&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp; 1. Use so_document_send_api1 instead of&lt;/P&gt;&lt;P&gt;*&amp;amp; so_new_document_att_send_api1 (same interface)&lt;/P&gt;&lt;P&gt;*&amp;amp; Better yet, use the BCS interface. See below and note 190669&lt;/P&gt;&lt;P&gt;*&amp;amp; 2. Cast recipient structures into receiver-receiver field&lt;/P&gt;&lt;P&gt;*&amp;amp; using a field-symbol&lt;/P&gt;&lt;P&gt;*&amp;amp; 3. Set a commit work statement after the sending&lt;/P&gt;&lt;P&gt;*&amp;amp; or set parameter commit_work at the send module&lt;/P&gt;&lt;P&gt;*&amp;amp; 4. Give binary data of type x not type c to send module, i.e.&lt;/P&gt;&lt;P&gt;*&amp;amp; use structure solix instead of soli and give it to tables&lt;/P&gt;&lt;P&gt;*&amp;amp; parameter contents_hex instead of contents_bin&lt;/P&gt;&lt;P&gt;*&amp;amp; Do this by filling contents_hex directly from the module&lt;/P&gt;&lt;P&gt;*&amp;amp; table_compress. In case of reading the data from spool, convert&lt;/P&gt;&lt;P&gt;*&amp;amp; to solix using so_solitab_to_solixtab&lt;/P&gt;&lt;P&gt;*&amp;amp; 5. Don't calculate document size. It is done internally&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp; Recommendation:&lt;/P&gt;&lt;P&gt;*&amp;amp; Switch to the new BCS interface instead of calling the API1&lt;/P&gt;&lt;P&gt;*&amp;amp; Function module. See Report sendlist_bcs (also within note 190669)&lt;/P&gt;&lt;P&gt;*&amp;amp; for this&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report sendlist line-size 46 no standard page heading message-id so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form create_list_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form create_list_content changing list_content type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st possibility - use "submit &amp;lt;report&amp;gt; exporting list to memory" &lt;/P&gt;&lt;P&gt;this is the recommended way &lt;/P&gt;&lt;P&gt;if submit = 'X'.&lt;/P&gt;&lt;P&gt;perform use_submit changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd possibility - create a new list within this report. &lt;/P&gt;&lt;P&gt;if write = 'X'.&lt;/P&gt;&lt;P&gt;perform write_a_list changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd possibility - get list from spool &lt;/P&gt;&lt;P&gt;if spool = 'X'.&lt;/P&gt;&lt;P&gt;perform get_list_from_spool changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "create_list_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form create_text_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form create_text_content changing text_content type soli_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append 'This is the first line' to text_content.&lt;/P&gt;&lt;P&gt;append 'This is the second line' to text_content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;convert the content from RAW to TXT &lt;/P&gt;&lt;P&gt;call function 'SO_RAW_TO_RTF'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;objcont_old = text_content&lt;/P&gt;&lt;P&gt;objcont_new = text_content&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;others = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "create_text_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form SEND&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the list-document and send it via FAX, Mail and RML &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form send using text_content type soli_tab&lt;/P&gt;&lt;P&gt;list_content type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;structures and internal tables for the send data &lt;/P&gt;&lt;P&gt;data document_data type sodocchgi1.&lt;/P&gt;&lt;P&gt;data packing_list type table of sopcklsti1.&lt;/P&gt;&lt;P&gt;data receivers type table of somlreci1.&lt;/P&gt;&lt;P&gt;data contents_txt type soli_tab.&lt;/P&gt;&lt;P&gt;data contents_hex type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data packlist_wa type sopcklsti1.&lt;/P&gt;&lt;P&gt;data receiver_wa type somlreci1.&lt;/P&gt;&lt;P&gt;data packlist_counter type i.&lt;/P&gt;&lt;P&gt;data sent_to_all type sonv-flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;main document &lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;document data contains information for the whole message &lt;/P&gt;&lt;P&gt;document_data-obj_descr = u2018textu2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text for the main document &lt;/P&gt;&lt;P&gt;append u2018textu2019 to contents_txt.&lt;/P&gt;&lt;P&gt;append u2018textu2019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;packlist_counter = 1.&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using contents_txt&lt;/P&gt;&lt;P&gt;'RAW'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add a text attachment of type TXT &lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using text_content&lt;/P&gt;&lt;P&gt;'TXT'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;append lines of text_content to contents_txt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add the list attachment of type ALI &lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;packlist_counter = 1. "because we will fill the hex table now&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using list_content&lt;/P&gt;&lt;P&gt;'ALI'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;append lines of list_content to contents_hex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send the document by calling the API1 &lt;/P&gt;&lt;P&gt;as of 6.10 either the flag 'commit_work' has to be set &lt;/P&gt;&lt;P&gt;or a commit work statement has to be set somewhere after the call &lt;/P&gt;&lt;P&gt;Sending won't work without this! &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;put_in_outbox = 'X'&lt;/P&gt;&lt;P&gt;commit_work = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;sent_to_all = sent_to_all&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;packing_list = packing_list&lt;/P&gt;&lt;P&gt;contents_txt = contents_txt&lt;/P&gt;&lt;P&gt;contents_hex = contents_hex&lt;/P&gt;&lt;P&gt;receivers = 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;others = 8.&lt;/P&gt;&lt;P&gt;case sy-subrc.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;if sent_to_all is initial.&lt;/P&gt;&lt;P&gt;read table receivers index 1 into receiver_wa.&lt;/P&gt;&lt;P&gt;message i865 with receiver_wa-retrn_code.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message s022.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;message i552.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;message i023 with document_data-obj_descr.&lt;/P&gt;&lt;P&gt;when 4.&lt;/P&gt;&lt;P&gt;message i471.&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;message i619.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " SEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2008 06:03:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-13T06:03:44Z</dc:date>
    <item>
      <title>Emailing in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759471#M1116038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using R/3 4.7 version. Client wants us to trigger an email based on an event. This email carries some information for the targeted email recipient. Now the client requirement is that we should make some fields in email body as bold. These fields are inclusive of dynamic and static fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using function module SO_NEW_DOCUMENT_ATT_SEND_API1 to trigger an email.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this we function module we have to pass a structure called "packing list". This structure contains a component called "doc_type". In my report I am passing doc_type as "RAW". However when I use this doc type, I am unable to make body text as bold. This doc type creates email body in plain text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched earlier forums, which suggested me to pass "HTM" as doc_type to get the email in HTML format. When I pass this value, I get an blank email. Later I found that the value table TSOTD for doc_type does not contain value "HTM". Hence I cannot use "HTM".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me in solving this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards gurranteed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bhanu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 05:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759471#M1116038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T05:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759472#M1116039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fill the content of the mail i.e object_content including HTML tags&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 05:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759472#M1116039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T05:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759473#M1116040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using HTML tags but it does not work. Even the tags come in the email body.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 06:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759473#M1116040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T06:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759474#M1116041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhanu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Report SENDLIST&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Sample report from note 190669 for sending lists via SAPconnect&lt;/P&gt;&lt;P&gt;*&amp;amp; for releases as of 6.10:&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp; 1. Use so_document_send_api1 instead of&lt;/P&gt;&lt;P&gt;*&amp;amp; so_new_document_att_send_api1 (same interface)&lt;/P&gt;&lt;P&gt;*&amp;amp; Better yet, use the BCS interface. See below and note 190669&lt;/P&gt;&lt;P&gt;*&amp;amp; 2. Cast recipient structures into receiver-receiver field&lt;/P&gt;&lt;P&gt;*&amp;amp; using a field-symbol&lt;/P&gt;&lt;P&gt;*&amp;amp; 3. Set a commit work statement after the sending&lt;/P&gt;&lt;P&gt;*&amp;amp; or set parameter commit_work at the send module&lt;/P&gt;&lt;P&gt;*&amp;amp; 4. Give binary data of type x not type c to send module, i.e.&lt;/P&gt;&lt;P&gt;*&amp;amp; use structure solix instead of soli and give it to tables&lt;/P&gt;&lt;P&gt;*&amp;amp; parameter contents_hex instead of contents_bin&lt;/P&gt;&lt;P&gt;*&amp;amp; Do this by filling contents_hex directly from the module&lt;/P&gt;&lt;P&gt;*&amp;amp; table_compress. In case of reading the data from spool, convert&lt;/P&gt;&lt;P&gt;*&amp;amp; to solix using so_solitab_to_solixtab&lt;/P&gt;&lt;P&gt;*&amp;amp; 5. Don't calculate document size. It is done internally&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp; Recommendation:&lt;/P&gt;&lt;P&gt;*&amp;amp; Switch to the new BCS interface instead of calling the API1&lt;/P&gt;&lt;P&gt;*&amp;amp; Function module. See Report sendlist_bcs (also within note 190669)&lt;/P&gt;&lt;P&gt;*&amp;amp; for this&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report sendlist line-size 46 no standard page heading message-id so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form create_list_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form create_list_content changing list_content type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st possibility - use "submit &amp;lt;report&amp;gt; exporting list to memory" &lt;/P&gt;&lt;P&gt;this is the recommended way &lt;/P&gt;&lt;P&gt;if submit = 'X'.&lt;/P&gt;&lt;P&gt;perform use_submit changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd possibility - create a new list within this report. &lt;/P&gt;&lt;P&gt;if write = 'X'.&lt;/P&gt;&lt;P&gt;perform write_a_list changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd possibility - get list from spool &lt;/P&gt;&lt;P&gt;if spool = 'X'.&lt;/P&gt;&lt;P&gt;perform get_list_from_spool changing list_content.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "create_list_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form create_text_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form create_text_content changing text_content type soli_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append 'This is the first line' to text_content.&lt;/P&gt;&lt;P&gt;append 'This is the second line' to text_content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;convert the content from RAW to TXT &lt;/P&gt;&lt;P&gt;call function 'SO_RAW_TO_RTF'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;objcont_old = text_content&lt;/P&gt;&lt;P&gt;objcont_new = text_content&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;others = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. "create_text_content&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form SEND&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the list-document and send it via FAX, Mail and RML &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;form send using text_content type soli_tab&lt;/P&gt;&lt;P&gt;list_content type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;structures and internal tables for the send data &lt;/P&gt;&lt;P&gt;data document_data type sodocchgi1.&lt;/P&gt;&lt;P&gt;data packing_list type table of sopcklsti1.&lt;/P&gt;&lt;P&gt;data receivers type table of somlreci1.&lt;/P&gt;&lt;P&gt;data contents_txt type soli_tab.&lt;/P&gt;&lt;P&gt;data contents_hex type solix_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data packlist_wa type sopcklsti1.&lt;/P&gt;&lt;P&gt;data receiver_wa type somlreci1.&lt;/P&gt;&lt;P&gt;data packlist_counter type i.&lt;/P&gt;&lt;P&gt;data sent_to_all type sonv-flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;main document &lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;document data contains information for the whole message &lt;/P&gt;&lt;P&gt;document_data-obj_descr = u2018textu2019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some text for the main document &lt;/P&gt;&lt;P&gt;append u2018textu2019 to contents_txt.&lt;/P&gt;&lt;P&gt;append u2018textu2019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;packlist_counter = 1.&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using contents_txt&lt;/P&gt;&lt;P&gt;'RAW'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add a text attachment of type TXT &lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using text_content&lt;/P&gt;&lt;P&gt;'TXT'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;append lines of text_content to contents_txt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add the list attachment of type ALI &lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;packlist_counter = 1. "because we will fill the hex table now&lt;/P&gt;&lt;P&gt;perform create_packlist_entry using list_content&lt;/P&gt;&lt;P&gt;'ALI'&lt;/P&gt;&lt;P&gt;changing packlist_wa&lt;/P&gt;&lt;P&gt;packlist_counter.&lt;/P&gt;&lt;P&gt;append packlist_wa to packing_list.&lt;/P&gt;&lt;P&gt;append lines of list_content to contents_hex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Send the document by calling the API1 &lt;/P&gt;&lt;P&gt;as of 6.10 either the flag 'commit_work' has to be set &lt;/P&gt;&lt;P&gt;or a commit work statement has to be set somewhere after the call &lt;/P&gt;&lt;P&gt;Sending won't work without this! &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;put_in_outbox = 'X'&lt;/P&gt;&lt;P&gt;commit_work = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;sent_to_all = sent_to_all&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;packing_list = packing_list&lt;/P&gt;&lt;P&gt;contents_txt = contents_txt&lt;/P&gt;&lt;P&gt;contents_hex = contents_hex&lt;/P&gt;&lt;P&gt;receivers = 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;others = 8.&lt;/P&gt;&lt;P&gt;case sy-subrc.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;if sent_to_all is initial.&lt;/P&gt;&lt;P&gt;read table receivers index 1 into receiver_wa.&lt;/P&gt;&lt;P&gt;message i865 with receiver_wa-retrn_code.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;message s022.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;message i552.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;message i023 with document_data-obj_descr.&lt;/P&gt;&lt;P&gt;when 4.&lt;/P&gt;&lt;P&gt;message i471.&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;message i619.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform. " SEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2008 06:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759474#M1116041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-13T06:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing in HTML format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759475#M1116042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the parameter document_data-doc_size, &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;I had&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the same problem, so I solved.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Regards.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Fabrizio&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 15:11:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/emailing-in-html-format/m-p/4759475#M1116042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-14T15:11:52Z</dc:date>
    </item>
  </channel>
</rss>

