<?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: function module to upload and read the text file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797329#M913337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitra!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For uploading text file&lt;/P&gt;&lt;P&gt;we use gui_upload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for reading text&lt;/P&gt;&lt;P&gt;we use read_text FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewrd points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 May 2008 13:59:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-16T13:59:08Z</dc:date>
    <item>
      <title>function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797324#M913332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can anybody give me the function module to upload and read the text file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 12:33:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797324#M913332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T12:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797325#M913333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use GUI_UPLOAD and READ_TEXT Fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 12:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797325#M913333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T12:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797326#M913334</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;WS_UPLOAD and UPLOAD are the function modules you can use to upload a file in text format&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 12:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797326#M913334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T12:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797327#M913335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;To upload from the text file u can either use the funcion module&lt;/P&gt;&lt;P&gt;-- GUI UPLOAD and&lt;/P&gt;&lt;P&gt;-- UPLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In these function modules you pass the name of the internal table as the parameter .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then,&lt;/P&gt;&lt;P&gt;you can loop at that internal table to read the contents in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 12:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797327#M913335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T12:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797328#M913336</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 use this code to upload the text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_file TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               SELECTION SCREEN&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           AT  SELECTION SCREEN ON VALUE-REQUEST&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = syst-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = p_file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              START-OF-SELECTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  v_file = p_file.&lt;/P&gt;&lt;P&gt;*gui upload&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = v_file&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;has_field_separator     = 'X'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_vendor&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;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here,  wehen you press F4, it will ask to select the file.&lt;/P&gt;&lt;P&gt;Then you can select the file.&lt;/P&gt;&lt;P&gt;and after that i sued the FM GUI_UPLOAD, to insert the data into Internal table from the text file.&lt;/P&gt;&lt;P&gt;here this parameter is Important " has_field_separator ".&lt;/P&gt;&lt;P&gt;If you typing the text by giving TAB space between evry filed, you need to give "X".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And one more thing, you asked to Read the text file:&lt;/P&gt;&lt;P&gt;This I dint understand.&lt;/P&gt;&lt;P&gt;Please elaborate your requirement.&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;Sandeep Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 12:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797328#M913336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797329#M913337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitra!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For uploading text file&lt;/P&gt;&lt;P&gt;we use gui_upload&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for reading text&lt;/P&gt;&lt;P&gt;we use read_text FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewrd points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 May 2008 13:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797329#M913337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-16T13:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: function module to upload and read the text file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797330#M913338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i want to know how to use upload notepad in function modules.&lt;/P&gt;&lt;P&gt;what r the parameters needed to import from main program to function module program of notepad upload..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 15:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-to-upload-and-read-the-text-file/m-p/3797330#M913338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-10T15:52:59Z</dc:date>
    </item>
  </channel>
</rss>

