Skip to Content
author's profile photo Former Member
Former Member

How to Upload Multiple Files from a folder at a single go?

Hi friends,

My requriment is to Upload many txt or excel files in a single shot.

If its a single file i can upload through Ws_upload or Gui_upload.

in the same way is there any function modules to upload many files at a time.

Regards

Venkatesh.S

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 04:54 AM

    Hi Venkatesh,

    Try this code..

    data: l_filename type string OCCURS 0 WITH HEADER LINE.

    l_filename = 'c:\temp1.xls'.

    APPEND L_FILENAME

    l_filename = 'c:\temp2.xls'.

    APPEND L_FILENAME

    LOOP AT L_FILENAME

    CALL FUNCTION 'GUI_UPLOAD'

    EXPORTING

    FILENAME = l_filename

    FILETYPE = 'ASC'

    HAS_FIELD_SEPARATOR = '#'

    TABLES

    DATA_TAB = itab1.

    OPEN DATASET <applicationfilename> FOR OUTPUT IN TEXT MODE.

    IF sy-subrc = 0.

    LOOP AT ITAB1

    TRANSFER ITAB1 TO pt_infil .

    ENDLOOP.

    ENDIF.

    CLOSE DATASET pt_infil.

    ENDLOOP.

    OR

    use CL_GUI_FRONTEND_SERVICES->DIRECTORY_LIST_FILES

    Regards,

    Goutham.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.