ABAP顾问
分类:
2008-07-22 16:28:52
REPORT z_barry_pop_display_text .
INCLUDE
DATA: user_buttons LIKE smp_dyntxt OCCURS 0 WITH HEADER LINE,
parameter LIKE spar OCCURS 0 WITH HEADER LINE,
antwort LIKE rsnewleng-fcode.
START-OF-SELECTION.
CLEAR user_buttons.
user_buttons-text = '关闭'.
user_buttons-icon_id = icon_close.
user_buttons-icon_text = '退出'.
user_buttons-quickinfo = '结尾'.
APPEND user_buttons.
CALL FUNCTION 'POPUP_DISPLAY_TEXT_USER_BUTTON'
EXPORTING
language = sy-langu
popup_title = '测试'
start_column = 5
start_row = 5
text_object = 'COM_ATTR_WZ_ATTR_TYPE' "SE61 DT对话文本
display_ok_button = ' '
display_cancel_button = ' '
IMPORTING
answer = antwort
TABLES
user_buttons = user_buttons
parameter = parameter
EXCEPTIONS
error_in_text = 1
text_not_found = 2
OTHERS = 3.
ULINE.
WRITE: / '点击按钮:', antwort.
ULINE.
parameter-param = 'V1'.
parameter-value = text-010.
APPEND parameter.
parameter-param = 'V2'.
parameter-value = text-020.
APPEND parameter.
CALL FUNCTION 'POPUP_DISPLAY_TEXT_USER_BUTTON'
EXPORTING
language = sy-langu
popup_title = '使用参数测试'
start_column = 10
start_row = 10
text_object = 'SPO_EXAMPLE_2'
IMPORTING
answer = antwort
TABLES
parameter = parameter
EXCEPTIONS
error_in_text = 1
text_not_found = 2
OTHERS = 3.
ULINE.
WRITE: / '点击按钮:', antwort.
ULINE.