<?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 Upload text file into internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593933#M594019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have a text file which contains records in a continuous format. One row in the text file extents upto 1099 charactors. i have about 100 rows in the text file without tab delimited. how can i upload this file to a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send your suggestions,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2007 08:52:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-25T08:52:53Z</dc:date>
    <item>
      <title>Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593933#M594019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have a text file which contains records in a continuous format. One row in the text file extents upto 1099 charactors. i have about 100 rows in the text file without tab delimited. how can i upload this file to a internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send your suggestions,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 08:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593933#M594019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T08:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593934#M594020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we can use GUI_UPLOAD fm for this.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 08:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593934#M594020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T08:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593935#M594021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh&lt;/P&gt;&lt;P&gt;       give file type as 'ASC'  when uploading beacuse it is continuous format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sandhya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 08:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593935#M594021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T08:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593936#M594022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can declare a internal table like&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;           string(1200),&lt;/P&gt;&lt;P&gt;        end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use GUI_UPLOAD and move the text file into internal table.&lt;/P&gt;&lt;P&gt;Unless if there is no delimiter(some sort of separator symbol like space or comma between fields of the text file , then it is difficult to separate them into fields)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other wise you have to loop the ITAb&lt;/P&gt;&lt;P&gt;and by using the offset of fields move the fields into another internal table and append that int table and use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 08:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593936#M594022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T08:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593937#M594023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi amit,&lt;/P&gt;&lt;P&gt;  we can use GUI_UPLOAD. but what is the structure of the internal table.&lt;/P&gt;&lt;P&gt;At present iam using the below structure, but it uploads only the first row of the text file.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ifile OCCURS 0,&lt;/P&gt;&lt;P&gt; text(1200) TYPE c,&lt;/P&gt;&lt;P&gt;END OF ifile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 08:58:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593937#M594023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T08:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593938#M594024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;cange as you need&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: DATEI_PC TYPE STRING VALUE 'C:\MATNR.TXT'.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB occurs 0,&lt;/P&gt;&lt;P&gt;         TXT(1024),&lt;/P&gt;&lt;P&gt;       END   OF ITAB.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_UPLOAD&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME                = DATEI_PC&lt;/P&gt;&lt;P&gt;      FILETYPE                = 'ASC'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      DATA_TAB                = ITAB[]&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      FILE_OPEN_ERROR         = 1&lt;/P&gt;&lt;P&gt;      FILE_READ_ERROR         = 2&lt;/P&gt;&lt;P&gt;      NO_BATCH                = 3&lt;/P&gt;&lt;P&gt;      GUI_REFUSE_FILETRANSFER = 4&lt;/P&gt;&lt;P&gt;      INVALID_TYPE            = 5&lt;/P&gt;&lt;P&gt;      NO_AUTHORITY            = 6&lt;/P&gt;&lt;P&gt;      UNKNOWN_ERROR           = 7&lt;/P&gt;&lt;P&gt;      BAD_DATA_FORMAT         = 8&lt;/P&gt;&lt;P&gt;      HEADER_NOT_ALLOWED      = 9&lt;/P&gt;&lt;P&gt;      SEPARATOR_NOT_ALLOWED   = 10&lt;/P&gt;&lt;P&gt;      HEADER_TOO_LONG         = 11&lt;/P&gt;&lt;P&gt;      UNKNOWN_DP_ERROR        = 12&lt;/P&gt;&lt;P&gt;      ACCESS_DENIED           = 13&lt;/P&gt;&lt;P&gt;      DP_OUT_OF_MEMORY        = 14&lt;/P&gt;&lt;P&gt;      DISK_FULL               = 15&lt;/P&gt;&lt;P&gt;      DP_TIMEOUT              = 16&lt;/P&gt;&lt;P&gt;      NOT_SUPPORTED_BY_GUI    = 17&lt;/P&gt;&lt;P&gt;      ERROR_NO_GUI            = 18&lt;/P&gt;&lt;P&gt;      OTHERS                  = 19.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC NE 0. WRITE: / 'Error in Uploading'. STOP. ENDIF.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  WRITE: / 'UPLOAD:'.&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB. WRITE: / ITAB-TXT. ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593938#M594024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593939#M594025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. i assume that different rows are on different line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  (if it is not so, then let me know)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. declare the internal table,&lt;/P&gt;&lt;P&gt;   in EXACTLY the same way&lt;/P&gt;&lt;P&gt;   as the FIELD SEQUENCE inside the file,&lt;/P&gt;&lt;P&gt;   with EXACT LENGTH of each field.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593939#M594025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593940#M594026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you post your code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try giving the whole body of internal table while passing to GUI_UPLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IFILE[].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:03:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593940#M594026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593941#M594027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see that the structure of the file and the internal table do match&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are using a txt file do specify the delimiter correctly and also do press enter after the end of each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593941#M594027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593942#M594028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Thanks for all your replies,&lt;/P&gt;&lt;P&gt;Below is my code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ifile OCCURS 0,&lt;/P&gt;&lt;P&gt; text(1200) TYPE c,&lt;/P&gt;&lt;P&gt;END OF ifile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload FM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;GUI_UPLOAD&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  FILENAME = file1&lt;/P&gt;&lt;P&gt;  FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;  DATA_TAB = ifile[]&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;  FILE_OPEN_ERROR = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The records are in a continuous format such that the text file has rows with 1099 characters without tab delimited. I declared the row size as 1200 characters in the internal table. The result is in a way that, 1099 characters in the first row are uploaded along with 101 characters in the second row of the text file. At the end i have a single row with 1200 characters in my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls send your suggestions to upload the whole file,,,&lt;/P&gt;&lt;P&gt;Raj...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593942#M594028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Upload text file into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593943#M594029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. 1099 characters in the first row are uploaded along with 101 characters in the second row of the text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is happening bcos&lt;/P&gt;&lt;P&gt;there should be ENTER after every record.&lt;/P&gt;&lt;P&gt;(and not TAB)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The text file should be like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RECORD1&lt;/P&gt;&lt;P&gt;RECORD2&lt;/P&gt;&lt;P&gt;RECORD3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and not like this&lt;/P&gt;&lt;P&gt;RECORD1 RECORD2 RECORD3&lt;/P&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;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 09:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-text-file-into-internal-table/m-p/2593943#M594029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T09:24:49Z</dc:date>
    </item>
  </channel>
</rss>

