‎2009 Jun 15 12:50 PM
Hi ,
I want to set cursor on particulat cell of an ALV , I am using below method
set_current_cell_via_id
CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
EXPORTING
IS_ROW_ID = <structure of type LVC_S_ROW >
IS_COLUMN_ID = <structure of type LVC_S_COL >
IS_ROW_NO = <structure of type LVC_S_ROID >.
but cursor is not moving to required cell , please let me know if need to pass some thing else or
what should be method that i should use to focus cursor on a particular cell of an alv
Thanks ,
Ramesh
‎2009 Jun 15 1:01 PM
Hi,
Check This code.
CALL METHOD GRID->REFRESH_TABLE_DISPLAY.
ROW-INDEX = LV_LINES. "Your row num where the cursor should be placed
COL-FIELDNAME = 'VBELN'. "Field on which the cursor should be placed.
CALL METHOD GRID->SET_CURRENT_CELL_VIA_ID
EXPORTING
IS_ROW_ID = ROW
IS_COLUMN_ID = COL.
.
Regards,
R K.
‎2009 Jun 15 1:16 PM
Hi,
its better to use the method 'SET_CURRENT_CELL_ROWPOS_COLID'
or,
please check if you have specified your field name.
Or,
Please try this code
READ TABLE LT_DATA INTO LS_DATA_EXT INDEX I.
IF SY-SUBRC eq 0.
L_START_POS = LS_DATA_EXT-FDPOS + 1.
L_END_POS = L_START_POS + L_LENGTH - 1.
CALL METHOD ME->SET_CURRENT_CELL
EXPORTING I_START_POSITION = L_START_POS
I_END_POSITION = L_END_POS
I_ROW = LS_DATA_EXT-ROW_POS
I_COLUMN = LS_DATA_EXT-COL_POS.
‎2009 Jun 15 5:41 PM
Hi,
Your PBO should contain a call to the method 'REFRESH_TABLE_DISPLAY' and your PAI should contain a call to method 'CHECK_CHANGED_DATA' whenver you are dealing with editable ALV grids functionalities.
Regards,
Ankur Parab