‎2012 Feb 29 11:50 AM
Hi Abapers,
can any one tell the solution of my problem . i am using factory method to display basic list . in the basic list i want to display in one column editable mode . which method should i call for respect reason.
i hope you understand my problem.
regards,
venkat rao
‎2012 Feb 29 12:00 PM
DEFINITION part as follow:
METHODS handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm.
IMPLEMENTATION Part as follow:
METHOD handle_user_command.
DATA: wr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
DATA: lt_rows TYPE lvc_t_row,
lt_index TYPE lvc_s_row-index.
CASE e_ucomm.
WHEN 'EDIT'.
PERFORM change_alv_row.
* MESSAGE 'THIS IS A EDIT BUTTON' TYPE 'I'.
CALL METHOD o_ref_grid->refresh_table_display.
FORM change_alv_row .
DATA: i_row_table TYPE lvc_t_roid,
i_row TYPE lvc_t_row,
s_row TYPE lvc_s_row.
CALL METHOD o_ref_grid->get_selected_rows
IMPORTING
et_index_rows = i_row
et_row_no = i_row_table.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_row INTO s_row.
* LOOP AT i_display INTO w_display WHERE pick = 'X'.
READ TABLE i_display INTO w_display INDEX s_row-index.
IF sy-subrc = 0.
PERFORM get_values_for_alv.
ENDIF.
* ENDLOOP.
ENDLOOP.
ENDFORM.
‎2012 Feb 29 1:06 PM
Hi Lokesh,
i am sorry to say i am not using cl_gui_alv_grid . i am using factory method cl_salv_table class. could you please tell me
editable column in basic list regarding this class.
thanks ,
venkat rao
‎2012 Feb 29 1:14 PM
Don't get sidetracked by posters who write about something else....
Raymond gave you the answer....SALV is, by design, not editable. I recommend using the OO ALV version when you have this kind of need. SALV is a great "wrapper" for OO ALV for reporting....it's not the fix for everything. You can easily accomplish what you want in OO ALV, or you can refer to Raymond's link to N. Patel's excellent work on using OO to overcome SALV limitations.
‎2012 Feb 29 12:04 PM