<?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 problem with email attachment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453796#M214648</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;&lt;/P&gt;&lt;P&gt;I am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send a excel file as an attachment to a email address and I am facing the following problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I receive the email along with excel attachment if i try to open the excel attachment I am getting an warning saying &lt;/P&gt;&lt;P&gt;" THIS FILE IS NOT IN A RECOGNIZABLE FORMAT"&lt;/P&gt;&lt;P&gt;but if i say okay I am getting the required ecxel data which i sent through email.&lt;/P&gt;&lt;P&gt;Why i am gettinmg this warning .Please advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Praneeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jul 2006 12:13:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-07T12:13:01Z</dc:date>
    <item>
      <title>problem with email attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453796#M214648</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;&lt;/P&gt;&lt;P&gt;I am using FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send a excel file as an attachment to a email address and I am facing the following problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I receive the email along with excel attachment if i try to open the excel attachment I am getting an warning saying &lt;/P&gt;&lt;P&gt;" THIS FILE IS NOT IN A RECOGNIZABLE FORMAT"&lt;/P&gt;&lt;P&gt;but if i say okay I am getting the required ecxel data which i sent through email.&lt;/P&gt;&lt;P&gt;Why i am gettinmg this warning .Please advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Praneeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453796#M214648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem with email attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453797#M214649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are not building the e-mail and the attachment correctly prior to calling the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide your code for review.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:23:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453797#M214649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: problem with email attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453798#M214650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching my code below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_doc_chng-obj_descr = text-100.&lt;/P&gt;&lt;P&gt;w_doc_chng-obj_name = text-101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*BODY OF THE MAIL&lt;/P&gt;&lt;P&gt;w_objtxt = text-102.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-105.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-103.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-105.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-104.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-105.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-106.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;P&gt;w_objtxt = text-107.&lt;/P&gt;&lt;P&gt;APPEND w_objtxt TO i_objtxt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLEAR w_objtxt.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To determine document size.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DESCRIBE TABLE i_objtxt LINES tab_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE i_objtxt INTO w_objtxt INDEX tab_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( w_objtxt ).&lt;/P&gt;&lt;P&gt;APPEND w_doc_chng TO i_doc_chng.&lt;/P&gt;&lt;P&gt;CLEAR w_doc_chng.&lt;/P&gt;&lt;P&gt;READ TABLE i_doc_chng INTO w_doc_chng INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the entry for document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR w_objpack-transf_bin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_objpack-head_start = 1.&lt;/P&gt;&lt;P&gt;w_objpack-head_num = 0.&lt;/P&gt;&lt;P&gt;w_objpack-body_start = 1.&lt;/P&gt;&lt;P&gt;w_objpack-body_num = tab_lines.&lt;/P&gt;&lt;P&gt;w_objpack-doc_type = 'RAW'.&lt;/P&gt;&lt;P&gt;APPEND w_objpack TO i_objpack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the document attachment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_inv_rep INTO w_inv_rep.&lt;/P&gt;&lt;P&gt;w_itobjbin-version_num = w_inv_rep-version_num.&lt;/P&gt;&lt;P&gt;w_itobjbin-date_of_run = w_inv_rep-date_of_run.&lt;/P&gt;&lt;P&gt;w_itobjbin-time_of_run = w_inv_rep-time_of_run.&lt;/P&gt;&lt;P&gt;w_itobjbin-company_code = w_inv_rep-company_code.&lt;/P&gt;&lt;P&gt;w_itobjbin-plant = w_inv_rep-plant.&lt;/P&gt;&lt;P&gt;w_itobjbin-bdc_item_no = w_inv_rep-bdc_item_no.&lt;/P&gt;&lt;P&gt;w_itobjbin-dcs_stock = w_inv_rep-dcs_stock.&lt;/P&gt;&lt;P&gt;APPEND w_itobjbin TO i_itobjbin.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM build_xls_data_table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE i_objbin LINES tab_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_objhead = 'Control Report.DAT'.&lt;/P&gt;&lt;P&gt;APPEND w_objhead TO i_objhead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the entry for the compressed attachment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_objpack-transf_bin = 'X'.&lt;/P&gt;&lt;P&gt;w_objpack-head_start = 1.&lt;/P&gt;&lt;P&gt;w_objpack-head_num = 1.&lt;/P&gt;&lt;P&gt;w_objpack-body_start = 1.&lt;/P&gt;&lt;P&gt;w_objpack-body_num = tab_lines.&lt;/P&gt;&lt;P&gt;w_objpack-doc_type = 'xls'.&lt;/P&gt;&lt;P&gt;w_objpack-obj_name = 'ATTACHMENT'.&lt;/P&gt;&lt;P&gt;w_objpack-obj_descr = 'xls'.&lt;/P&gt;&lt;P&gt;w_objpack-doc_size = tab_lines * 255.&lt;/P&gt;&lt;P&gt;APPEND w_objpack TO i_objpack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Entering names &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_reclist-receiver = 'kumapra@gmail.com'.&lt;/P&gt;&lt;P&gt;w_reclist-rec_type = 'U'.&lt;/P&gt;&lt;P&gt;APPEND w_reclist TO i_reclist.&lt;/P&gt;&lt;P&gt;Clear w_reclist.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;document_data = w_doc_chng&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;TABLES&lt;/P&gt;&lt;P&gt;packing_list = i_objpack&lt;/P&gt;&lt;P&gt;object_header = i_objhead&lt;/P&gt;&lt;P&gt;contents_bin = i_objbin&lt;/P&gt;&lt;P&gt;contents_txt = i_objtxt&lt;/P&gt;&lt;P&gt;receivers = i_reclist&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;operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;OTHERS = 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM build_xls_data_table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR : i_objbin, i_objbin[].&lt;/P&gt;&lt;P&gt;CONCATENATE 'Version No.' 'Date of Program Run' 'Time of Program Run' 'Company Code' 'Plant'&lt;/P&gt;&lt;P&gt;'BDC Item' 'DCS Stock' INTO w_objbin SEPARATED BY&lt;/P&gt;&lt;P&gt;cl_abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND w_objbin TO i_objbin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_itobjbin INTO w_itobjbin .&lt;/P&gt;&lt;P&gt;CONCATENATE w_itobjbin-version_num w_itobjbin-date_of_run w_itobjbin-time_of_run w_itobjbin-company_code&lt;/P&gt;&lt;P&gt;w_itobjbin-plant w_itobjbin-bdc_item_no w_itobjbin-dcs_stock&lt;/P&gt;&lt;P&gt;INTO w_objbin SEPARATED BY cl_abap_char_utilities=&amp;gt;horizontal_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE cl_abap_char_utilities=&amp;gt;cr_lf w_objbin INTO w_objbin.&lt;/P&gt;&lt;P&gt;APPEND w_objbin TO i_objbin.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise..&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Praneeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 12:29:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453798#M214650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T12:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with email attachment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453799#M214651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at my coding in the following thread. I think this might help you.&lt;/P&gt;&lt;P&gt;&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="4020225"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Georg-Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 15:55:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-email-attachment/m-p/1453799#M214651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T15:55:07Z</dc:date>
    </item>
  </channel>
</rss>

