<?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: XML Attachment problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902545#M1328280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are using a ST or XSLT transformation you might have been using some style sheet which does not exist in the person who is opening the attachment...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Styles&amp;gt;
  &amp;lt;Style ss:ID="Default" ss:Name="Normal"&amp;gt;
   &amp;lt;Alignment ss:Vertical="Bottom"/&amp;gt;
   &amp;lt;Borders/&amp;gt;
   &amp;lt;Font/&amp;gt;
   &amp;lt;Interior/&amp;gt;
   &amp;lt;NumberFormat/&amp;gt;
   &amp;lt;Protection/&amp;gt;
  &amp;lt;/Style&amp;gt;
  &amp;lt;Style ss:ID="s23"&amp;gt;
   &amp;lt;Font x:Family="Swiss" ss:Size="12" ss:Bold="1"/&amp;gt;
   &amp;lt;Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/&amp;gt;
  &amp;lt;/Style&amp;gt;
  &amp;lt;Style ss:ID="s26"&amp;gt;
   &amp;lt;Font ss:FontName="Book Antiqua" x:Family="Roman"/&amp;gt;
  &amp;lt;/Style&amp;gt;
 &amp;lt;/Styles&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2009 22:50:58 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2009-07-08T22:50:58Z</dc:date>
    <item>
      <title>XML Attachment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902543#M1328278</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;  My requirement is to send an xml document as an attachment to e-mail. I am getting the attachment in mail but when tried to open, the data is missing instead i am getting message as "&lt;STRONG&gt;The XML page cannot be displayed."&lt;/STRONG&gt; &lt;STRONG&gt;Cannot view XML input using XSL style sheet. Please correct&lt;/STRONG&gt;. I tried using fn. module "SO_DOCUMENT_SEND_API1" as well as using "add_attachment" method. In both the versions i am getting the attachment but not the xml data. Any solution is very much appriciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 20:05:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902543#M1328278</guid>
      <dc:creator>former_member368216</dc:creator>
      <dc:date>2009-07-08T20:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: XML Attachment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902544#M1328279</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;In order to give exact soulution need to know how you are generating the xml?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.If you are concatenating the tags for xml into itab and if your data is in readable format..&lt;/P&gt;&lt;P&gt;Make it to string format and use FMs' SCMS_STRING_TO_XSTRING and SCMS_XSTRING_TO_BINARY.&lt;/P&gt;&lt;P&gt;Then pass the binary tab to &lt;/P&gt;&lt;P&gt;            DOCUMENT = CL_DOCUMENT_BCS=&amp;gt;CREATE_DOCUMENT(&lt;/P&gt;&lt;P&gt;                                I_TYPE    = DOCUMENTS_LINE-TYPE&lt;/P&gt;&lt;P&gt;                                I_HEX     = DOCUMENTS_LINE-CONTENT_HEX&lt;/P&gt;&lt;P&gt;                                I_SUBJECT = DOCUMENTS_LINE-SUBJECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. if you are using DOM concept and redering the XML doc, Need to calculate the exact size before creating the attachment and create attachment as beloew: Here l_xml_table is already a Binary table&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Preparing contents of attachment with Change Log&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_con_pos = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE FIELD wa_XML LENGTH l_xml_len IN BYTE MODE.&lt;/P&gt;&lt;P&gt;  DESCRIBE FIELD wa_attachx LENGTH l_con_len IN BYTE MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT l_xml_table INTO wa_xml.&lt;/P&gt;&lt;P&gt;    ASSIGN wa_xml TO &amp;lt;fs_con&amp;gt; CASTING.&lt;/P&gt;&lt;P&gt;    CHECK sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    DO l_xml_len TIMES.&lt;/P&gt;&lt;P&gt;      l_xml_pos = sy-index - 1.&lt;/P&gt;&lt;P&gt;      IF l_con_pos = l_con_len.&lt;/P&gt;&lt;P&gt;        APPEND wa_attachx TO i_attachx.&lt;/P&gt;&lt;P&gt;        FREE wa_attachx.&lt;/P&gt;&lt;P&gt;        l_con_pos = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MOVE &amp;lt;fs_con&amp;gt;&lt;EM&gt;l_xml_pos(1) TO wa_attachx-line&lt;/EM&gt;l_con_pos(1).&lt;/P&gt;&lt;P&gt;      ADD 1 TO l_con_pos.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Size of XML Document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      l_size = L_XML_SIZE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Adding Attachment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL METHOD lv_document-&amp;gt;add_attachment&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_attachment_type    = c_ext&lt;/P&gt;&lt;P&gt;          i_attachment_size    = l_size&lt;/P&gt;&lt;P&gt;          i_attachment_subject = C_TITLE&lt;/P&gt;&lt;P&gt;          i_att_content_hex    = i_attachx[].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 22:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902544#M1328279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T22:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: XML Attachment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902545#M1328280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are using a ST or XSLT transformation you might have been using some style sheet which does not exist in the person who is opening the attachment...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Styles&amp;gt;
  &amp;lt;Style ss:ID="Default" ss:Name="Normal"&amp;gt;
   &amp;lt;Alignment ss:Vertical="Bottom"/&amp;gt;
   &amp;lt;Borders/&amp;gt;
   &amp;lt;Font/&amp;gt;
   &amp;lt;Interior/&amp;gt;
   &amp;lt;NumberFormat/&amp;gt;
   &amp;lt;Protection/&amp;gt;
  &amp;lt;/Style&amp;gt;
  &amp;lt;Style ss:ID="s23"&amp;gt;
   &amp;lt;Font x:Family="Swiss" ss:Size="12" ss:Bold="1"/&amp;gt;
   &amp;lt;Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/&amp;gt;
  &amp;lt;/Style&amp;gt;
  &amp;lt;Style ss:ID="s26"&amp;gt;
   &amp;lt;Font ss:FontName="Book Antiqua" x:Family="Roman"/&amp;gt;
  &amp;lt;/Style&amp;gt;
 &amp;lt;/Styles&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 22:50:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902545#M1328280</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-07-08T22:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: XML Attachment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902546#M1328281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for support. Issue is resolved. This is because of some additional characters getting populated into the XML line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2009 17:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902546#M1328281</guid>
      <dc:creator>former_member368216</dc:creator>
      <dc:date>2009-07-30T17:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: XML Attachment problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902547#M1328282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;About the solution below, would you send me a complete program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 13:15:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-attachment-problem/m-p/5902547#M1328282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T13:15:07Z</dc:date>
    </item>
  </channel>
</rss>

