ABAP文件夹/文件搜索帮助

文件夹

DATA:  lv_folder   TYPE string.

     CALL METHOD cl_gui_frontend_services=>directory_browse
      EXPORTING
        WINDOW_TITLE  '请选择要下载路径文件夹'
      CHANGING
        selected_folder = lv_folder
      EXCEPTIONS
        OTHERS          0.

 

文件

 CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
      window_title            '下载到本地文件'
      default_EXTENSION       'txt'
      default_filename        'file'
      file_filter             '*.txt'
      with_encoding           'X'
      initial_directory       'C:\'
    CHANGING
      file_table              = lt_file
      rc                      = lv_rc
    EXCEPTIONS
      file_open_dialog_failed 1
      cntl_error              2
      error_no_gui            3
      OTHERS                  4.

posted on 2023-07-19 12:02  SAP小龙女  阅读(75)  评论(0编辑  收藏  举报

导航