Skip to Content
0
Former Member
Apr 17, 2008 at 06:03 AM

Question about ALV blocking

12 Views

Hi,

I use theis FM, 'REUSE_ALV_BLOCK_LIST_APPEND', to display my ALV having 2 blocks... i have the sample code below... I need that at every loop pass,,, it will have to display entries in the i_alv_sku at that particular pass...

However, the current scenario is that, it only displays the entries contained in the i_alv_sku for the las loop pass...

Is it possible that it stores the alv for that particular loop pass in the FM and will display everything in it after the last loop pass...

Thanks a lot!

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = v_repid.

Loop at i_mseg.

***Processing to populate i_alv_sku...**

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = i_layout

it_fieldcat = i_fieldcat[]

i_tabname = i_sku_resource

it_events = i_events[]

TABLES

t_outtab = i_alv_sku

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Refresh i_alv_sku.

Endloop.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'

EXCEPTIONS

program_error = 1

OTHERS = 2.

.