CL_SALV_TABLE 在一个屏幕上显示两个表格
Display two tables on one screen with CL_SALV_TABLE
我想问一下是否可以使用 class CL_SALV_TABLE
.
在一个屏幕上显示两个相关的表(例如,按 PO 编号)
如果不行,还有什么 class 可行?
提前致谢!
正如 Sandra 所说的那样,这是不可能的。您需要更改方法:设置拆分容器并在其中显示您的 tables/grids 。此类显示的模板步骤如下:
* creating splitter
DATA(split) = NEW cl_gui_splitter_container( parent = cl_gui_container=>screen0
no_autodef_progid_dynnr = abap_true
rows = 1
columns = 2 ).
* marking container
DATA(spl_left) = split->get_container( row = 1 column = 1 ).
DATA(spl_right) = split->get_container( row = 1 column = 2 ).
* grid 1
cl_salv_table=>factory( EXPORTING
r_container = spl_right
IMPORTING
r_salv_table = o_salv
CHANGING
t_table = it_salv_itab1 ).
* grid 2
cl_salv_table=>factory( EXPORTING
r_container = spl_left
IMPORTING
r_salv_table = o_salv
CHANGING
t_table = it_salv_itab2 ).
查看此页面以获取综合示例
https://codezentrale.de/abap-gui-simple-tree-und-salv-grid-in-split-container-ohne-dynpro-anzeigen-eventhandling/
我想问一下是否可以使用 class CL_SALV_TABLE
.
如果不行,还有什么 class 可行?
提前致谢!
正如 Sandra 所说的那样,这是不可能的。您需要更改方法:设置拆分容器并在其中显示您的 tables/grids 。此类显示的模板步骤如下:
* creating splitter
DATA(split) = NEW cl_gui_splitter_container( parent = cl_gui_container=>screen0
no_autodef_progid_dynnr = abap_true
rows = 1
columns = 2 ).
* marking container
DATA(spl_left) = split->get_container( row = 1 column = 1 ).
DATA(spl_right) = split->get_container( row = 1 column = 2 ).
* grid 1
cl_salv_table=>factory( EXPORTING
r_container = spl_right
IMPORTING
r_salv_table = o_salv
CHANGING
t_table = it_salv_itab1 ).
* grid 2
cl_salv_table=>factory( EXPORTING
r_container = spl_left
IMPORTING
r_salv_table = o_salv
CHANGING
t_table = it_salv_itab2 ).
查看此页面以获取综合示例 https://codezentrale.de/abap-gui-simple-tree-und-salv-grid-in-split-container-ohne-dynpro-anzeigen-eventhandling/