Application Development 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: 

problem with editable alv

Former Member
0 Kudos

hi all,

i have a problem that will have an editable alv, the requirement is that after editing the user can put a new value, and has to save that value in internal table , how to achive this save functionality in editable alv .

Thnx in advance

6 REPLIES 6

Former Member
0 Kudos

<copy&paste_removed_by_moderator>

Edited by: Julius Bussche on Nov 27, 2009 2:06 PM

0 Kudos

0 Kudos

YOU CAN USE

IF SY-CUCOMM EQ 'SAVE'.

CALL METHOD G_GRID->CHECK_CHANGED_DATA

IMPORTING

E_VALID = L_VALID.

IF L_VALID EQ 'X'.

LOOP AT PT_OUTTAB INTO ET_TABLASALIDA.

UPDATE TABEL FROM ET_TABLASALIDA.

ENDLOOP.

ENDIF.

ENDIF.

Edited by: gib8107 on Nov 27, 2009 2:39 PM

Former Member
0 Kudos

standard report BCALV_TEST_GRID_EDITABLE

Former Member
0 Kudos

Hi rajdeep,

For reflecting changes from alv to internal table...

just register edit event for your alv object as follows:

Obj->register_edit_event

and pass parameter

event_id = cl_gui_alv_grid=>mc_evt_enter.

So as soon you make changes in the the editable fields of alv and press enter,

the values are updated back to the internal table.

Regards,

Abhishak