<?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: multiple files in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129052#M987344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    For uploading multiple fiels we can use the function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION UPLOAD_FILES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the files from the presentation or application server are read and put into the internal table of type FILE_ALL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now you can access these files from that internal table just as any other internal table contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&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;Chandra Sekhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chandrasekhar Gandla on Jun 30, 2008 8:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 06:55:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T06:55:43Z</dc:date>
    <item>
      <title>multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129047#M987339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus,&lt;/P&gt;&lt;P&gt;   how can we download and upload multiple files.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:21:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129047#M987339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129048#M987340</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;use gui_download and gui_upload function modules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:25:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129048#M987340</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2008-06-30T06:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129049#M987341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use UPLOAD_FILES for file Transfer from PC or Appl. Server in Internal Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Functionality&lt;/P&gt;&lt;P&gt;The function module reads the file from the presentation or application server, and transfers the data to the internal table FILE_ALL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt;I_TRUNCLEN&lt;/P&gt;&lt;P&gt;I_FILETYPE&lt;/P&gt;&lt;P&gt;I_XPC&lt;/P&gt;&lt;P&gt;FILE_ALL&lt;/P&gt;&lt;P&gt;TAB_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the following example which works for tab delimited files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

Tables: rlgrap,RF02B.
TYPES : BEGIN OF ty_mara,
         matnr LIKE mara-matnr,
         mbrsh LIKE mara-mbrsh,
         mtart LIKE mara-mtart,
         maktx LIKE makt-maktx,
         meins LIKE mara-meins,
        END OF ty_mara.
data :it_rlgrap type table of  rlgrap WITH HEADER LINE.
data : i_xpc type RF02B-BANKXFPR value 'X'.
DATA : it_mara TYPE TABLE OF ty_mara WITH HEADER LINE.

data : asc type  RLGRAP-FILETYPE value 'ASC'.
PARAMETERS : p_text type rlgrap-filename default '&amp;lt;path&amp;gt;'.

it_rlgrap-filename = p_text.
append it_rlgrap.

CALL FUNCTION 'UPLOAD_FILES'
  EXPORTING
*   I_TRUNCLEN       = ' '
    i_filetype       = asc
    i_xpc            = i_xpc
  tables
    file_all         = it_mara
    tab_file         = it_rlgrap.

loop at it_mara.
write : it_mara-matnr.
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;P&gt;&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:32:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129049#M987341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129050#M987342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex declare two internal tables and then upload the data into those tables separately using the upload function module.&lt;/P&gt;&lt;P&gt;&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;    FILENAME            = 'C:\ROUTING\ROUTINGHEADER.TXT'&lt;/P&gt;&lt;P&gt;    FILETYPE            = 'DAT'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB            = HTAB&lt;/P&gt;&lt;P&gt;  *Uploads Routing Sequence Details&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME            = 'C:\ROUTING\Sequence.TXT'&lt;/P&gt;&lt;P&gt;    FILETYPE            = 'DAT'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB            = STAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:36:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129050#M987342</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2008-06-30T06:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129051#M987343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DEEPAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For uploading/Dowloading multiple files,&lt;/P&gt;&lt;P&gt;we can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presentation Server:&lt;/P&gt;&lt;P&gt;GUI_UPLOAD AND GUI_DOWNLOAD function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also UPLOAD_FILES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if you find this information usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Harsh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129051#M987343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129052#M987344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    For uploading multiple fiels we can use the function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION UPLOAD_FILES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the files from the presentation or application server are read and put into the internal table of type FILE_ALL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now you can access these files from that internal table just as any other internal table contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help you.&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;Chandra Sekhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chandrasekhar Gandla on Jun 30, 2008 8:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129052#M987344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129053#M987345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Upload:
Pass different file names and itab.....

FORM file_at_application
  USING file_name TYPE rlgrap-filename.

  DATA:
    l_file_name   TYPE rlgrap-filename.

  OPEN DATASET l_file_name
    FOR OUTPUT
    IN TEXT MODE ENCODING DEFAULT.
  LOOP AT itab
    INTO wa.
    TRANSFER wa TO l_file_name.
  ENDLOOP.  
  CLOSE DATASET l_file_name.
ENDFORM.   

download:
Pass different file names and itab.....

FORM file_at_presentation
  USING file_name TYPE rlgrap-filename.

  DATA:
    l_file_name   TYPE rlgrap-filename.

* Download file.......
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = l_file_NAME
      filetype                = 'ASC'
    TABLES
      data_tab                = itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Syed  Abdul Adil on Jun 30, 2008 9:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129053#M987345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129054#M987346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in regards to presentation server u can use..&lt;/P&gt;&lt;P&gt;GUI_DOWNLOAD&lt;/P&gt;&lt;P&gt;GUI_UPLOAD&lt;/P&gt;&lt;P&gt;for file path...&lt;/P&gt;&lt;P&gt;F4_FILENAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in regards to application server u can use..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  w_fname(60) VALUE '.\'.&lt;/P&gt;&lt;P&gt;to upload........&lt;/P&gt;&lt;P&gt;OPEN DATASET w_fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSFER w_string TO w_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLOSE DATASET w_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to download.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET w_fname FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ DATASET w_fname INTO w_string.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.                             " IF SY-SUBRC &amp;lt;&amp;gt; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDDO.                               " DO&lt;/P&gt;&lt;P&gt;  CLOSE DATASET w_fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with luck,&lt;/P&gt;&lt;P&gt;pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129054#M987346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129055#M987347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi do one thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;schedule multiple jobs using submit statement ...paralally&lt;/STRONG&gt; ...then it is possible..easily..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 08:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129055#M987347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T08:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129056#M987348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 16:53:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-files/m-p/4129056#M987348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T16:53:16Z</dc:date>
    </item>
  </channel>
</rss>

