<?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 Create attachment using GOS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518146#M569833</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 have a problem while I attach a file (.doc, .pdf, .jpeg) automatically to a custom's declaration document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a program and file attachment is working fine, but when I tried opening the document in the customs declartion screen, the file is corrupted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For foreground, I am using function module gui_upload, but after upload, .doc file, .pdf file are corrupted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me regarding this.... following is the code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              filename = p_file&lt;/P&gt;&lt;P&gt;            TABLES&lt;/P&gt;&lt;P&gt;              data_tab = lt_doc_content.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks in advace.&lt;/P&gt;&lt;P&gt;Jaffer Ali.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2007 20:12:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-09T20:12:27Z</dc:date>
    <item>
      <title>Create attachment using GOS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518146#M569833</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 have a problem while I attach a file (.doc, .pdf, .jpeg) automatically to a custom's declaration document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote a program and file attachment is working fine, but when I tried opening the document in the customs declartion screen, the file is corrupted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For foreground, I am using function module gui_upload, but after upload, .doc file, .pdf file are corrupted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me regarding this.... following is the code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;              filename = p_file&lt;/P&gt;&lt;P&gt;            TABLES&lt;/P&gt;&lt;P&gt;              data_tab = lt_doc_content.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks in advace.&lt;/P&gt;&lt;P&gt;Jaffer Ali.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2007 20:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518146#M569833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-09T20:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create attachment using GOS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518147#M569834</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;The GUI_UPLOAD Function module is used to upload BIN and ASC Files. The files that can be uploaded are text files. Convert the word documents into a normal text file. It will be uploaded without any problem with in the internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" The module loads a file from the PC to the server. Data can be transferred binarily or as text. Numbers and date fields can be interpreted according to the user settings." - Function Module Documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the other format you need some other function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please rewards points if found useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 03:22:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518147#M569834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T03:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create attachment using GOS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518148#M569835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For uploading pdf, doc files (binary) use filetype  = 'BIN' as..&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = iv_filename&lt;/P&gt;&lt;P&gt;      filetype                = 'BIN'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   has_field_separator     = space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   header_length           = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    read_by_line            = ''&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   dat_mode                = space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   codepage                = space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ignore_cerr             = abap_true&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   replacement             = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   virus_scan_profile      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;    filelength              = lv_filelength&lt;/P&gt;&lt;P&gt;      header                  = lv_fileheader&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab                = lt_filedata&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhijit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for helpful answers..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Abhijit V Patil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 03:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518148#M569835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T03:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create attachment using GOS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518149#M569836</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;You have to use the Function Module GUI_UPLOAD to upload .doc and .pdf files. But take care of the format as SAP follows UNICODE and the same needs to be there in the files that you are uploading. The uploaded files must be UNICODE enabled. As for the function module there is an option where you can decide the file type. If the format is not compatible then the internal table will be filled with junk details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use this Function Module: WS_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Samantak &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2007 06:53:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-attachment-using-gos/m-p/2518149#M569836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-10T06:53:30Z</dc:date>
    </item>
  </channel>
</rss>

