‎2008 Sep 02 12:17 PM
Hi,
We have a concern in ALV report. We have placed an expand button in the output. When we expand the button, the cursor is moving to the starting position of the list. But we want the cursor to be in the same position where the button lies?
How can we achieve this functionality??
Thanks!!
‎2010 Dec 15 6:47 AM
Hi,
Try This code.
DATA: E_ROW TYPE I,
E_VALUE TYPE C,
E_COL TYPE I,
ES_ROW_ID TYPE LVC_S_ROW,
ES_COL_ID TYPE LVC_S_COL,
ES_ROW_NO TYPE LVC_S_ROID.
CALL METHOD GRID1->GET_CURRENT_CELL
IMPORTING
E_ROW = E_ROW
E_VALUE = E_VALUE
E_COL = E_COL
ES_ROW_ID = ES_ROW_ID
ES_COL_ID = ES_COL_ID
ES_ROW_NO = ES_ROW_NO.
ES_COL_ID = 'MENGE'.
IF E_VALUE NE SPACE AND W_ERROR EQ SPACE.
CALL METHOD GRID1->SET_CURRENT_CELL_VIA_ID
EXPORTING
IS_ROW_ID = ES_ROW_ID
IS_COLUMN_ID = ES_COL_ID.
ENDIF.Thanks,
Maharshi