DATA: PS_LAYOUT TYPE LVC_S_LAYO,
IS_VARIANT TYPE DISVARIANT .
PS_LAYOUT-NO_TOOLBAR = 'X'.
IS_VARIANT-REPORT = SY-REPID. "此处
IF G_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING
CONTAINER_NAME = 'SCR01'.
CREATE OBJECT ALV_GRID
EXPORTING
I_PARENT = G_CUSTOM_CONTAINER.
PERFORM FRM_FIELDCAT.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'makt_type'
IS_VARIANT = IS_VARIANT "此处
I_DEFAULT = 'X' "此处
I_SAVE = 'A' "此处
CHANGING
IT_OUTTAB = GT_ALV200[]
IT_FIELDCATALOG = GT_FIELDCAT.
参考: BCALV_GRID_09
---------------------
作者:阿土sap
来源:CSDN
原文:https://blog.csdn.net/chfeijj/article/details/8669724
版权声明:本文为博主原创文章,转载请附上博文链接!