2007 Oct 12 11:19 AM
hi experts!!!
i am editing the ALv grid and want to read the changed Values in grid.
i am using
CALL METHOD G_grid_102->GET_CURRENT_cell
*IMPORTING
method and getting only a single cell valuse and the other cells some unknown valuse but i want to get all edited valuse in that row. so is tehre any method which i can use to canth the edited row valuse in grid.plz send me some expmlles.
plz help me
2007 Oct 12 11:23 AM
DATA: ref_grid TYPE REF TO cl_gui_alv_grid.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
ENDFORM.
2007 Oct 12 11:22 AM
HI mahesh
Go through this program
http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm
<b>Reward if usefull</b>
2007 Oct 12 11:23 AM
DATA: ref_grid TYPE REF TO cl_gui_alv_grid.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
ENDFORM.
2007 Oct 18 10:43 AM
hello ..
can u please help me how to get the edited row values in ALv grid...
plz help me
2007 Oct 18 11:03 AM
updated value will be stored in internal table you are passing to ALV grid..
Do not forgot to put below code in user_command
DATA: ob_grid TYPE REF TO cl_gui_alv_grid.
IF ob_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ob_grid.
ENDIF.
CALL METHOD ob_grid->check_changed_data.
Message was edited by:
Pawan Kesari
2007 Oct 18 11:11 AM
hii,
thank you,
do i need to implement any local claases for this or i can use this method directly refring to grid.
if u do nt mind can u plz give more info on CALL METHOD ob_grid->check_changed_data.and how to get the modifed cells in grid..
i need to update the same to DB table.
plz help me..
mahesh
2007 Oct 12 11:33 AM
Hi
You will have to
CALL METHOD g_grid_102->check_changed_data to check if any modification is done.
Then handle the event data_changed of cl_gui_alv_grid.
You will be importing er_data_changed of type ref to CL_ALV_CHANGED_DATA_PROTOCOL.
er_data_changed->mt_mod_cells which will contain the modified fields, row and column index.
Regards
Navneet
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |