Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal tables in one Function module

Former Member
0 Likes
456

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.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
428

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

3 REPLIES 3
Read only

uwe_schieferstein
Active Contributor
0 Likes
429

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

Read only

0 Likes
428

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

Read only

0 Likes
428

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