‎2008 Dec 12 7:20 AM
Hi Guru's,
Can we put 4 internal tables in one function module in ALV reporting.
could any one send me along with the code.
Thanks & Regards,
Shiva.
‎2008 Dec 12 7:31 AM
Hello Shiva
You may have a look at my sample report ZUS_SDN_THREE_ALV_GRIDS in thread
However, this is class-based ALV.
I you case you presumably have to used blocked ALV lists.
Regards
Uwe
‎2008 Dec 12 7:31 AM
Hello Shiva
You may have a look at my sample report ZUS_SDN_THREE_ALV_GRIDS in thread
However, this is class-based ALV.
I you case you presumably have to used blocked ALV lists.
Regards
Uwe
‎2008 Dec 12 12:52 PM
Hi Uwe,
Thank you.
I didn't understand, Using Blocked ALV how can we insert 4 internal tables.
could you please get the code for me .
Regards,
shiva.
Edited by: Shiva Krishna on Dec 12, 2008 1:59 PM
‎2008 Dec 12 3:23 PM
Hi Shiva,
you have to use the ff FMs:
1.) REUSE_ALV_BLOCK_LIST_INIT
2.) REUSE_ALV_BLOCK_LIST_APPEND
3.) REUSE_ALV_BLOCK_LIST_DISPLAY
DATA: v_repid TYPE sy-repid.
v_repid = sy-repid.
*-initialize block
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = v_repid.
*-Build Layout
PERFORM f_build_layout.
*-Build Fieldcatalog
PERFORM f_build_fieldcat TABLES i_fcat_det
USING <name of structure1>.
PERFORM f_build_fieldcat TABLES i_fcat_absc
USING '<name of structure2>'.
*-Build Events
PERFORM f_build_events.
*-Append table I_OUT_DETAILS
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = i_fcat_det
i_tabname = 'I_OUT_DETAILS'
it_events = i_events_det
TABLES
t_outtab = i_out_details
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
*-Append table I_OUT_ABSC
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = i_fcat_absc
i_tabname = 'I_OUT_ABSC'
it_events = i_events_absc
TABLES
t_outtab = i_out_absc
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
*-Display ALV list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
IF sy-subrc <> 0.
ENDIF.
Regards,
mari