1 *函数1
2 DATA:lv_answer TYPE string .
3 CALL FUNCTION 'POPUP_TO_CONFIRM'
4 EXPORTING
5 * TITLEBAR = ' '
6 * DIAGNOSE_OBJECT = ' '
7 text_question = '确认上传OA审批'
8 * TEXT_BUTTON_1 = 'Ja'(001)
9 icon_button_1 = '是'
10 * TEXT_BUTTON_2 = 'Nein'(002)
11 icon_button_2 = '否'
12 * DEFAULT_BUTTON = '1'
13 display_cancel_button = 'X' "显示取消按钮
14 * USERDEFINED_F1_HELP = ' '
15 start_column = 25 "弹框尺寸
16 start_row = 6
17 * POPUP_TYPE =
18 * IV_QUICKINFO_BUTTON_1 = ' '
19 * IV_QUICKINFO_BUTTON_2 = ' '
20 IMPORTING
21 answer = lv_answer
22 * TABLES
23 * PARAMETER =
24 * EXCEPTIONS
25 * TEXT_NOT_FOUND = 1
26 * OTHERS = 2
27 .
28
29 IF lv_answer = '1'.
30
31 ENDIF .
32 *TEXT_QUESTION :它的功能就是写入要显示给用户的信息。
33 *
34 *ICON_BUTTON_1 :按钮上显示信息 返回值是1
35 *
36 *ICON_BUTTON_2 :按钮上显示信息 返回值是2
37 *
38 *DEFAULT_BUTTON :调用函数后哪个按钮被默认选中
39 *
40 *DISPLAY_CANCEL_BUTTON :显示取消的按钮并可用
41 *
42 *START_COLUMN ;TART_ROW :这两个是一对的控制对话框在画面上显示的位置
43 *
44 *ANSWER :这个很重要是存放你选择哪个BUTTON返回值的,定义为一位的CHAR型就可以了,可以根据返回值进行操作
45 *
46 "lv_answer 根据用户的操作会有三个值
47 " 1 是
48 " 2 否
49 " A 取消
50
51 *函数2
52 DATA:lv_answer TYPE string .
53 CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'
54 EXPORTING
55 * DEFAULTOPTION = 'Y'
56 diagnosetext1 = 'A'
57 * DIAGNOSETEXT2 = ' '
58 * DIAGNOSETEXT3 = ' '
59 textline1 = '8'
60 * TEXTLINE2 = ' '
61 titel = '标题'
62 * START_COLUMN = 25 "弹框尺寸
63 * START_ROW = 6
64 cancel_display = '' "显示取消按钮
65 IMPORTING
66 answer = lv_answer.
67 *DEFAULTOPTION 定位光标,以应答“是”或“否”
68 "lv_answer 根据用户的操作会有三个值
69 " J 是
70 " N 否
71 " A 取消
72
73 *函数3
74 DATA:lv_answer TYPE string .
75 CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
76 EXPORTING
77 * DEFAULTOPTION = 'Y'
78 textline1 = 'hello'
79 * TEXTLINE2 = ' '
80 titel = 'titel'
81 * START_COLUMN = 25 "弹框尺寸
82 * START_ROW = 6
83 * CANCEL_DISPLAY = 'X' "显示取消按钮
84 IMPORTING
85 answer = lv_answer.
86 "lv_answer 根据用户的操作会有三个值
87 " J 是
88 " N 否
89 " A 取消