<?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: upload files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597878#M268469</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;1. Declare internal table :&lt;/P&gt;&lt;P&gt;   It will contain one field of max size of your record &lt;/P&gt;&lt;P&gt;   in a single row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF i_mat OCCURS 0,&lt;/P&gt;&lt;P&gt;        line(1000), &lt;/P&gt;&lt;P&gt;       END OF i_mat.&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;  FILETYPE                      = 'dat'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;  data_tab                      = i_mat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. This will contain records row by row in your file.&lt;/P&gt;&lt;P&gt;   Then split each row based on delimiter (eg. by , or | &lt;/P&gt;&lt;P&gt;   or space etc.) and store each field in a single row &lt;/P&gt;&lt;P&gt;   in you actual internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you will get all field records into one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Palak Limbachiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2006 06:04:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-18T06:04:01Z</dc:date>
    <item>
      <title>upload files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597876#M268467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Dear All:&lt;/P&gt;&lt;P&gt;I am asking for help here.&lt;/P&gt;&lt;P&gt;a local txt file,contain data which are refer to the data of table SPFLI.I want to call FM GUI_LOAD,So,first I must to build a internal table,and then transfer the data to it.but I am not clear with the structrue of this internal table.and after upload the file,i want to process each fields of the internal table separately(eg.to get each fields's value and then assign to a variant)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls give me a demo of upload files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 05:48:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597876#M268467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T05:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597877#M268468</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;check this program for uploading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report ZTEST2.

data: file_path type string.

data: file_tab type filetable.
data: wa_tab like line of file_tab.
data: rc type i.

data: itab type standard table of cskt.
data: wa like line of itab.

start-of-selection.

  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_OPEN_DIALOG
    EXPORTING
      FILE_FILTER             = '.XLS'

    CHANGING
      FILE_TABLE              = file_tab
      RC                      = rc
          .

  READ TABLE file_tab into wa_tab index 1.
  file_path = wa_tab-filename.


  call method cl_gui_frontend_services=&amp;gt;gui_upload
    exporting
        filename                = file_Path
        HAS_FIELD_SEPARATOR     = 'X'

     changing
         data_tab                = itab.


  loop at itab into wa.

    write:/ wa-kostl.

  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 05:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597877#M268468</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-10-18T05:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597878#M268469</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;1. Declare internal table :&lt;/P&gt;&lt;P&gt;   It will contain one field of max size of your record &lt;/P&gt;&lt;P&gt;   in a single row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF i_mat OCCURS 0,&lt;/P&gt;&lt;P&gt;        line(1000), &lt;/P&gt;&lt;P&gt;       END OF i_mat.&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;  FILETYPE                      = 'dat'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;  data_tab                      = i_mat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. This will contain records row by row in your file.&lt;/P&gt;&lt;P&gt;   Then split each row based on delimiter (eg. by , or | &lt;/P&gt;&lt;P&gt;   or space etc.) and store each field in a single row &lt;/P&gt;&lt;P&gt;   in you actual internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you will get all field records into one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Palak Limbachiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 06:04:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597878#M268469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T06:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597879#M268470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,Palak Limbachiya &lt;/P&gt;&lt;P&gt;As your advice,I upload the file successfully.&lt;/P&gt;&lt;P&gt;and now,the data are stored in in_tab then,I want to do some processes.Can i process in_tab directly,or transfer them to a new internal table with the same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data in in_tab are row by row, i want to assign them to  string variant separately.How can i do it,and can i use array in ABAP,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 08:10:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597879#M268470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T08:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: upload files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597880#M268471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;#146;AA 0064 US SAN FRANCISCO JFK US NEW YORK SFO 321 10:00:00 18:21:00 "2.572,0000" MI 0&amp;#145;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is one row  out put of the uploaded file,I want  to divid the fileds into different string variants.&lt;/P&gt;&lt;P&gt;I use the SPLIT statement,but I do not know the separator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT in_tab-line at &amp;lt;del&amp;gt; into f1 f2....fn.&lt;/P&gt;&lt;P&gt;what is the &amp;lt;del&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: lei xiang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2006 08:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-files/m-p/1597880#M268471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-18T08:35:00Z</dc:date>
    </item>
  </channel>
</rss>

