: BEGIN OF ty_popup, select(1), text(50), END OF ty_popup. DATA : lt_popup TYPE TABLE OF ty_popup, ls_popup LIKE LINE OF lt_popup, lt_fcat_popup TYPE TABLE OF slis_fieldcat_alv, ls_fcat_popup LIKE LINE OF lt_fcat_popup, lt_excl TYPE slis_t_extab, ls_excl TYPE slis_extab, ls_file_table LIKE LINE OF ct_file_table, l_tabix TYPE i. ls_fcat_popup-tabname = 'LT_POPUP'. ls_fcat_popup-col_pos = '1'. ls_fcat_popup-fieldname = 'SELECT'. ls_fcat_popup-seltext_m = 'SELECT'. APPEND ls_fcat_popup TO lt_fcat_popup. ls_fcat_popup-col_pos = '2'. ls_fcat_popup-fieldname = 'TEXT'. ls_fcat_popup-seltext_m = 'Status'. ls_fcat_popup-outputlen = 50. APPEND ls_fcat_popup TO lt_fcat_popup. ls_excl-fcode = '&ETA'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '%SC'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '%SC+'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&OUP'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&ODN'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&ILT'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&OL0'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&CRB'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&CRL'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&CRR'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&CRE'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&ALL'. APPEND ls_excl TO lt_excl. ls_excl-fcode = '&SAL'. APPEND ls_excl TO lt_excl.* Atualiza as Opcoes do Pop-up LOOP AT ct_file_table INTO ls_file_table. ls_popup-text = ls_file_table-filename. APPEND ls_popup TO lt_popup. ENDLOOP. CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT' EXPORTING i_title = 'Copiar os arquivos :' i_zebra = abap_true i_screen_start_column = 1 i_screen_start_line = 1 i_checkbox_fieldname = 'SELECT' i_tabname = 'LT_POPUP' it_fieldcat = lt_fcat_popup it_excluding = lt_excl TABLES t_outtab = lt_popup EXCEPTIONS program_error = 1 OTHERS = 2. IF sy-subrc IS INITIAL. DELETE lt_popup WHERE select = space. ENDIF.* Valida as opcoes selecionadas LOOP AT ct_file_table INTO ls_file_table. l_tabix = sy-tabix. READ TABLE lt_popup TRANSPORTING NO FIELDS WITH KEY text = ls_file_table-filename. IF sy-subrc IS NOT INITIAL. DELETE ct_file_table INDEX l_tabix. ENDIF. ENDLOOP. ENDMETHOD. METHOD file_copy. cl_gui_frontend_services=>file_copy( EXPORTING source = iv_source " Source destination = iv_destination " Destination overwrite = iv_overwrite " Overrides if Destination Exists EXCEPTIONS cntl_error = 1 error_no_gui = 2 wrong_parameter = 3 disk_full = 4 access_denied = 5 file_not_found = 6 destination_exists = 7 unknown_error = 8 path_not_found = 9 disk_write_protect = 10 drive_not_ready = 11 not_supported_by_gui = 12 OTHERS = 13 ). ev_rc = sy-subrc. ENDMETHOD. METHOD file_exist. cl_gui_frontend_services=>file_exist( EXPORTING file = iv_file " File to Check RECEIVING result = ev_result " Result EXCEPTIONS cntl_error = 1 error_no_gui = 2 wrong_parameter = 3 not_supported_by_gui = 4 OTHERS = 5 ). ENDMETHOD. METHOD popup_to_confirm. CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = iv_title text_question = iv_question IMPORTING answer = ev_answer EXCEPTIONS text_not_found = 1 OTHERS = 2. ENDMETHOD. METHOD file_get_attributes. DATA : l_readonly(1), l_normal(1), l_hidden(1), l_archive(1). cl_gui_frontend_services=>file_get_attributes( EXPORTING filename = iv_file " File Name IMPORTING readonly = l_readonly " Attribute: readonly normal = l_normal " Attribute: Normal hidden = l_hidden " Attribute: Hidden archive = l_archive " Attribute: Archive EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 wrong_parameter = 4 file_get_attributes_failed = 5 OTHERS = 6 ). CASE abap_true. WHEN l_readonly. ev_attributes = 'READONLY'. WHEN l_normal. ev_attributes = 'NORMAL'. WHEN l_hidden. ev_attributes = 'HIDDEN'. WHEN l_archive. ev_attributes = 'ARCHIVE'. ENDCASE. ENDMETHOD. METHOD delete_folder. BREAK-POINT. me->directory_exist( EXPORTING iv_directory = folder && '\' && n_folder CHANGING cv_result = result ). IF result IS NOT INITIAL. WRITE : / `Pasta :