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

ALV scroll

Former Member
0 Likes
1,046

Hi All,

I have a editable Alv grid display.I have event double click.when i double click on a particular line one of the column gets a checked sign.My problem is that once i double click the cursur goes to the starting of the list display.I want it to be at the same row i double clickd.Does any one how to slovw this problem.

Thanks And regards

Ahasan

1 ACCEPTED SOLUTION
Read only

Former Member
954

Hi,

I think you are doing a REFRESH_TABLE_DISPLAY. For that method there are some parameters. when you pass the values for that, the list will stay at the same place where the user has clicked.

IS_STABLE TYPE LVC_S_STBL.

Set the values IS_STABLE-ROW = 'X' and IS_STABLE-COL = 'X'.

That should fix the problem.

regards,

Ravi

Note : Please close the thread if this resolves the issue.

5 REPLIES 5
Read only

Former Member
0 Likes
954

hi,

it is simple , i did it once.

you need to set it . you will get the selected row from double click . using that call the method set_selected_row.

  METHOD DOUBLE_CLICK .
    CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
    V_ROW  = E_ROW_ID.
    V_COLUMN = E_COLUMN_ID.
    V_ROW_NUM = ES_ROW_NO.
    "do some thing here like in your case show another alv
    PERFORM SET_SELECTED_CELL.
  ENDMETHOD.

FORM SET_SELECTED_CELL .
  IF NOT V_ROW IS INITIAL
   AND NOT V_COLUMN IS INITIAL
   AND NOT V_ROW_NUM IS INITIAL.
    CALL METHOD G_GRID->SET_CURRENT_CELL_VIA_ID
      EXPORTING
        IS_ROW_ID    = V_ROW
        IS_COLUMN_ID = V_COLUMN
        IS_ROW_NO    = V_ROW_NUM.

  ENDIF.
ENDFORM.                    " SET_SELECTED_CELL

regards

vijay

Read only

0 Likes
954

Hi,

i will try it.

regards

Ahasan

Read only

0 Likes
954

Even if you are not calling REFRESH, you can make a call to this method so that the position doesn't change.

You don't have to find the current position, by this method.

regards,

Ravi

Note : Please close the thread if this resolves the issue.

Read only

Former Member
955

Hi,

I think you are doing a REFRESH_TABLE_DISPLAY. For that method there are some parameters. when you pass the values for that, the list will stay at the same place where the user has clicked.

IS_STABLE TYPE LVC_S_STBL.

Set the values IS_STABLE-ROW = 'X' and IS_STABLE-COL = 'X'.

That should fix the problem.

regards,

Ravi

Note : Please close the thread if this resolves the issue.

Read only

Former Member
0 Likes
954

Hi,

in my case i called this method SET_CURRENT_CELL_VIA_ID, this will set the row,cell we clicked .

regards

vijay