Google Search - Blog...........

ABAP - Simple ALV Grid/List With Save Layout.

REPORT ZTEST.

TYPE-POOLS: slis.

DATA: report_id LIKE sy-repid.

DATA: i_qmel LIKE qmel OCCURS 0.

DATA: i_layout TYPE slis_layout_alv.

SELECT * FROM qmel INTO TABLE i_qmel.

report_id = sy-repid.

PERFORM f1000_layout_init CHANGING i_layout.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = report_id
i_structure_name = 'QMEL'
is_layout = i_layout
i_save = 'A'
TABLES
t_outtab = i_qmel .

FORM f1000_layout_init USING
i_layout TYPE slis_layout_alv.
CLEAR i_layout.

i_layout-colwidth_optimize = 'X'.

ENDFORM.




No comments:

Post a Comment