<?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: Flat file upload in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598910#M1276053</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 can use the GUI_UPLOAD to upload the tab delimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filetype should be 'DAT' and HAS_FIELD_SEPARATOR should be 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2009 05:10:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-11T05:10:25Z</dc:date>
    <item>
      <title>Flat file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598909#M1276052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the flat file is of tab delimited type, means is it excel or text file ? How to upload that file into Internal table. Because, if excel we have to use 'ALSM_excel_to_internal table'. If text file  no need to use this FM. Please guide. It is just given that, flat file is of tab delimited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;khad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 05:07:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598909#M1276052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T05:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598910#M1276053</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 can use the GUI_UPLOAD to upload the tab delimited file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Filetype should be 'DAT' and HAS_FIELD_SEPARATOR should be 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 05:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598910#M1276053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T05:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598911#M1276054</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  for upload the flat file it may be asc ,tab deliminated .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check below link for bdc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/bdc&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/bdc&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&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;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 05:39:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598911#M1276054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T05:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file upload</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598912#M1276055</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 the following code to upload file in excel format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: tb_file_data TYPE TABLE OF text4096,
      tb_testfile TYPE TABLE OF ty_testfile,
      tb_testfile_file TYPE TABLE OF ty_testfile_file.


  DATA: lv_file_name TYPE rlgrap-filename.
  lv_file_name = pa_filep.
* To upload file in excel format
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
      i_line_header        = ''
      i_tab_raw_data       = tb_file_data
      i_filename           = lv_file_name
    TABLES
      i_tab_converted_data = tb_testfile_file
    EXCEPTIONS
      conversion_failed    = 1
      OTHERS               = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below code to upload file in tab delimited format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: tb_testfile TYPE TABLE OF ty_testfile,
      tb_testfile_file TYPE TABLE OF ty_testfile_file.

  DATA: lv_filetype(10) TYPE c,
        lv_gui_sep TYPE c,
        lv_file_name TYPE string.
  lv_filetype = 'ASC'.
  lv_gui_sep = 'X'.
  lv_file_name = pa_filep.
* FM call to upload file
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = lv_file_name
      filetype                = lv_filetype
      has_field_separator     = lv_gui_sep
    TABLES
      data_tab                = tb_testfile_file
    EXCEPTIONS
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      dp_timeout              = 16
      OTHERS                  = 17.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 05:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-upload/m-p/5598912#M1276055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T05:44:06Z</dc:date>
    </item>
  </channel>
</rss>

