我需要ABAP alv_grid的帮助。
首先,我将向您展示我的代码:
"descibe data
data: grid type ref to cl_gui_alv_grid,
container type ref to cl_gui_custom_container,
"create a container
if container is initial.
container = new cl_gui_custom_container( =
container_name = 'CONTAINER'
* lifetime = LIFETIME_DEFAULT
).
"create a grid
if grid is initial.
grid = new cl_gui_alv_grid( i_parent = container ).
call method grid->set_table_for_first_display
exporting
is_layout = wa_layout
it_toolbar_excluding = gt_toolbar_excluding
changing
it_outtab = lt_variable
it_fieldcatalog = it_fcat.
结果,我得到了类似this的图片(图片上的红线正是我最终要得到的东西)。
我的目标是使表大小像容器大小一样,我不知道应该在哪里添加参数以实现此目标(如果可能的话)。
P.S。如有必要,布局为:
data wa_layout TYPE lvc_s_layo.
wa_layout-cwidth_opt = 'X'.