情景:ALV界面上有几个复选框,程序逻辑根据复选框的选择情况执行不同的代码块,这几个复选框批次之间存在互斥且关联性不大(不适合用radio button),要求当点击某个复选框是、其他指定复选框不可编辑。
如下图所示:
选择条件:
1 2 |
parameters: p_histy as checkbox user-command ucm01, "直接查询已存储的静态表. p_detai as checkbox user-command ucm01. "查询未合并前的明细数据. |
在at selection-screen output.事件中进行处理:
1 2 |
at selection-screen output. perform fm_scrout. |
处理思路:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
form fm_scrout . data: lw_screen type screen. * 查询静态数据和明细数据不允许同时勾选,会影响路由选择. loop at screen. if screen-name cs 'P_HISTY' and p_histy eq 'X'. loop at screen. if screen-name cs 'P_DETAI'. clear p_detai. screen-input = '0'. modify screen. endif. endloop. exit. "必须exit,否则死循环. endif. if screen-name cs 'P_DETAI' and p_detai eq 'X'. loop at screen. if screen-name cs 'P_HISTY'. clear p_histy. screen-input = '0'. modify screen. endif. endloop. exit. endif. endloop. endform. |
本文作者: GavinDong
版权属于: GavinDong博客
文章链接: https://gavindong.com/3144.html
如果使用过程中遇到问题,可 **点击此处** 交流沟通。
版权所有,转载时必须以链接形式注明作者和原始出处及本声明。