显示打开文件的对话框:TMP_GUI_FILE_OPEN_DIALOG
*&---------------------------------------------------------------------*
*& 数据定义
*&---------------------------------------------------------------------*
DATA: it_file TYPE TABLE OF sdokpath, "文件名内表
wa_file TYPE sdokpath. "文件名工作区
*&---------------------------------------------------------------------*
*& 主要逻辑
*&---------------------------------------------------------------------*
CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG' "获取文件名
EXPORTING
window_title = '文件选择窗'
TABLES
file_table = it_file
EXCEPTIONS
cntl_error = 1
OTHERS = 2.
IF sy-subrc <> 0. "获取文件名失败
MESSAGE '获取文件失败' TYPE 'E'. "报出错误信息
ENDIF.
READ TABLE it_file INTO wa_file INDEX 1.
i_file = wa_file.