‎2016 Mar 17 6:47 AM
Hello Abaper's
Greetings of the day.
We are displaying a ALV Grid Using CL_GUI_ALV_GRID methods with editable functionality.when we go on to the grid and changes any value for the first time it is holding the data and CHECK_CHANGED_DATA Method is working fine,but when ever we go back to the previous screen and come to the screen again and try to change the Value the data is not holding CHECK_CHANGED_DATA Method is not reflecting internal Table (Dynamic Internal Table) Value.
And the sample code in PAI
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
OTHERS = 1.
CALL METHOD OB_GD1->CHECK_CHANGED_DATA
IMPORTING
E_VALID = LV_VALID
CHANGING
C_REFRESH = WL_REFRESH.
Please Help me on this.
Thanks In Advance
Thanks & Regards,
Sathish
‎2016 Mar 17 7:40 AM
Hi Sathish,
After calling SET_TABLE_FOR_FIRST_DISPLAY, we have to register edit event for the grid.
See the below code.
CALL METHOD obj_grid_citm->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
For modification on Enter
CALL METHOD obj_grid_citm->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
Please check.
Regards,
SPR
‎2016 Mar 17 9:01 AM
Hi Saranya,
Thanks for the quick reply.
I tried the same but no luck
find the below code
IF OB_CUST12 IS INITIAL.
"creating container
CREATE OBJECT OB_CUST12
EXPORTING
CONTAINER_NAME = 'O_LIST123'.
""""assigning to a Grid
CREATE OBJECT OB_GD1 "
EXPORTING
I_PARENT = OB_CUST12.
* Formatted Output Table is Sent to Control
CALL METHOD OB_GD1->SET_TABLE_FOR_FIRST_DISPLAY "Display Grid
EXPORTING
IS_LAYOUT = LWA_LAYOUT
IT_TOOLBAR_EXCLUDING = GT_FUN
CHANGING
IT_OUTTAB = <GFS_DYN_TABLE1>
IT_FIELDCATALOG = GT_ALV_FIELDCAT
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
ELSE.
* CALL METHOD CL_GUI_CFW=>FLUSH.
CALL METHOD OB_GD1->REFRESH_TABLE_DISPLAY( ).
*
* CALL METHOD CL_GUI_CFW=>FLUSH.
ENDIF.
CALL METHOD OB_GD1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
Thanks & regards,
Sathish
‎2016 Mar 17 9:40 AM
Hi Sathish,
Please remove CL_GUI_CFW=>FLUSH from PAI and check if the
PAI
if OB_GD1 is not initial.
CALL METHOD OB_GD1->check_changed_data. (WITHOUT PASSING ANY PARAMETERS)
endif.
Please check.
Reagrds,
SPR
‎2016 Mar 17 10:03 AM
Hi Saranya,
I think the problem with the method refresh_table_display it is not properly refreshing(just suspecting)
any light on that
and i will try to remove that flush but no luck
Thanks for ur reply
Thanks & regards,
Sathish
‎2016 Mar 17 11:35 AM
Hi Sathish,
Are you handling any other events of ALV GRID CLASS ?
Call Refresh table as below.
gs_stable-row = 'X'.
gs_stable-col = 'X'.
call method CALL METHOD OB_GD1->REFRESH_TABLE_DISPLAY
exporting
is_stable = gs_stable.
Regards,
Spr
‎2016 Mar 17 8:57 AM
You should also be using the events DATA_CHANGED and DATA_CHANGED_FINISHED. CHECK_DATA_CHANGED is to force these two events to fire from outside of the grid nothing else.
If you wish to ensure that CHECK_DATA_CHANGED raises these events set the cached property GridModified of the grid to 1.
Rich
‎2016 Mar 17 10:47 AM