Skip to Content
0
Jul 23, 2020 at 09:04 AM

alv REUSE_ALV_HIERSEQ_LIST_DISPLAY

23 Views Last edit Jul 23, 2020 at 09:46 AM 2 rev

I have a problem with fm REUSE_ALV_HIERSEQ_LIST_DISPLAY: in alv it does not insert the values of the it_item table

* lv_layout-expand_fieldname = 'EXP'.
* lv_keyinfo-header01 = 'X'.
* lv_keyinfo-item01 = 'X'.

ls_fcat-col_pos = 1.
ls_fcat-tabname = 'IT_HEAD'.
ls_fcat-fieldname = 'BUKRS'.
ls_fcat-seltext_l = De.'.
APPEND ls_fcat TO lt_fcat.

ls_fcat-col_pos = 2.
ls_fcat-tabname = 'IT_HEAD'.
ls_fcat-fieldname = 'BLDAT'.
ls_fcat-seltext_l = 'Di.'.
APPEND ls_fcat TO lt_fcat.

ls_fcat-col_pos = 3.
ls_fcat-tabname = 'IT_ITEM'.
ls_fcat-fieldname = 'BSCHL'.
ls_fcat-seltext_l = 'Chvt.'.
APPEND ls_fcat TO lt_fcat.
ls_fcat-col_pos = 4.
ls_fcat-tabname = 'IT_ITEM'.
ls_fcat-fieldname = 'HKONT'.
ls_fcat-seltext_l = 'Cr.'.
APPEND ls_fcat TO lt_fcat.

lv_layout-colwidth_optimize = 'X'.

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = lv_layout
it_fieldcat = lt_fcat
i_tabname_header = 'IT_HEAD'
i_tabname_item = 'IT_ITEM'
is_keyinfo = lv_keyinfo
TABLES
t_outtab_header = it_head
t_outtab_item = it_item
EXCEPTIONS
program_error = 1.