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

column editable mode using factory method

Former Member
0 Likes
2,474

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,461
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.
Read only

0 Likes
1,461

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

Read only

0 Likes
1,461

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,461

Take a look at

-

- [Power of ABAP Objects: Overcome the Restrictions of SALV Model|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/12187]

Regards,

Raymond