Sunday, December 26, 2010

REPORT ztest_program.
DATA: wa_pfile TYPE file_table.
DATA: it_pfiles TYPE STANDARD TABLE OF file_table,
      count   TYPE i,
      dir     TYPE string VALUE 'C:\temp\'.
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.
  WRITE wa_pfile.
ENDLOOP.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.