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

Execute button in Report List

former_member425121
Participant
0 Likes
468

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
395

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

2 REPLIES 2
Read only

Former Member
0 Likes
396

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

Read only

Former Member
0 Likes
395

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