<?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: File reading into internal table without defined structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720207#M33579</link>
    <description>&lt;P&gt;So you should read the question more carefully, he asked about how to resolve the replace of # characters when upload file to abap, above is my suggestion to achive it. Clearly, as we see his code, he going to use RTTS to do dynamic table.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Fri, 27 Jul 2018 02:10:30 GMT</pubDate>
    <dc:creator>DoanManhQuynh</dc:creator>
    <dc:date>2018-07-27T02:10:30Z</dc:date>
    <item>
      <title>File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720198#M33570</link>
      <description>&lt;P&gt;Dear Experts &lt;/P&gt;
  &lt;P&gt; I am trying to achieve dynamic reading of file from presentation server. The file structure will be know only at run time. i tried to do it but i am getting # between every column. Please find the code below.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/176307-abap-debugging.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;

SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}

PARAMETERS: p_tabnam TYPE tabname,

            p_selfl1 TYPE edpline,

            p_value  TYPE edpline,

            p_where1 TYPE edpline.



PARAMETERS: p_file TYPE ibipparms-path.

DATA: file TYPE string.



DATA: it_tab TYPE TABLE OF zfile,

      wa_tab TYPE zfile.





DATA: lt_where    TYPE TABLE OF edpline,

      lt_sel_list TYPE TABLE OF edpline,

      l_wa_name   TYPE string,

      ls_where    TYPE edpline,

      l_having    TYPE string,

      dref        TYPE REF TO data,

      itab_type   TYPE REF TO cl_abap_tabledescr,

      struct_type TYPE REF TO cl_abap_structdescr,

      elem_type   TYPE REF TO cl_abap_elemdescr,

      comp_tab    TYPE cl_abap_structdescr=&amp;gt;component_table,

      comp_fld    TYPE cl_abap_structdescr=&amp;gt;component.



TYPES: f_count TYPE i.



FIELD-SYMBOLS : &amp;lt;lt_outtab&amp;gt; TYPE ANY TABLE,

                "*                &amp;lt;ls_outtab&amp;gt; TYPE ANY,

                &amp;lt;l_fld&amp;gt;     TYPE any.







AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  CALL FUNCTION 'F4_FILENAME'

    EXPORTING

      field_name = 'P_FILE'

    IMPORTING

      file_name  = p_file.

  file = p_file.




SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}

 CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

      filename            = file

      filetype            = 'ASC'

      has_field_separator = ' '

*     HEADER_LENGTH       = 0

*     READ_BY_LINE        = 'X'

*     DAT_MODE            = ' '

*     CODEPAGE            = ' '

*     IGNORE_CERR         = ABAP_TRUE

*     REPLACEMENT         = '#'

*     CHECK_BOM           = ' '

*     VIRUS_SCAN_PROFILE  =

*     NO_AUTH_CHECK       = ' '

*   IMPORTING

*     FILELENGTH          =

*     HEADER              =

    TABLES

      data_tab            = it_tab.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;In the IT_TAB i am getting the fields name with #. Even i tried to replace the # with blank for all occurrence but its not working.&lt;/P&gt;
  &lt;P&gt;How to remove this. Since the structure is declared as char 999. I am getting like this. Please let me know how to achieve this.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thanks and Regards&lt;/P&gt;
  &lt;P&gt;Vijay&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 15:35:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720198#M33570</guid>
      <dc:creator>vijy_mukunthan</dc:creator>
      <dc:date>2018-07-25T15:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720199#M33571</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Consider below parameter or FM ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;has_field_separator  = 'X'  "file is TAB delimited&lt;/CODE&gt;&lt;/PRE&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;</description>
      <pubDate>Wed, 25 Jul 2018 16:32:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720199#M33571</guid>
      <dc:creator>roberto_forti</dc:creator>
      <dc:date>2018-07-25T16:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720200#M33572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;Consider below parameter or FM ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;has_field_separator  = 'X'  "file is TAB delimited&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 16:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720200#M33572</guid>
      <dc:creator>roberto_forti</dc:creator>
      <dc:date>2018-07-25T16:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720201#M33573</link>
      <description>&lt;P&gt;i think # is present for horizion tab which is CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB in abap. can you try like this:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;REPLACE CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB IN ls_tab WITH SPACE.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jul 2018 00:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720201#M33573</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-07-26T00:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720202#M33574</link>
      <description>&lt;P&gt;Hi Roberto&lt;/P&gt;
  &lt;P&gt; If i use has_field_seperator = 'X' only first field getting populated. I am using tab delimited txt file.&lt;/P&gt;
  &lt;P&gt;Thanks and Regards&lt;/P&gt;
  &lt;P&gt;vijay&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 03:20:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720202#M33574</guid>
      <dc:creator>vijy_mukunthan</dc:creator>
      <dc:date>2018-07-26T03:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720203#M33575</link>
      <description>&lt;P&gt;When you post code, please use right-click "paste as plain text".&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 06:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720203#M33575</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-26T06:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720204#M33576</link>
      <description>&lt;P&gt;The upload has correctly uploaded the file as you gave it no clues of not doing so.&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;Read line 1, spit the record at the separator # (supposedly &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/abencl_abap_char_utilities.htm"&gt;cl_abap_char_utilities&lt;/A&gt;=&amp;gt;horizontal_tab) and build an internal table once fields identified (&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/abenrtti.htm"&gt;rtts&lt;/A&gt;)&lt;/LI&gt;
   &lt;LI&gt;Then split each other lines at same separator into a new final table record or a text table. Use second case for fields with conversion-exit or more generally an external format different from internal format, so you will have to map those fields yourself to SAP expected format (calling &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/abenconversion_exit_glosry.htm"&gt;conversion_xxx_ input&lt;/A&gt; type FM)&lt;/LI&gt;
  &lt;/UL&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;NB: Also replace FM gui_upload by method cl_gui_frontend_services=&amp;gt;gui_upload.&lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 11:19:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720204#M33576</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-26T11:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720205#M33577</link>
      <description>&lt;P&gt;Why do you suggest this?&lt;BR /&gt;The request is to create a dynamic table based on a variable file structure.&lt;/P&gt;
  &lt;P&gt;How could your suggestion to solve such issue?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720205#M33577</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2018-07-26T14:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720206#M33578</link>
      <description>&lt;P&gt;Same question i asked to Neenu below: how could this solve the issue to generate a dynamic table from a file with undefined structure?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 14:18:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720206#M33578</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2018-07-26T14:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: File reading into internal table without defined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720207#M33579</link>
      <description>&lt;P&gt;So you should read the question more carefully, he asked about how to resolve the replace of # characters when upload file to abap, above is my suggestion to achive it. Clearly, as we see his code, he going to use RTTS to do dynamic table.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 02:10:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/file-reading-into-internal-table-without-defined-structure/m-p/720207#M33579</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2018-07-27T02:10:30Z</dc:date>
    </item>
  </channel>
</rss>

