<?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: Getting X_error while using cl_document_bcs-&amp;gt;add_attachment . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576969#M1660454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Playsuji,&lt;/P&gt;&lt;P&gt;                 Have used Caps now but still no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code :&lt;/P&gt;&lt;P&gt;CALL METHOD v_document-&amp;gt;add_attachment&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            i_attachment_type    = 'PDF' "c_attch_type&lt;/P&gt;&lt;P&gt;            i_attachment_subject = 'attach'&lt;/P&gt;&lt;P&gt;            I_ATTACHMENT_SIZE    = l_size&lt;/P&gt;&lt;P&gt;            I_ATT_CONTENT_HEX    = it_line_bin_solix.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_att_content_text   = it_line.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CATCH cx_document_bcs into ex_root.&lt;/P&gt;&lt;P&gt; MOVE ex_root-&amp;gt;get_text( ) TO trace_message.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any configurations to be maintained for attachments , i doubt it as i am getting  the normal mail without attachments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mithun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jan 2012 08:46:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-01-25T08:46:02Z</dc:date>
    <item>
      <title>Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576965#M1660450</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;         I have a requirement to consider the data given  input, create a pdf file add it as attachment and send it as an email. I am using the cl_document_bcs-&amp;gt;add_attachment  but getting the X_ERROR , on debugging it i find that at certain point there is no RFC destination in Profile is the error due to this ?  &lt;/P&gt;&lt;P&gt;       Other thing is that the program is wroking fine to send a normal email without any attachment, but  creating an attachment adn sending is failing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD v_document-&amp;gt;add_attachment
          EXPORTING
            i_attachment_type    = 'pdf' "c_attch_type
            i_attachment_subject = 'attach'
            I_ATTACHMENT_SIZE    = l_size
            I_ATT_CONTENT_HEX    = it_line_bin_solix
            i_att_content_text   = it_line.
CATCH cx_document_bcs into ex_root.
 MOVE ex_root-&amp;gt;get_text( ) TO trace_message.
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;added code tags&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly give suggestions on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mithun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 25, 2012 1:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 07:26:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576965#M1660450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-25T07:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576966#M1660451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are You sure that you have give 'PDF' in caps in your program? and check whether you are getting all the datas before calling the method.&lt;/P&gt;&lt;P&gt;in my program, i have used like this and it is working fine for me,&lt;/P&gt;&lt;P&gt;I am getting PDF content from the form...&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA  ls_formoutput     TYPE fpformoutput.
  DATA  pdf_content        TYPE solix_tab.
  DATA  lp_pdf_size        TYPE so_obj_len.
DATA  lv_mail_title      TYPE so_obj_des.
*Attach the PDF .
      lp_pdf_size = XSTRLEN( ls_formoutput-pdf ).
      pdf_content = cl_document_bcs=&amp;gt;xstring_to_solix(
          ip_xstring = ls_formoutput-pdf ).

      document-&amp;gt;add_attachment(
        i_attachment_type     = 'PDF'
        i_att_content_hex     = pdf_content
        i_attachment_size     = lp_pdf_size
        i_attachment_subject  = lv_mail_title ) .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 07:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576966#M1660451</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2012-01-25T07:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576967#M1660452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE ex_root-&amp;gt;get_text( ) TO trace_message.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share the details of &lt;EM&gt;trace_message&lt;/EM&gt; ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, why are you passing both the text &amp;amp; binary data together(params &lt;EM&gt;I_ATT_CONTENT_HEX&lt;/EM&gt; &amp;amp; &lt;EM&gt;i_att_content_text&lt;/EM&gt; )? Try passing either one of these &amp;amp; check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 07:41:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576967#M1660452</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-01-25T07:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576968#M1660453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suhas , &lt;/P&gt;&lt;P&gt;                I have now tried only with one but still the same error trace message just says "An exception has occured". But when i debug it shows X_ERROR and while i try to debug further i find that  it goes to  SO_ATTACHMENT_INSERT_API1  then to SO_ATTACHMENT_INSERT , in this we have CALL FUNCTION 'SO_ATTACHMENT_INSERT' DESTINATION PROFILE-RFCDES where RFCDES is shown as none for my case and it is not going in this FM , later on it asks for SO_EXT_DB_EXIT exit funciton which is not present in my system and give sout this error.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mithun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 08:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576968#M1660453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-25T08:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576969#M1660454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Playsuji,&lt;/P&gt;&lt;P&gt;                 Have used Caps now but still no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code :&lt;/P&gt;&lt;P&gt;CALL METHOD v_document-&amp;gt;add_attachment&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            i_attachment_type    = 'PDF' "c_attch_type&lt;/P&gt;&lt;P&gt;            i_attachment_subject = 'attach'&lt;/P&gt;&lt;P&gt;            I_ATTACHMENT_SIZE    = l_size&lt;/P&gt;&lt;P&gt;            I_ATT_CONTENT_HEX    = it_line_bin_solix.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           i_att_content_text   = it_line.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CATCH cx_document_bcs into ex_root.&lt;/P&gt;&lt;P&gt; MOVE ex_root-&amp;gt;get_text( ) TO trace_message.&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any configurations to be maintained for attachments , i doubt it as i am getting  the normal mail without attachments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mithun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 08:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576969#M1660454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-25T08:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting X_error while using cl_document_bcs-&gt;add_attachment .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576970#M1660455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my system &lt;EM&gt;SO_EXT_DB_EXIT&lt;/EM&gt; FM does not exist &amp;amp; is not called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure &lt;EM&gt;X_ERROR&lt;/EM&gt; is not raised here, debug properly &amp;amp; get back with your observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 25, 2012 4:01 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 10:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-x-error-while-using-cl-document-bcs-gt-add-attachment/m-p/8576970#M1660455</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-01-25T10:28:56Z</dc:date>
    </item>
  </channel>
</rss>

