<?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: Read *.tab file into internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558350#M2007456</link>
    <description>&lt;P&gt;Hi, &lt;BR /&gt;i created a small demo report in my system and it was working finde.&lt;/P&gt;&lt;P&gt;See the following code-snippet:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zjz_tab.&lt;BR /&gt;&lt;BR /&gt;TYPES: BEGIN OF ts_data,&lt;BR /&gt;         matnr TYPE matnr,&lt;BR /&gt;         maktx TYPE maktx,&lt;BR /&gt;         matkl TYPE matkl,&lt;BR /&gt;         brgew TYPE brgew,&lt;BR /&gt;         ntgew TYPE ntgew,&lt;BR /&gt;         gewei TYPE gewei,&lt;BR /&gt;       END OF ts_data.&lt;BR /&gt;&lt;BR /&gt;DATA: lt_data TYPE TABLE OF ts_data.&lt;BR /&gt;&lt;BR /&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;BR /&gt;  EXPORTING&lt;BR /&gt;    filename                = 'C:\temp\data.tab'&lt;BR /&gt;    filetype                = 'ASC'&lt;BR /&gt;    has_field_separator     = abap_true&lt;BR /&gt;  CHANGING&lt;BR /&gt;    data_tab                = lt_data&lt;BR /&gt;  EXCEPTIONS&lt;BR /&gt;    file_open_error         = 1&lt;BR /&gt;    file_read_error         = 2&lt;BR /&gt;    no_batch                = 3&lt;BR /&gt;    gui_refuse_filetransfer = 4&lt;BR /&gt;    invalid_type            = 5&lt;BR /&gt;    no_authority            = 6&lt;BR /&gt;    unknown_error           = 7&lt;BR /&gt;    bad_data_format         = 8&lt;BR /&gt;    header_not_allowed      = 9&lt;BR /&gt;    separator_not_allowed   = 10&lt;BR /&gt;    header_too_long         = 11&lt;BR /&gt;    unknown_dp_error        = 12&lt;BR /&gt;    access_denied           = 13&lt;BR /&gt;    dp_out_of_memory        = 14&lt;BR /&gt;    disk_full               = 15&lt;BR /&gt;    dp_timeout              = 16&lt;BR /&gt;    not_supported_by_gui    = 17&lt;BR /&gt;    error_no_gui            = 18&lt;BR /&gt;    OTHERS                  = 19.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is my test file for the given report (separated by tabulators):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MATNR	MAKTX	MATKL	12	13	KG&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also had first the same issue with Return-Code 8 (BAD_DATA_FORMAT). This comes up when the content of a column does not fit to the data type of the column. Maybe you check this again in detail?&lt;/P&gt;&lt;P&gt;I hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;BR /&gt;Jens&lt;/P&gt;</description>
    <pubDate>Wed, 23 Mar 2022 07:45:51 GMT</pubDate>
    <dc:creator>Jeansy</dc:creator>
    <dc:date>2022-03-23T07:45:51Z</dc:date>
    <item>
      <title>Read *.tab file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558346#M2007452</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I am using the Class method &lt;/P&gt;
  &lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;BR /&gt; EXPORTING&lt;BR /&gt; filename = l_file&lt;BR /&gt; filetype = c_filetype (ASC)&lt;BR /&gt; has_field_separator = c_checked (X)&lt;BR /&gt; read_by_line = c_checked (X)&lt;BR /&gt; CHANGING&lt;BR /&gt; data_tab = i_input_table&lt;/P&gt;
  &lt;P&gt;The file I have has columns tab delimited and the file is also stored as *.tab on presentation server. When executing this program i keep getting the error bad_data_format. Kindly help.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Salil&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 14:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558346#M2007452</guid>
      <dc:creator>salilvaidya</dc:creator>
      <dc:date>2022-03-22T14:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Read *.tab file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558347#M2007453</link>
      <description>&lt;P&gt;The question has been already asked and answered a lot in the forum:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"gui_upload" "bad_data_format" site:sap.com&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Mar 2022 14:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558347#M2007453</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-03-22T14:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Read *.tab file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558348#M2007454</link>
      <description>&lt;P&gt;yes i understand that similar question has already been asked but this is specific to file with extension *.tab and tab delimited&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 16:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558348#M2007454</guid>
      <dc:creator>salilvaidya</dc:creator>
      <dc:date>2022-03-22T16:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read *.tab file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558349#M2007455</link>
      <description>&lt;P&gt;On the left of the "Your Answer" text box, there's the text&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You should leave a comment to your question, not answer it.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 06:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558349#M2007455</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-03-23T06:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Read *.tab file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558350#M2007456</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;i created a small demo report in my system and it was working finde.&lt;/P&gt;&lt;P&gt;See the following code-snippet:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zjz_tab.&lt;BR /&gt;&lt;BR /&gt;TYPES: BEGIN OF ts_data,&lt;BR /&gt;         matnr TYPE matnr,&lt;BR /&gt;         maktx TYPE maktx,&lt;BR /&gt;         matkl TYPE matkl,&lt;BR /&gt;         brgew TYPE brgew,&lt;BR /&gt;         ntgew TYPE ntgew,&lt;BR /&gt;         gewei TYPE gewei,&lt;BR /&gt;       END OF ts_data.&lt;BR /&gt;&lt;BR /&gt;DATA: lt_data TYPE TABLE OF ts_data.&lt;BR /&gt;&lt;BR /&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload&lt;BR /&gt;  EXPORTING&lt;BR /&gt;    filename                = 'C:\temp\data.tab'&lt;BR /&gt;    filetype                = 'ASC'&lt;BR /&gt;    has_field_separator     = abap_true&lt;BR /&gt;  CHANGING&lt;BR /&gt;    data_tab                = lt_data&lt;BR /&gt;  EXCEPTIONS&lt;BR /&gt;    file_open_error         = 1&lt;BR /&gt;    file_read_error         = 2&lt;BR /&gt;    no_batch                = 3&lt;BR /&gt;    gui_refuse_filetransfer = 4&lt;BR /&gt;    invalid_type            = 5&lt;BR /&gt;    no_authority            = 6&lt;BR /&gt;    unknown_error           = 7&lt;BR /&gt;    bad_data_format         = 8&lt;BR /&gt;    header_not_allowed      = 9&lt;BR /&gt;    separator_not_allowed   = 10&lt;BR /&gt;    header_too_long         = 11&lt;BR /&gt;    unknown_dp_error        = 12&lt;BR /&gt;    access_denied           = 13&lt;BR /&gt;    dp_out_of_memory        = 14&lt;BR /&gt;    disk_full               = 15&lt;BR /&gt;    dp_timeout              = 16&lt;BR /&gt;    not_supported_by_gui    = 17&lt;BR /&gt;    error_no_gui            = 18&lt;BR /&gt;    OTHERS                  = 19.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is my test file for the given report (separated by tabulators):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MATNR	MAKTX	MATKL	12	13	KG&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also had first the same issue with Return-Code 8 (BAD_DATA_FORMAT). This comes up when the content of a column does not fit to the data type of the column. Maybe you check this again in detail?&lt;/P&gt;&lt;P&gt;I hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;BR /&gt;Jens&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 07:45:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-tab-file-into-internal-table/m-p/12558350#M2007456</guid>
      <dc:creator>Jeansy</dc:creator>
      <dc:date>2022-03-23T07:45:51Z</dc:date>
    </item>
  </channel>
</rss>

