‎2005 Sep 16 7:12 AM
Hi all
i have to upload multiple files from desktop. can anyone suggest the procedur to do this.
Is there any function module in sap to upload multiple files from desktop. Or there is some other way to upload multiple files from desktop.
Thanks in advance
anu
‎2005 Sep 16 7:15 AM
You can write your own logic to construct filename (You will also have to rename filenames in your directory) and then LOOP it to upload using GUI_UPLOAD.
‎2005 Sep 16 7:23 AM
Hi Anu
What is the format of files you want to upload?
Regards
Ashish
‎2005 Sep 16 7:42 AM
Hi
the format is tab delimited...and if possible plz can u send me some code if ther are multiplt files to be upload from desktop....
thanks
‎2005 Sep 16 8:02 AM
Hi,
I suppose that this code could be useful for you.
data: wa_file type string.
data: tab_file like table of wa_file,
pcount type i.
field-symbols <tab> type standard table.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
exporting
DIRECTORY = 'C:\test'
FILTER = '.'
FILES_ONLY = 'X'
DIRECTORIES_ONLY
changing
FILE_TABLE = tab_file
count = pcount.
ASSIGN ('internal_table') TO <tab>.
loop at tab_file into wa_file.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
exporting
FILENAME = wa_file
changing
data_tab = <tab>.
endloop.
Svetlin
P.S. If you find an answer useful, please assign reward points.
Message was edited by: Svetlin Rusev
‎2005 Sep 16 8:23 AM
HI,
try with this code
data :itab1 like mara occurs 0 with header line.
data : begin of ist,
fname type string,
end of ist.
data : itab2 like ist occurs 0 with header line.
itab2-fname = 'c:\text111.txt'.
append itab2.
itab2-fname = 'c:\text112.txt'.
append itab2.
itab2-fname = 'c:\text113.txt'.
append itab2.
loop at itab2.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = itab2-fname
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
tables
data_tab = itab1.
endloop.
‎2005 Sep 19 6:35 AM
HI svetlin..
can u plz elaborate a code little bit. I am not able to run the program if i am using the code..ASSIGN ('internal_table') TO <tab>. in this which interan table u means i have to assign...
can u plz help on this...
thanks
‎2005 Sep 16 7:32 AM
Hi,
You collect all the file names into the internal table , and in the loop you call the GUI_UPLOAD FM.
I don't thing any single function module doing this job.
Cheers,
Sasi
‎2005 Sep 16 7:46 AM
Hi,
Use the following static methods:
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES - to get your files names
CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD - to upload your files into internal tables
Svetlin
‎2005 Sep 19 6:47 AM
Hi all,
i am facing problem in uploading mutiple files together from desktop.
please can someone send me the code for that. i am not able to upload multiple files together..
plz help in this object
thanks