*----------------------------------------------------------------------* * DECLARATIONS * *----------------------------------------------------------------------* TYPES: BEGIN OF ty_appr_c, line(70) TYPE c, END OF ty_appr_c. DATA: gt_appr_c TYPE STANDARD TABLE OF ty_appr_c, gs_appr_c LIKE LINE OF gt_appr_c. *----------------------------------------------------------------------* * LAYOUT * *----------------------------------------------------------------------* PARAMETERS: pa_fname TYPE string, pa_floc TYPE string. *----------------------------------------------------------------------* * EVENTS * *----------------------------------------------------------------------* AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_floc. DATA: lv_path TYPE string, lv_fs TYPE c. cl_gui_frontend_services=>get_desktop_directory( CHANGING desktop_directory = lv_path ). cl_gui_cfw=>update_view( ). cl_gui_frontend_services=>directory_browse( EXPORTING window_title = 'Seleziona cartella' initial_folder = lv_path CHANGING selected_folder = lv_path ). cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_fs ). CONCATENATE lv_path lv_fs INTO pa_floc. *----------------------------------------------------------------------* * FORM SAVE_LOCAL * *----------------------------------------------------------------------* FORM save_local. CONCATENATE pa_floc pa_fname INTO pa_floc. cl_gui_frontend_services=>gui_download( EXPORTING filename = pa_floc CHANGING data_tab = gt_appr_c ). ENDFORM. "save_local *----------------------------------------------------------------------*
venerdì 4 novembre 2016
Selezionare una cartella partendo dal desktop e salvare un file localmente
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento