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

Editing single cell in a column

Former Member
0 Likes
870

Hai All

I got  one requirement that,i have to edit single cell in a column,iam able to edit single row by using the code

DATA ls_stylerow TYPE lvc_s_styl .

  DATA lt_styletab TYPE lvc_t_styl .

  LOOP AT it_makt INTO wa_makt.

    IF wa_makt-indcat NE 'H'.

      ls_stylerow-fieldname = 'INDCAT' .

      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

*      ls_stylerow-fieldname = 'ZMRDAT' .

*      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.

      MODIFY it_makt FROM wa_makt.

    ENDIF.

  ENDLOOP.

But i want to edit all the fields editable for that single row.

Regards,

sivajyothi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
781

Hai

My pbm was solved,we have to append every column that we want editable.

DATA ls_stylerow TYPE lvc_s_styl .

  DATA lt_styletab TYPE lvc_t_styl .

  LOOP AT it_makt INTO wa_makt.

    IF wa_makt-indcat NE 'H'.

      ls_stylerow-fieldname = 'INDCAT' .

      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.
      ls_stylerow-fieldname = 'ZMRDAT' .

     ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.

      MODIFY it_makt FROM wa_makt.

    ENDIF.

  ENDLOOP.

Regards,

sivajyothi.

Hai All

I got  one requirement that,i have to edit single cell in a column,iam able to edit single row by using the code

DATA ls_stylerow TYPE lvc_s_styl .

  DATA lt_styletab TYPE lvc_t_styl .

  LOOP AT it_makt INTO wa_makt.

    IF wa_makt-indcat NE 'H'.

      ls_stylerow-fieldname = 'INDCAT' .

      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

*      ls_stylerow-fieldname = 'ZMRDAT' .

*      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.

      MODIFY it_makt FROM wa_makt.

    ENDIF.

  ENDLOOP.

But i want to edit all the fields editable for that single row.

Regards,

sivajyothi.

4 REPLIES 4
Read only

Pawan_Kesari
Active Contributor
0 Likes
781

refer program BCALV_EDIT_02

Regards,

Pawan.

Read only

0 Likes
781

Hai Pawan

without using screen we cannot do  it in alv display.

Regards,

Jyothi

Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
781

Hi Sivajyothi,

Please find the following link may help you,

http://scn.sap.com/thread/3250209

Regards,

Gurunath Kumar D

Read only

Former Member
0 Likes
782

Hai

My pbm was solved,we have to append every column that we want editable.

DATA ls_stylerow TYPE lvc_s_styl .

  DATA lt_styletab TYPE lvc_t_styl .

  LOOP AT it_makt INTO wa_makt.

    IF wa_makt-indcat NE 'H'.

      ls_stylerow-fieldname = 'INDCAT' .

      ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.
      ls_stylerow-fieldname = 'ZMRDAT' .

     ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.

      APPEND ls_stylerow  TO wa_makt-field_style.

      MODIFY it_makt FROM wa_makt.

    ENDIF.

  ENDLOOP.

Regards,

sivajyothi.