Hi,
Add checkbox to fieldcatalog.
code after CALL METHOD alv_grid1->set_table_for_first_display.
CALL METHOD alv_grid1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
error = 1
OTHERS = 2.
Then add this code in DISPLAY button case.
WHEN 'DISPLAY'.
* CALL METHOD alv_grid1->get_selected_rows
* IMPORTING
* et_row_no = it_rows[].
*
* LOOP AT it_rows INTO wa_rows.
*
* READ TABLE it_mara INTO wa_mara INDEX wa_rows-row_id.
*
* IF sy-subrc = 0.
* SELECT SINGLE matnr werks dismm FROM marc INTO wa_marc
* WHERE matnr = wa_mara-matnr.
* IF sy-subrc = 0.
* APPEND wa_marc TO it_marc.
* CLEAR wa_marc.
* ENDIF.
* ENDIF.
* ENDLOOP.
LOOP AT it_mara INTO wa_mara WHERE check EQ 'X'.
SELECT SINGLE matnr werks dismm FROM marc INTO wa_marc
WHERE matnr = wa_mara-matnr.
IF sy-subrc = 0.
APPEND wa_marc TO it_marc.
CLEAR wa_marc.
ENDIF.
ENDLOOP.
IF it_marc IS INITIAL.
MESSAGE 'THERE IS NO PLANT RECORDS AVAILABLE FOR THE MATERIAL' TYPE 'E'.
ENDIF.
CALL METHOD alv_grid2->refresh_table_display.
Srikanth.