REPORT ztest_notepad.
DATA: BEGIN OF it_modsap OCCURS 0,
name TYPE modsap-name,
typ TYPE modsap-typ,
member TYPE modsap-member,
END OF it_modsap.
TYPE-POOLS:slis.
DATA:wa_layout TYPE slis_layout_alv.
DATA:it_sort TYPE slis_t_sortinfo_alv.
DATA:wa_sort LIKE LINE OF it_sort.
PARAMETERS:p_exit TYPE modsap-member.
SELECT * FROM modsap INTO TABLE it_modsap WHERE member = p_exit.
READ TABLE it_modsap INDEX 1.
SELECT * FROM modsap INTO TABLE it_modsap WHERE name = it_modsap-name.
wa_layout-colwidth_optimize = 'X'.
wa_sort-fieldname = 'NAME'.
wa_sort-tabname = 'IT_MODSAP'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = 'MODSAP'
is_layout = wa_layout
it_sort = it_sort
TABLES t_outtab = it_modsap.
댓글 없음:
댓글 쓰기