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

Interactive ALV

Former Member
0 Likes
475

Hello SDN friends,

can anybody tell us how to make interactive alv

What are the function modules and the mandatory parameters to pass.

3 REPLIES 3
Read only

Former Member
0 Likes
451

Reward points..

Read only

venkat_o
Active Contributor
0 Likes
451

Rajesh Parandkar, Here is the procedure to handle Interactive ALV. 1. declare events table like this.

data :
      i_events  type slis_t_event,
      w_events  like line of i_events.
2. Build events table .
w_events-name = 'USER_COMMAND' .
w_events-form = 'USER_COMMAND' .
append w_events to i_events.
clear w_events.
 
w_events-name = 'PF_STATUS_SET' .
w_events-form = 'PF_STATUS_SET' .
append w_events to i_events.
clear w_events.
3. pass this events table through REUSE_ALV_GRID_DISPLAY. 4. USER_COMMAND and PF_STATUS_SET call back subroutines should be like this in your case. These are nowhere called using PERFORM statement in ur program. 5. USER_COMMAND subroutine should be like this.
*&---------------------------------------------------------------------*
*&      Form  user_command
*&---------------------------------------------------------------------*
form user_command using ucomm like sy-ucomm
                  selfield type slis_selfield.
  case ucomm .
    when '&IC1'. This is for double click on ALV output.
      skip 10.
      position 10.
      write 'Double click was executed'.
  endcase.
 
endform.                    "user_command
selfield structure You can also handle Interactive ALV using this structure.
types: begin of slis_selfield,
         tabname              type slis_tabname,
         tabindex             like sy-tabix,
         sumindex             like sy-tabix,
         endsum(1)            type c,
         sel_tab_field        type slis_sel_tab_field,
         value                type slis_entry,
         before_action(1)     type c,
         after_action(1)      type c,
         refresh(1)           type c,
         col_stable(1)        type c,
         row_stable(1)        type c,
*        colwidth_optimize(1) type c,
         exit(1)              type c,
         fieldname            type slis_fieldname,
         grouplevel           type i,
         collect_from         type i,
         collect_to           type i,
       end of slis_selfield.
6. PF_STATUS_SET' subroutine should be like this.
*&---------------------------------------------------------------------*
*&      Form  pf_status_set
*&---------------------------------------------------------------------*
form pf_status_set    using extab type slis_t_extab.
set pf-status 'STATUS1' excluding g_extab.
 
endform.                    "pf_status_set
I hope that it helps u. Regards, Venkat.O

Read only

Former Member
0 Likes
451

hi,

for interactive report this are the events to triggred

events of interactive report

at line selection

at user-command.

Reward points

Fareedas