08-04-2005 7:20 PM
Hi.
I have a program that display info in alv grid, using the function REUSE_ALV_GRID_DISPLAY.
I need to allow the user to edit a entire column, and i found that this could be done using:
slis_fieldcat_alv-edit = 'X'.
And it works pretty good, but after the user change the values in the grid, i would like to obtain a internal table with the new data from the alv grid.
How could i do this?
Thank you.
Regards,
Albio.-
Message was edited by: Albio Vivas
08-04-2005 9:21 PM
Hi
First you need to read the data into itab...by using event..Data changed of LAV grid...
there u can ge the data changed in ALV...capture that data and populate back to u r itab....
then call method...refresh_table_display
hope this helps
Thanks
Balu
08-04-2005 9:16 PM
08-04-2005 9:21 PM
Hi
First you need to read the data into itab...by using event..Data changed of LAV grid...
there u can ge the data changed in ALV...capture that data and populate back to u r itab....
then call method...refresh_table_display
hope this helps
Thanks
Balu
08-04-2005 10:37 PM
If you are not using the OO ALV, pass a routine name to the USER_COMMAND parameter of your call. In that routine, system will return you the updated internal table.
Srinivas
08-05-2005 12:07 AM
Thanks friends,
Excuse me, Srinivas Adavi could you tell me a litle more about your anwser?.
I'm new with the alv grid, how could i know if i'm using the oo alv or not?
Thanks,
Albio
08-05-2005 2:54 AM
Hi, my friend.
If you want to get the inputted data from ALV, no need to use OO ALV, FM also can achieve the target. try the follow way:
DATA:
LC_GLAY TYPE LVC_S_GLAY.
this is the critical point
LC_GLAY-EDT_CLL_CB = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_GRID_SETTINGS = LC_GLAY
IT_FIELDCAT = L_ALV_FILEDCAT
TABLES
T_OUTTAB = ITAB.
Please aware that you should move the cursor leave the cell, after finish the input.
Otherwise, the inputted date won't be update into internal table.
Actually, I have replied this question for serveral times.
Hope it will be helpful.
Thanks
08-05-2005 4:14 AM
If OOps u can do
In PBO,
call method o_alvgrid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
In PAI,
If u r going to save the values modified if some function code is activated the do as,
CASE sy-ucomm.
WHEN 'SAVE'.
Loop at i_output into w_output.
modify i_output from w_output.
endloop.
if some values are changed then it will have all the new values.
08-05-2005 4:42 AM
Hi Albio,
I thought the updated contents are always reflected back in the internal table you passed to the ALV. did you not try that ?
reuse_alv_grid_display
...
TABLES
T_OUTTAB = itab.
The contents should be updated in itab.
And this you can read at user command or something.
Because the user will ahve to finally press some button provided by you to indicate that he is doen with the editing.
Reg,
Prashanth.
08-05-2005 6:38 AM
Hi,
Check this link.It contains sample code to refresh ALV Grid.
http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
If it is useful,kindly reward points by clicking on the star on the left of reply.