Skip to Content
0
Former Member
Dec 28, 2011 at 12:22 PM

Checkbox in alv grid

725 Views

Hello friends

i have an internal table displayed in alv with one field as editable checkbox.

The display is OK.

After the user click the SAVE button, I want to process the ckecked records only.

My problem: after clicking the SAVE button, in USER_COMMAND form, all the records of the internal table have the checkbox field empty even if they were checked.

 MOVE 'SET_PF_STATUS' TO wv_slis_formname.
  wv_repid = sy-repid.

  DELETE wt_input INDEX 1.   "remove the header texts

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_user_command  = 'USER_COMMAND'
      i_callback_program       = wv_repid
      i_callback_pf_status_set = wv_slis_formname
      is_layout                = ws_layout
      it_fieldcat              = wt_field1
*      i_save                   = 'X'
    TABLES
      t_outtab                 = wt_input
    EXCEPTIONS
      program_error            = 1
      OTHERS                   = 2.

anybody could give me a hint?

In debug session I check : wt_input table here

FORM user_command USING r_ucomm LIKE sy-ucomm
                        ls_selfield type slis_selfield.
  DATA: save_ok TYPE sy-ucomm.
  DATA: ref1 TYPE REF TO cl_gui_alv_grid.
  save_ok = sy-ucomm.
  CASE save_ok.
    WHEN 'SAVE'.
       

  ENDCASE.
ENDFORM.                    "user_command

and its fields corresponding for the checkbox are all empty