2006 Sep 11 7:12 AM
Hi ,
can anybody tell me how to make a cell editable in alvgrid .
2006 Sep 11 7:48 AM
HI PLZ CHECK THE FOLLOWING CODE.
In the field catalogue, change the attributes of that field as editable
fcat-edit = 'X'.
After creating the grid, register event entered and modified
Create alv grid
CREATE OBJECT w_grid_vend
EXPORTING
i_parent = w_vend_contnr
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Register edit event
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edit event for modified
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
error = 1
OTHERS = 2.
Handle the changed data in the methods
Handle data changed
METHODS handle_data_changed FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed.
ALL THE BEST PRIYANKA
DO REWARD POINTS
Hi ,
can anybody tell me how to make a cell editable in alvgrid .
2006 Sep 11 7:18 AM
Hello Neetesh
If the entire ALV grid should be editable simply set the layout ls_layout-edit = 'X' (see also sample program BCALV_EDIT_01). For switching on/off at the level of individual cells look at sample program BCALV_EDIT_02.
Regards
Uwe
2006 Sep 11 7:20 AM
pls check these programs
BCALV_EDIT_01
BCALV_EDIT_02
BCALV_EDIT_03
BCALV_EDIT_04
BCALV_EDIT_05
BCALV_EDIT_06
BCALV_EDIT_07
BCALV_EDIT_08
2006 Sep 11 7:21 AM
In the field catalogue, change the attributes of that field as editable
fcat-edit = 'X'.
After creating the grid, register event entered and modified
Create alv grid
CREATE OBJECT w_grid_vend
EXPORTING
i_parent = w_vend_contnr
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Register edit event
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edit event for modified
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
error = 1
OTHERS = 2.
Handle the changed data in the methods
Handle data changed
METHODS handle_data_changed FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed.
2006 Sep 11 7:48 AM
HI PLZ CHECK THE FOLLOWING CODE.
In the field catalogue, change the attributes of that field as editable
fcat-edit = 'X'.
After creating the grid, register event entered and modified
Create alv grid
CREATE OBJECT w_grid_vend
EXPORTING
i_parent = w_vend_contnr
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Register edit event
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edit event for modified
CALL METHOD w_grid_vend->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified
EXCEPTIONS
error = 1
OTHERS = 2.
Handle the changed data in the methods
Handle data changed
METHODS handle_data_changed FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed.
ALL THE BEST PRIYANKA
DO REWARD POINTS
2006 Sep 11 8:06 AM
hi
good
go through these links, which ll give your brief idea about the alv cell editing
http://help.sap.com/saphelp_nw04s/helpdata/en/b7/c99f4218f6c46ae10000000a155106/content.htm
thanks
mrutyun^
2006 Sep 11 8:07 AM
What do u mean by cell editable?
1> The entire ALV grid column editable ?
2> Selected cells in a row/column editable?
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |