<?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 Issue while sending DOCX file as attachments in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710673#M1579067</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;&lt;/P&gt;&lt;P&gt; I am using CL_BCS methods for sending attachements in emails in background, everything works fine except for DOCX extensions. It says the file is correpted while opening. I have tried adding the file name to header table as given in OSS note.&lt;/P&gt;&lt;P&gt;    CONCATENATE '&amp;amp;SO_FILENAME=' lv_filename into lv_text_line.&lt;/P&gt;&lt;P&gt;    append lv_text_line to lt_att_head.&lt;/P&gt;&lt;P&gt;But it just gives the file name with 4 extensions, but the file is still correpted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. My SAP version is 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance,&lt;/P&gt;&lt;P&gt;Farook.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Feb 2011 16:11:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-15T16:11:45Z</dc:date>
    <item>
      <title>Issue while sending DOCX file as attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710673#M1579067</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;&lt;/P&gt;&lt;P&gt; I am using CL_BCS methods for sending attachements in emails in background, everything works fine except for DOCX extensions. It says the file is correpted while opening. I have tried adding the file name to header table as given in OSS note.&lt;/P&gt;&lt;P&gt;    CONCATENATE '&amp;amp;SO_FILENAME=' lv_filename into lv_text_line.&lt;/P&gt;&lt;P&gt;    append lv_text_line to lt_att_head.&lt;/P&gt;&lt;P&gt;But it just gives the file name with 4 extensions, but the file is still correpted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. My SAP version is 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance,&lt;/P&gt;&lt;P&gt;Farook.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 16:11:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710673#M1579067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T16:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while sending DOCX file as attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710674#M1579068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Farook,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the link below:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1828791"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above link, some useful link is provided by Christoph Hopf. Also, the creater of the thread solved Word (docx) file corruption issue with the help of SAP note 1459896.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eventually i have fixed the the corruption of DOCX(MS office 2007) files by referring to SAP note 1459896.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 19:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710674#M1579068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T19:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while sending DOCX file as attachments</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710675#M1579069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Docs or pdfs or xls &lt;/P&gt;&lt;P&gt;use SCMS_BINARY_TO_XSTRING and SCMS_XSTRING_TO_BINARY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From here - catch the size of the attachment and pass it onto add_attachment method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a docx or xlsx, then pass on the header oss note 1459896&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lr_document-&amp;gt;add_attachment(&lt;/P&gt;&lt;P&gt;i_attachment_type = lv_objtp "'PDF'&lt;/P&gt;&lt;P&gt;i_attachment_subject = lv_attachment_subject&lt;/P&gt;&lt;P&gt;i_attachment_size = lv_size_char "size from SCMS_XSTRING_TO_BINARY &lt;/P&gt;&lt;P&gt;i_att_content_hex = lt_content_bin&lt;/P&gt;&lt;P&gt;i_attachment_header = lt_att_head&lt;/P&gt;&lt;P&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also - may be useful - &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="9886023"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 19:44:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-while-sending-docx-file-as-attachments/m-p/7710675#M1579069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-15T19:44:31Z</dc:date>
    </item>
  </channel>
</rss>

