01-17-2008 12:55 PM
Hi guys,
I have a requirement wherein i need to download data from my internal table in a file on the desktop of the user who is running it Atuomatically, the user will not provide any filepath. Can any one inform me about the Function Module for the same.
Thanks and regards,
Riya
01-17-2008 12:57 PM
Hi,
You can use GUI_DOWNLOAD function module and describe a default path in that.
Regards,
Pankaj
01-17-2008 12:59 PM
Download internal table to presentation server file(PC)
DATA: ld_filename TYPE string,
Pre version 4.7 declaration e_file like rlgrap-filename.
DATA: begin of it_datatab occurs 0,
row(500) type c,
end of it_datatab.
call function 'GUI_DOWNLOAD'
exporting
filename = ld_filename
filetype = 'ASC'
tables
data_tab = it_datatab[]
exceptions
file_open_error = 1
file_write_error = 2
others = 3.
Download internal table to presentation server file(PC)
Separating fields/columns by a tab
DATA: ld_filename TYPE string,
Pre version 4.7 declaration e_file like rlgrap-filename.
DATA: begin of it_datatab occurs 0,
col1(50) type c,
col2(50) type c,
col3(50) type c,
etc....
end of it_datatab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = ld_filename
filetype = 'ASC'
APPEND = 'X'
write_field_separator = 'X'
CONFIRM_OVERWRITE = 'X'
TABLES
data_tab = it_datatab[]
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
01-17-2008 1:11 PM
Hi,
GUI_DOWNLOAD or WS_DOWNLOAD will suffice your need.
Put the path in the program it self.
PS : WS_DOWNLOAD is not recommeneded as it is obsolete.
Regards,
Lalit Kabra
01-17-2008 1:29 PM
Hi All,
My requirement is :
The internal table that i am talkin about is an Error Log Table and whenever Any User runs the pgm whatevr entries are there in the internal table i.e The Entire Error Log should be copied automatically in a file on his/her desktop.
I would not be able to hardcode the path.. or provide the filepath in the program.
Thanks,
Riya.
01-17-2008 1:31 PM
You need to use a hardcoded file path that will always exist on a PC.
😧
C:/temp
C:
etc.