AT SELECTION-SCREEN ON VALUE-REQUEST FOR q_file. MESSAGE 'AT SELECTION-SCREEN ON VALUE-REQUEST FOR Q_FILE' TYPE 'I'. PERFORM getfilename USING q_file .
AT SELECTION-SCREEN ON p_file. "选择完毕,按回车或者执行时触发 MESSAGE 'AT SELECTION-SCREEN ON p_FILE' TYPE 'I'.
AT SELECTION-SCREEN ON q_file. "选择完毕,按回车或者执行时触发 MESSAGE 'AT SELECTION-SCREEN ON q_FILE' TYPE 'I'.
AT SELECTION-SCREEN ON END OF s_file. "只是对Select-Options 有效 MESSAGE 'AT SELECTION-SCREEN ON END OF S_FILE' TYPE 'I'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_file-low . MESSAGE 'AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FILE-LOW' TYPE 'I' . s_file-low = 'AAA'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_file-high . MESSAGE 'AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FILE-HIGH' TYPE 'I' . s_file-high = 'BBB'.
AT SELECTION-SCREEN ON HELP-REQUEST FOR s_file-low . MESSAGE 'AT SELECTION-SCREEN ON HELP-REQUEST FOR S_FILE-LOW' TYPE 'I' .
*AT SELECTION-SCREEN. * *Extras: * *1. ... ON psel *2. ... ON END OF sel *3. ... ON VALUE-REQUEST FOR psel_low_high *4. ... ON HELP-REQUEST FOR psel_low_high *5. ... ON RADIOBUTTON GROUP radi *6. ... ON BLOCK block *7. ... OUTPUT
INITIALIZATION . p_file = 'H1'. MESSAGE 'INITIALIZATION ' TYPE 'I'.
*&--------------------------------------------------------------------* *& Form GETFILENAME *&--------------------------------------------------------------------* FORM getfilename USING p_name . CALL FUNCTION 'WS_FILENAME_GET' EXPORTING mask = ',*.XLS ,*.XLS.' mode = '0' "如果为S,则为保存对话框 title = '选择要导入的文件' IMPORTING filename = p_name EXCEPTIONS inv_winsys = 1 no_batch = 2 selection_cancel = 3 selection_error = 4 OTHERS = 5. ENDFORM. " GETFILENAME