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

problem with editable alv

Former Member
0 Likes
785

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
Read only

Former Member
0 Likes
743

<copy&paste_removed_by_moderator>

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

Read only

0 Likes
743
Read only

Former Member
Read only

Former Member
0 Likes
743

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

Read only

Former Member
0 Likes
743

standard report BCALV_TEST_GRID_EDITABLE

Read only

Former Member
0 Likes
743

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