上传路径定义PARAMETERS: P_PATH LIKE RLGRAP-FILENAME
结合上传路径添加的搜索帮助
PERFORM EXCEL_PATH.```
```FORM EXCEL_PATH .
CALL FUNCTION 'TB_LIMIT_WS_FILENAME_GET'
IMPORTING
FILENAME = P_PATH
EXCEPTIONS
SELECTION_CANCEL = 1
SELECTION_ERROR = 2
OTHERS = 3
ENDFORM. ```
![路径的搜索帮助.png](http://upload-images.jianshu.io/upload_images/3459413-9d99d529db9f65ac.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
* 拓展
根据单选按钮判断要不要显示上传路径
```SELECTION-SCREEN: BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.
PARAMETERS: R1 RADIOBUTTON GROUP BUT USER-COMMAND SEL DEFAULT 'X', "上传数据
R2 RADIOBUTTON GROUP BUT . "查询数据
SELECTION-SCREEN: END OF BLOCK blk3.```
```SELECTION-SCREEN: BEGIN OF BLOCK blk5 WITH FRAME TITLE text-005.
PARAMETERS: P_PATH LIKE RLGRAP-FILENAME MODIF ID m1. "选择路径 并隐藏响应
SELECTION-SCREEN: END OF BLOCK blk5.```
***********
``` LOOP AT SCREEN.
IF screen-group1 = 'M1' OR screen-group1 = 'M2'.
*上传文件显示
IF r2 = 'X'.
screen-active = 0.
ENDIF.
*下载/日志隐藏
IF r1 = 'X' AND screen-group1 = 'M2'."这个if永远不满足,所以不会执行
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.```
![展开.png](http://upload-images.jianshu.io/upload_images/3459413-5f95b654ce6fd0ba.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![收起.png](http://upload-images.jianshu.io/upload_images/3459413-c6fc4f58900c79e5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
给选择屏幕加按钮
```DATA gs_funx TYPE smp_dyntxt. "选择屏幕按钮```
```SELECTION-SCREEN:FUNCTION KEY 1.
INITIALIZATION. "初始化选择屏幕
gs_funx-icon_id = icon_export . "按钮图标
gs_funx-icon_text = '下载模板'.
sscrfields-functxt_01 = gs_funx.```
![效果.png](http://upload-images.jianshu.io/upload_images/3459413-05856746eb7a927a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)