05-13-2008 2:38 AM
Hi Friends,
Please tell me the function module name which popsup a popup box to specify a filename and the location and when clicking on the OK button, the file should be downloaded to the specified location.
I need it ASAP.
Thanks,
Jaffer Ali.S
05-13-2008 2:40 AM
Go to Class
CL_GUI_FRONTEND_SERVICES it has all the methods you require. Just search the forums also you have same question answered lot many times.
Regards,
Atish
05-13-2008 3:17 AM
Hi Shamshudeen,
You have to use two funtion modules to acheive this.
1. To get the file path from user.
2. To download the excel sheet in prescribed path.
For 1 use following code
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_fpath .
The file path will be stored in p_fpath.
Now use GUI_DOWNLOAD function module and pass the file name p_fpath to it along with filetype as .xls
Hope this helps you.
Thanks,
Arun