Skip to Content
0
Former Member
Sep 28, 2011 at 07:04 AM

Issue with Secondary list display in ALV BLocked List

50 Views

Hi all,

I am using ALV Blocked List consissting of 3 blocks.

For my requirement, in the 1st block, I need to make a colum clickable, for which I have used the User_Command Event.

But this is not working. The second list is not gettin displayed.

Here'z my code:

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = v_repid

  • i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • IT_EXCLUDING =

.

REFRESH: it_events[].

wa_events-name = slis_ev_top_of_list.

wa_events-form = 'FIRST_HEADING'.

APPEND wa_events TO it_events.

wa_events-name = slis_ev_user_command.

wa_events-form = 'USER_COMMAND'.

APPEND wa_events TO it_events.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = v_layout

it_fieldcat = it_disptab_field[]

i_tabname = 'DISPTAB'

it_events = it_events[] " Call 1st BLOCK TO BE APPENDED For SALES ANALYSIS

  • IT_SORT =

  • I_TEXT = ' '

TABLES

t_outtab = it_disptab

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&IC1'.

READ TABLE it_disptab INTO w_disptab INDEX rs_selfield-tabindex.

IF rs_selfield-fieldname = 'KUNAG'.

WRITE:/1 'invoice',

10 'Quantity in Base Unit',

20 'Base Unit',

30 'Qty in KL',

40 'Price'.

ENDIF.

ENDCASE.

ENDFORM. " USER_COMMAND

Please Help..