在选择屏幕上禁用参数输入 [英] Disable a parameter input at selection screen
本文介绍了在选择屏幕上禁用参数输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这样的选择屏幕上有屏幕过滤器
I have screen filter at selection screen like this
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME.
PARAMETERS s_werks like resb-werks DEFAULT 'X' .
SELECT-OPTIONS: s_aufnr FOR in_param-aufnr,
s_matnr FOR in_param-matnr,
s_bldat FOR in_param-bldat.
SELECTION-SCREEN END OF BLOCK a.
,而我只想禁用s_werks
参数,但要禁用SELECT-OPTIONS
.
and I want to disable just s_werks
parameter but SELECT-OPTIONS
.
我要禁用它,因为它将是从表中填充的确切值,具体取决于sy-uname
:)
I want to disable it because it'll be exact value which is filled from table depends on the sy-uname
:)
如何实现?
推荐答案
您可以为此使用OUTPUT
选择屏幕事件.
添加以下代码:
You can use the OUTPUT
selection screen event for this.
Add the following code:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'S_WERKS'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
将此屏幕元素的input
值更改为0
会禁用输入,并使输入字段显示为灰色.
Changing the input
value to 0
for this screen element will disable input and makes the input field appear as grayed out.
这篇关于在选择屏幕上禁用参数输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文