<?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: BDC - upload (text file) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503688#M232968</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; Use GUI_UPLOAD this should be perfect for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Aug 2006 00:23:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-01T00:23:32Z</dc:date>
    <item>
      <title>BDC - upload (text file)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503687#M232967</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 my input text file with tab delimited data. I want to upload the data from text file into internal table. Which function module shall I use. Is it WS_UPLOAD or GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also my input text file has column headings in the first line. I dont want the column headings. Instead I want to read the data from the second line of my input file. How can I do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for replies...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 00:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503687#M232967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-01T00:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: BDC - upload (text file)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503688#M232968</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; Use GUI_UPLOAD this should be perfect for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 00:23:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503688#M232968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-01T00:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: BDC - upload (text file)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503689#M232969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working with TAB delimited or comma delimited files, I usually like to upload to a flat structure then parse each record into appropriate fields.  You can do this using the GUI_UPLOAD.  Here is a sample program.  You can just delete the first line after upload to remove the column headings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

types: begin of ttab,
       rec(1000) type c,
       end of ttab.

types: begin of tdat,
       fld1(10) type c,
       fld2(10) type c,
       fld3(10) type c,
       end of tdat.

data: itab type table of ttab with header line.
data: idat type table of tdat with header line.

data: file_str type string.

parameters: p_file type localfile.

at selection-screen on value-request for p_file.
  call function 'KD_GET_FILENAME_ON_F4'
       exporting
            static    = 'X'
       changing
            file_name = p_file.

start-of-selection.

  file_str = p_file.

  call function 'GUI_UPLOAD'
       exporting
            filename                = file_str
       tables
            data_tab                = itab
       exceptions
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            others                  = 17.


delete itab index 1.

  loop at itab.
    clear idat.
    split itab-rec at cl_abap_char_utilities=&amp;gt;horizontal_tab
                          into idat-fld1
                               idat-fld2
                               idat-fld3.
    append idat.

  endloop.


  loop at idat.
    write:/ idat-fld1, idat-fld2, idat-fld3.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 00:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503689#M232969</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-01T00:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: BDC - upload (text file)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503690#M232970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/79/c554a3b3dc11d5993800508b6b8b11/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/79/c554a3b3dc11d5993800508b6b8b11/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prashanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S please mark helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 00:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503690#M232970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-01T00:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: BDC - upload (text file)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503691#M232971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  1. Use the FM GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;  2. Read the table with the condition of the header.&lt;/P&gt;&lt;P&gt;  3. Check for sy-subrc and remove the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azaz Ali.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2006 00:30:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-upload-text-file/m-p/1503691#M232971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-01T00:30:13Z</dc:date>
    </item>
  </channel>
</rss>

