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

How to Process event when select ALV mark ?

Former Member
0 Likes
620

Hi.

The Screen have ALV data.

How to Process event when select ALV mark ?

Regards.

LY.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
566

Hi for ALV in oops you can do this

data: t_row_no type lvc_t_roid.

call method g_alv_grid->get_selected_rows

importing

et_row_no = t_row_no.

case sy-ucomm.

when 'ENTER'

loop at t_row_no into wa_row_no.

read table itab index wa_row_no-row_id.

perform Process_values using itab-fld1 itab-fld2.

endloop.

endcase.

3 REPLIES 3
Read only

Former Member
Read only

Former Member
0 Likes
566

EVENT

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = it_events[]

EXCEPTIONS

list_type_wrong = 1

OTHERS = 2.

IF sy-subrc <> 0.

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

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

ENDIF.

READ TABLE it_events WITH KEY name = slis_ev_top_of_page

INTO it_events.

IF sy-subrc = 0.

MOVE t_formname_top_of_page TO it_events-form.

APPEND it_events.

ENDIF.

ALV

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

it_fieldcat = it_fieldcat

it_events = it_events[]

i_callback_program = sy-repid

is_layout = gs_layout

i_save = g_save

is_variant = gx_variant

TABLES

t_outtab = i_data[].

.

Read only

Former Member
0 Likes
567

Hi for ALV in oops you can do this

data: t_row_no type lvc_t_roid.

call method g_alv_grid->get_selected_rows

importing

et_row_no = t_row_no.

case sy-ucomm.

when 'ENTER'

loop at t_row_no into wa_row_no.

read table itab index wa_row_no-row_id.

perform Process_values using itab-fld1 itab-fld2.

endloop.

endcase.