‎2006 Mar 21 7:53 AM
Hi,
I have an alv in which some columns are input enabled. Now problem is when any cell of the alv is modified,it should be updated into the internal table which given to alv with pressing any button on alv toolbar.
please let me know if any method are there to get the values updated in the alv.Please let me know if any method for refreshing the screen data into the internal table.
Regards
Anil Kumar K
‎2006 Mar 21 8:14 AM
Anil,
You need to call the following method in the PAI of your screen.
CL_GUI_ALV_GRID-->CHECK_CHANGED_DATA.
The minute this fires, you will have updated data in the table.
Regards,
Ravi
Note : Please mark the helpful answers.
‎2006 Mar 21 7:58 AM
HI Anil,
you'll have to register the event..
once done the changes will be stored in the internal table itself..
data : g_grid TYPE REF TO cl_gui_alv_grid.
...
CALL METHOD g_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.the screen data is always refreshed in the itab itself ..
regards
satesh
Message was edited by: Satesh R
‎2006 Mar 21 8:14 AM
Anil,
You need to call the following method in the PAI of your screen.
CL_GUI_ALV_GRID-->CHECK_CHANGED_DATA.
The minute this fires, you will have updated data in the table.
Regards,
Ravi
Note : Please mark the helpful answers.
‎2006 Mar 21 10:38 AM
Hi Ravi kumar,
Thanks a lot. problem is solved. I have awarded points also.
Regrads
Anil Kumar K
‎2006 Mar 21 8:20 AM
Hi Anil,
Check this link:
You will have to create an event handler for the event data_changed of class cl_gui_alv_grid.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/an easy reference for alv grid control.pdf
Hope it helps you.
Regards
Anjali
‎2006 Mar 21 8:45 AM
Hi Anil,
You need to set the handler for datachanged.
set the handler for this, and register the event modified or enter.
**Handler to Check the Data Change
HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
OF CL_GUI_ALV_GRID
IMPORTING ER_DATA_CHANGED
E_ONF4
E_ONF4_BEFORE
E_ONF4_AFTER,**Handle Data Change
METHOD HANDLE_DATA_CHANGED.
DATA: X_CHANGE TYPE LVC_S_MODI.
LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO X_CHANGE.
ENDLOOP.
ENDMETHOD. "HANDLE_DATA_CHANGEDregards
vjay