利用SALV可以简单的实现一个alv弹出窗口,代码如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
REPORT ztest_salv_popup.
DATA go_alv TYPE REF TO cl_salv_table.
DATA:git_alv TYPE STANDARD TABLE OF ekko.
DATA: lr_functions TYPE REF TO cl_salv_functions_list.
SELECT *
FROM ekko
INTO TABLE git_alv
UP TO 10 ROWS.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = git_alv[] ).
CATCH cx_salv_msg.
ENDTRY.
lr_functions = go_alv->get_functions( ).
lr_functions->set_all( ‘X‘ ).
IF go_alv IS BOUND.
go_alv->set_screen_popup(
start_column = 10
end_column = 110
start_line = 5
end_line = 15 ).
go_alv->display( ).
ENDIF.
|
运行结果:
以上。