**选择屏幕
SELECTION-SCREEN
BEGIN
OF
BLOCK main
WITH
FRAME
TITLE
TEXT
–
001
.
PARAMETERS
:p_matnr
LIKE mara
–matnr OBLIGATORY
,
p_werks
LIKE marc
–werks
,
p_vkorg
LIKE tvta
–vkorg
,
p_vtweg
LIKE tvta
–vtweg
.
SELECTION-SCREEN
SKIP
.
SELECTION-SCREEN
BEGIN
OF
LINE
.
SELECTION-SCREEN PUSHBUTTON
1
(
15
) but1
USER-COMMAND bt1
.
SELECTION-SCREEN PUSHBUTTON
18
(
15
) but2
USER-COMMAND bt2
.
SELECTION-SCREEN
END
OF
LINE
.
SELECTION-SCREEN
END
OF
BLOCK main
.
INITIALIZATION
.
* t1 = ‘输入栏名称’.
“but1 = ‘按键’.
CALL
FUNCTION
‘ICON_CREATE’
“给按钮添加图标和文本
EXPORTING
name
= icon_check
“按钮的图片的名字
text
=
‘检查’
“按钮的文本
info
=
‘检查’
IMPORTING
result
= but1
EXCEPTIONS
OTHERS
=
0
.
CALL
FUNCTION
‘ICON_CREATE’
” 给按钮添加图标和文本
EXPORTING
name
= icon_execute_object
” 按钮的图片的名字
text
=
‘扩充’
“按钮的文本
info
=
‘扩充’
IMPORTING
result
= but2
EXCEPTIONS
OTHERS
=
0
.
AT
SELECTION-SCREEN
.
CASE sscrfields
–ucomm
.
WHEN
‘BT1’
.
MESSAGE
‘您单击了自定义按钮’
TYPE
‘S’
.
WHEN
‘BT2’
.
MESSAGE
‘您单击了自定义按钮222’
TYPE
‘S’
.
ENDCASE
.
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/20158.html