Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

cursor Problem in ALV!!!

Former Member
0 Likes
368

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!!

1 REPLY 1
Read only

Former Member
0 Likes
313

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