<?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 header diferent from remaining file (function module GUI_UPLOAD) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683787#M1450026</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a flat file upload the file contents to an internal table of type string (DATA: ITAB TYPE STANDARD TABLE OF STRING).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now read the 1st line which is the header &amp;amp; populate the remaining lines to an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Mar 2010 11:31:37 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2010-03-09T11:31:37Z</dc:date>
    <item>
      <title>Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683786#M1450025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to upload a flat file but the header is the control record with the number of lines in the file, and has a diferent structure from remaining file records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using GUI_UPLOAD in ASCII mode for the flat file and my first line with the control record does not "fit" the structure of the remaining records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whats the best way I read diferent line structures in the flat file so I can have a counter from the first line and all other lines in an internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using GUI_UPLOAD twice with diferent internal tables will have performance degraded...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;Sérgio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 11:27:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683786#M1450025</guid>
      <dc:creator>SrgioMonteiro</dc:creator>
      <dc:date>2010-03-09T11:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683787#M1450026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a flat file upload the file contents to an internal table of type string (DATA: ITAB TYPE STANDARD TABLE OF STRING).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now read the 1st line which is the header &amp;amp; populate the remaining lines to an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 11:31:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683787#M1450026</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-09T11:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683788#M1450027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply, but how do you suggest defining the initial table of string characters? What I've found is that if I define a line string and my flat file has several TAB separated fields, only the first column is uploaded to the internal table because the table only has one field. If I define several character fields to accommodate all required fields it should work but I don't believe that there is not a most efficient method in ABAP unless this one uploading all data in strings and then convert them all to the required data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;Sérgio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 12:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683788#M1450027</guid>
      <dc:creator>SrgioMonteiro</dc:creator>
      <dc:date>2010-03-09T12:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683789#M1450028</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;Declare an itab as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB TYPE STANDARD TABLE OF STRING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable for Tab limited&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :gc_con_tab TYPE c VALUE cl_abap_char_utilities=&amp;gt;horizontal_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass the control record to the internal table first then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_final into wa_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;concatenating gc_con_tab will add TABs in your output.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE wa_final-f1 wa_final-f2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into ITABl separated by gc_con_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use GUI_DOWNLOAD to download ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shanmugavel chandrasekaran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 13:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683789#M1450028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T13:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683790#M1450029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shanmugavel, now I'm lost... I ask about uploading a file with a diferent structure in the first record, and if there is any way to manage this eficiently in ABAP.&lt;/P&gt;&lt;P&gt;I think your reply is to make a download, not an upload, correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Sérgio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 13:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683790#M1450029</guid>
      <dc:creator>SrgioMonteiro</dc:creator>
      <dc:date>2010-03-09T13:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Flat file header diferent from remaining file (function module GUI_UPLOAD)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683791#M1450030</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;try out this option in the thread . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="8107397"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is simple but effective..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br, &lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 13:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flat-file-header-diferent-from-remaining-file-function-module-gui-upload/m-p/6683791#M1450030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-09T13:17:12Z</dc:date>
    </item>
  </channel>
</rss>

