Wednesday, December 29, 2010
REPORT ztest_program. DATA: wa_pfile TYPE file_table. DATA: it_pfiles TYPE STANDARD TABLE OF file_table. DATA: count TYPE i, dir TYPE string VALUE 'C:\Venkat1\', source TYPE string, dest TYPE string. START-OF-SELECTION. CALL METHOD cl_gui_frontend_services=>directory_list_files EXPORTING directory = dir * files_only = 'X' CHANGING file_table = it_pfiles count = count EXCEPTIONS cntl_error = 1 directory_list_files_failed = 2 wrong_parameter = 3 error_no_gui = 4 not_supported_by_gui = 5 OTHERS = 6. LOOP AT it_pfiles INTO wa_pfile. CONCATENATE 'C:\Venkat1\' wa_pfile-filename INTO source. CONCATENATE 'C:Venkat2\' wa_pfile-filename INTO dest. CALL METHOD cl_gui_frontend_services=>file_copy EXPORTING SOURCE = SOURCE destination = dest overwrite = 'X'. ENDLOOP.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.