‎2009 Jul 08 3:12 AM
Hi
I have an ALV wich executes with user commad button a Report List (write) ; then when the Report List is showed i need to execute some action with some button so i set a status gui with the button , but when i press the button any action is executed ; no control is passed to program even if i set the debug mode and then press that button.
Does somebody knows how can i catch a button in report list for make some action , taking in account that the report list was called from an ALV user command button.
Regards
Frank
‎2009 Jul 08 3:28 AM
I think you will need to activate the events of user_command in the events activating subroutine,
form f_eventtab_build changing lt_events type slis_t_event.
data:
lw_event type slis_alv_event.
refresh lt_events.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = lt_events.
read table lt_events
with key name = slis_ev_user_command into lw_event.
if sy-subrc = gc_zero.
move slis_ev_user_command to: lw_event-form, lw_event-name.
append lw_event to lt_events.
endif.
endform. " f_eventtab_build
form user_command.
if sy-ucomm = 'XXX'.
* etc.....etc......
endif.
endform.
does this solve your problem?
Edited by: Andre Julius on Jul 8, 2009 4:30 AM
‎2009 Jul 08 3:28 AM
I think you will need to activate the events of user_command in the events activating subroutine,
form f_eventtab_build changing lt_events type slis_t_event.
data:
lw_event type slis_alv_event.
refresh lt_events.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = lt_events.
read table lt_events
with key name = slis_ev_user_command into lw_event.
if sy-subrc = gc_zero.
move slis_ev_user_command to: lw_event-form, lw_event-name.
append lw_event to lt_events.
endif.
endform. " f_eventtab_build
form user_command.
if sy-ucomm = 'XXX'.
* etc.....etc......
endif.
endform.
does this solve your problem?
Edited by: Andre Julius on Jul 8, 2009 4:30 AM
‎2009 Jul 08 4:04 AM
Set the function code / sy-ucom value in your gui status.
then on the PAI
case sy-ucomm.
when '<value you set in gui status for that button>.
Put your code here
endcase.
Hope this helps.
Thanks
Kiran