我很好
分类: WINDOWS
2008-08-21 21:13:33
PROGRAM z_barry_test_button_icon .
DATA: ok_code TYPE sy-ucomm,
save_ok LIKE ok_code,
output(8) TYPE c.
DATA: button1(50) ,flag .
START-OF-SELECTION.
button1 = 'Start'.
CALL SCREEN 100.
*----------------------------------------------------------------------*
* MODULE user_command_0100 INPUT
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'BUTTON_EXIT'.
LEAVE PROGRAM.
WHEN 'BUTTON_1'.
output = 'Button 1'(001).
WHEN 'BUTTON_2'.
WHEN OTHERS.
output = save_ok.
ENDCASE.
IF flag = 'X'.
button1 = text@测试'.
flag = ''.
ELSE.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = 'ICON_DISPLAY'
text = 'TEST'
info = 'Display text'
add_stdinf = 'X'
IMPORTING
RESULT = button1
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
flag = 'X'.
ENDIF.
ENDMODULE. "user_command_0100 INPUT
*PROCESS BEFORE OUTPUT.
*
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.