2006 Oct 19 11:31 AM
HELLO SENIORS AND FRIENDS,
I AM A NEW USER TO THE THIS ENVIRONMENT AND ALSO A NEWCOMER IN THIS FIELD OF SAP.
I NEED TO DEVELOP THE SUBJECT REPORT CAN ANY ONE HELP ME OUT TO SOLVE THE REPORT PROGRAMMING MENTIONED IN THE SUBJECT..
THANKS
AYAZ
2006 Oct 19 11:33 AM
HELLO SENIORS AND FRIENDS,
I AM A NEW USER TO THE THIS ENVIRONMENT AND ALSO A NEWCOMER IN THIS FIELD OF SAP.
I NEED TO DEVELOP THE SUBJECT REPORT CAN ANY ONE HELP ME OUT TO SOLVE THE REPORT PROGRAMMING MENTIONED IN THE SUBJECT..
THANKS
AYAZ
2006 Oct 19 11:33 AM
2006 Oct 19 11:49 AM
REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the output data of the lowest hierarchy level.
Have a look at below example:
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 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 it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
2008 Mar 10 7:02 AM