folder && '\' && n_folder && ` - Ja existe.`. ENDIF. ELSE. WRITE : / `Nao foi feito nada, pois voce esquece de ` && `colocar a pasta e/ou diretorio.`. ENDIF. ENDMETHOD. METHOD directory_browse. cl_gui_frontend_services=>directory_browse( EXPORTING window_title = iv_title " Title of Browsing Window CHANGING selected_folder = cv_folder " Folder Selected By User EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 OTHERS = 4 ). ENDMETHOD. METHOD directory_create. cl_gui_frontend_services=>directory_create( EXPORTING directory = iv_directory " Directory name CHANGING rc = cv_rc " Return Code EXCEPTIONS directory_create_failed = 1 cntl_error = 2 error_no_gui = 3 directory_access_denied = 4 directory_already_exists = 5 path_not_found = 6 unknown_error = 7 not_supported_by_gui = 8 wrong_parameter = 9 OTHERS = 10 ). ENDMETHOD. METHOD directory_exist. cl_gui_frontend_services=>directory_exist( EXPORTING directory = iv_directory " Directory name RECEIVING result = cv_result " Result EXCEPTIONS cntl_error = 1 error_no_gui = 2 wrong_parameter = 3 not_supported_by_gui = 4 OTHERS = 5 ). ENDMETHOD. METHOD directory_delete. cl_gui_frontend_services=>directory_delete( EXPORTING directory = iv_directory " Directory to Delete CHANGING rc = cv_rc " Return Code EXCEPTIONS directory_delete_failed = 1 cntl_error = 2 error_no_gui = 3 path_not_found = 4 directory_access_denied = 5 unknown_error = 6 not_supported_by_gui = 7 wrong_parameter = 8 OTHERS = 9 ). ENDMETHOD. METHOD directory_list_files. cl_gui_frontend_services=>directory_list_files( EXPORTING directory = iv_directory* filter = '*.*'* files_only =* directories_only = CHANGING file_table = ct_file_table count = ev_count EXCEPTIONS cntl_error = 1 directory_list_files_failed = 2 wrong_parameter = 3 error_no_gui = 4 not_supported_by_gui = 5 OTHERS = 6 ). ENDMETHOD. METHOD file. BREAK-POINT. IF folder2 IS NOT INITIAL. DATA : ls_file_table LIKE LINE OF gt_file_table. me->directory_list_files( EXPORTING iv_directory = folder2 CHANGING ct_file_table = ct_file_table ). IF ct_file_table[] IS NOT INITIAL. me->popup_to_confirm_files( CHANGING ct_file_table = ct_file_table ). IF ct_file_table[] IS NOT INITIAL. LOOP AT ct_file_table INTO ls_file_table. me->file_exist( EXPORTING iv_file = folder && '\' && n_folder && '\' && ls_file_table-filename IMPORTING ev_result = result ). IF result IS NOT INITIAL. me->popup_to_confirm( EXPORTING iv_title = 'Arquivo Existente' iv_question = `Arquivo : ` && folder && '\' && n_folder && '\' && ls_file_table-filename && ` - ja existe, deseja sobrescrever ?` IMPORTING ev_answer = result ). IF result = '1'. " Sobrescrever !!!! result = abap_true. ELSE. CLEAR result. ENDIF. ENDIF. me->file_copy( EXPORTING iv_source = folder2 && '\' && ls_file_table-filename iv_destination = folder && '\' && n_folder && '\' && ls_file_table-filename iv_overwrite = result IMPORTING ev_rc = subrc ). IF subrc IS INITIAL. DATA : lv_attributes(10). me->file_get_attributes( EXPORTING iv_file = folder && '\' && n_folder && '\' && ls_file_table-filename IMPORTING ev_attributes = lv_attributes ). WRITE : / `Arquivo : ` && folder2 && '\' && ls_file_table-filename && ` - Copiado com exito. Atributo : ` && lv_attributes. ELSE. WRITE : / `Arquivo : ` && folder2 && '\' && ls_file_table-filename && ` - Erro ao copiar.`. ENDIF. ENDLOOP. ELSE. WRITE : / `Nao foram selecionados arquivos para copia da pasta de origem.`. ENDIF. ELSE. WRITE : / `Nao foram encontrados arquivos para copia da pasta de origem.`. ENDIF. ELSE. WRITE : / `Nao foi definido a pasta de origem dos arquivos a serem copiados.`. ENDIF. ENDMETHOD. METHOD popup_to_confirm_files.* Caso nao lembre.* http://abapjuniores.blogspot.com.br/2017/06/funcao-reusealvpopuptoselect.html TYPES