Can anyone tell me how to use ALV for hierarchical lists using the function code REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Swarna
Hello, there are some nice examples in SAP which use this function module, so you might want to check them out ( where used etc. )
In essence, this is a call in one of my ABAPs
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_interface_check = 'I'
i_callback_program = gv_repid
* i_callback_pf_status_set = 'STATUS_DATA'
i_callback_user_command = 'COMMAND_DATA'
* is_layout = gs_layout
it_fieldcat = gt_fieldcat
i_default = ' '
i_save = 'A'
i_tabname_header = v_headers_itable
i_tabname_item = v_items_itable
i_structure_name_header = v_headers_table
i_structure_name_item = v_items_table
is_keyinfo = gs_keyinfo
i_bypassing_buffer = 'X'
TABLES
t_outtab_header = i_headers
* t_outtab_item = i_result
t_outtab_item = i_report
EXCEPTIONS
program_error = 1
OTHERS = 2.
The field cat creation worked like this :
FORM fieldcat.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_internal_tabname = v_items_itable
i_structure_name = v_items_table
CHANGING
ct_fieldcat = gt_fieldcat.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_internal_tabname = v_headers_itable
i_structure_name = v_headers_table
CHANGING
ct_fieldcat = gt_fieldcat.
ENDFORM.
and of course you need to tell the thing what is key and item
gs_keyinfo-header01 = 'PA'.
gs_keyinfo-item01 = 'PA'.
gs_keyinfo-item02 = 'SAPDOC'.
PERFORM fieldcat.
I hope this helps you and not confuse you, 1990年1月15日 2007年1月14日 2007年1月15日 2007年1月16日 2007年1月17日 2007年1月18日 2007年1月19日 2007年1月20日 2007年1月22日 2007年1月23日 2007年1月24日 2007年1月25日 2007年1月26日 2007年1月27日 2007年1月29日 2007年1月30日 2007年1月31日 2007年2月1日 2007年2月2日 2007年2月3日 2007年3月13日 2007年5月15日 2007年5月16日 2007年6月2日