Hello
Currently we have a upload program, wherein by using the below code the prog. is asking user to select a file from his/her local machine for saving the log file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_log.
* PERFORM get_file_name CHANGING p_log. "Actually I wrote a routine, just here am commenting
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_extension = lv_file_type
CHANGING
file_table = lt_file_tab
rc = lv_subrc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc = 0.
READ TABLE lt_file_tab INTO ls_file INDEX 1.
IF sy-subrc = 0.
p_file_name = ls_file-filename.
ENDIF.
ENDIF.
But, now I need to enhance in such a way that, I need to delete this field (selecting file from local machine) from selection screen and the prog. should automatically create a log file with a name of 'Log_file_of_Z_UPLOAD', pls. help me how I can create a file (Excel) automatically with this specified name on user's local machine's desktop?
Normally, our desktop path is as below,
C:\Users\USER_ID\Desktop\log_file.XLS
Thank you