ABAP實現多表頭ALV
阿新 • • 發佈:2019-01-05
*FORM FRM_ALV_HEAD1 .
DATA:
l_rec_layout TYPE slis_layout_alv, "ALV layout setting
l_rec_keyinfo TYPE slis_keyinfo_alv, "Key information
l_h_tbl_sort TYPE slis_sortinfo_alv, "Sort key
l_tbl_sort TYPE slis_t_sortinfo_alv,"Sort table
l_h_tbl_fieldcat TYPE slis_fieldcat_alv,"Field catalog work area
l_tbl_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
* Set layout
l_rec_layout-group_change_edit = 'X'.
l_rec_layout-colwidth_optimize = 'X'.
l_rec_layout-zebra = 'X'.
l_rec_layout-detail_popup = 'X'.
l_rec_layout-get_selinfos = 'X'.
l_rec_layout-expand_FIELDNAME = 'EXPAND'.
l_h_tbl_sort-tabname = 'IT_WFLIST'.
l_h_tbl_sort-fieldname = 'INSTID'.
l_h_tbl_sort-up = 'X'.
APPEND l_h_tbl_sort TO l_tbl_sort.
l_h_tbl_sort-tabname = 'TY_WFLIST'.
l_h_tbl_sort-fieldname = 'INSTID'.
l_h_tbl_sort-up = 'X'.
APPEND l_h_tbl_sort TO l_tbl_sort.
l_h_tbl_sort-tabname = 'TY_WFLIST'.
l_h_tbl_sort-fieldname = 'BNFPO'.
l_h_tbl_sort-up = 'X'.
APPEND l_h_tbl_sort TO l_tbl_sort.
*******