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

ALV grid edited row values

Former Member
0 Likes
1,505

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
911

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.

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

6 REPLIES 6
Read only

Former Member
0 Likes
911

HI mahesh

Go through this program

http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm

<b>Reward if usefull</b>

Read only

Former Member
0 Likes
912

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.

Read only

0 Likes
911

hello ..

can u please help me how to get the edited row values in ALv grid...

plz help me

Read only

0 Likes
911

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

Read only

0 Likes
911

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

Read only

Former Member
0 Likes
911

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