<?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: external files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962870#M1156989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu Raman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First make entries into an excel file(without header line) and then save it as TEXT DELIMITED file type.&lt;/P&gt;&lt;P&gt;This will result in a text file with fields separated by tabs and records in different lines.&lt;/P&gt;&lt;P&gt;Make sure that you have the same order of field entries in flat file as in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can now use this code for uploading data from a flat file into the internal table and use as per your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES : BEGIN OF VENDOR,
        LIFNR LIKE RF02K-LIFNR,
        BUKRS LIKE RF02K-BUKRS,
        EKORG LIKE RF02K-EKORG,
        KTOKK LIKE RF02K-KTOKK,
        ANRED LIKE LFA1-ANRED,
        NAME1 LIKE LFA1-NAME1,
        SORTL LIKE LFA1-SORTL,
        LAND1 LIKE LFA1-LAND1,
        SPRAS LIKE LFA1-SPRAS,
        WAERS LIKE LFM1-WAERS,
        END OF VENDOR.
 
DATA : VENDOR_TAB TYPE STANDARD TABLE OF VENDOR INITIAL SIZE 10 WITH HEADER LINE.
 
START-OF-SELECTION.
  CALL FUNCTION 'GUI_UPLOAD' "uploads the internal table from flat file
    EXPORTING
      FILENAME                     = 'c:\vendors.txt'
      FILETYPE                      = 'DAT'
    TABLES
      DATA_TAB                      = VENDOR_TAB "internal table
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will populate the flat file records into the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Dec 2008 04:05:46 GMT</pubDate>
    <dc:creator>I355602</dc:creator>
    <dc:date>2008-12-18T04:05:46Z</dc:date>
    <item>
      <title>external files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962869#M1156988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,&lt;/P&gt;&lt;P&gt;    in gui_upload function module ,field separator has '#' used for tab space between records in flatfile. i need to know where they declared tab= '#'  and what are the other way to give field separator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 03:56:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962869#M1156988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T03:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: external files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962870#M1156989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muthu Raman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First make entries into an excel file(without header line) and then save it as TEXT DELIMITED file type.&lt;/P&gt;&lt;P&gt;This will result in a text file with fields separated by tabs and records in different lines.&lt;/P&gt;&lt;P&gt;Make sure that you have the same order of field entries in flat file as in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can now use this code for uploading data from a flat file into the internal table and use as per your requirements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES : BEGIN OF VENDOR,
        LIFNR LIKE RF02K-LIFNR,
        BUKRS LIKE RF02K-BUKRS,
        EKORG LIKE RF02K-EKORG,
        KTOKK LIKE RF02K-KTOKK,
        ANRED LIKE LFA1-ANRED,
        NAME1 LIKE LFA1-NAME1,
        SORTL LIKE LFA1-SORTL,
        LAND1 LIKE LFA1-LAND1,
        SPRAS LIKE LFA1-SPRAS,
        WAERS LIKE LFM1-WAERS,
        END OF VENDOR.
 
DATA : VENDOR_TAB TYPE STANDARD TABLE OF VENDOR INITIAL SIZE 10 WITH HEADER LINE.
 
START-OF-SELECTION.
  CALL FUNCTION 'GUI_UPLOAD' "uploads the internal table from flat file
    EXPORTING
      FILENAME                     = 'c:\vendors.txt'
      FILETYPE                      = 'DAT'
    TABLES
      DATA_TAB                      = VENDOR_TAB "internal table
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will populate the flat file records into the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 04:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962870#M1156989</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2008-12-18T04:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: external files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962871#M1156990</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;can i know your problem clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2008 04:30:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/external-files/m-p/4962871#M1156990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-18T04:30:39Z</dc:date>
    </item>
  </channel>
</rss>

