‎2007 Jun 20 7:45 AM
What is the use of REUSE_ALV_HIERSEQ_LIST_DISPLAY for using in call fuction in abap edtior. I need fully details in programming level to use.
Regrads
S.Krishna
‎2007 Jun 20 7:46 AM
Check these programs of how the FM is used
BALVBT02
BALVHD01
BALVHD01_GROUP
BALVHT01
BCALV_TEST_HIERSEQ_LIST
Regards
Gopi
‎2007 Jun 20 7:49 AM
try this
REPORT ZGS_ALV_HIERSEQUENTIAL_REPORT.
TYPE-POOLS: slis.
TABLES: ekko.
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.
DATA: BEGIN OF i_ekko OCCURS 0,
ebeln LIKE ekko-ebeln,
ernam LIKE ekko-ernam,
bsart LIKE ekko-bsart,
var1,
END OF i_ekko.
DATA: BEGIN OF i_ekpo OCCURS 0,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
aedat LIKE ekpo-aedat,
END OF i_ekpo.
DATA: fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
layout TYPE slis_layout_alv,
key TYPE slis_keyinfo_alv,
events TYPE slis_t_event.
PERFORM get_data.
PERFORM append_data.
layout-expand_fieldname = 'VAR1'.
layout-zebra = 'X'.
key-header01 = 'EBELN'.
key-item01 = 'EBELN'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
i_callback_program = sy-cprog
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
is_layout = layout
it_fieldcat = fldcat[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
reward points if useful,
Aleem.
‎2007 Jun 20 7:51 AM
HI,chk this link.
http://www.sap-img.com/abap/how-to-use-alv-for-hierarchical-lists.htm
Reward points if helpful.
Regards
Sudheer
‎2007 Jun 20 7:52 AM
Hi,
It is used for Hierarchical sequential list output
<b>Functionality</b>
This module outputs two internal tables as a formated hierarchical-sequential list.
<b>Principle:</b>
Pass an internal table containing the set of header information to be output.
Pass an internal table containing the set of item information to be output.
Pass a structure containing the general list layout details
Pass a field catalog in the form of an internal table. The field catalog describes the fields to be output in the list.
Regards,
Padmam.
‎2007 Jun 20 7:55 AM
The function module REUSE_ALV_HIERSEQ_LIST_DISPLAY is used for ALV Hierarchical sequential list output.
An Example Prg..
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