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, get current cell, table property_cache

Former Member
0 Likes
2,099

Hello,

I have a alv grid using the method handle_data_changed for the fields quantity and price. When I change the price and click into another cell the system passes into this method.

Unfortunatly the cursor than is not in the clicked cell but in the first cell of this row. I used method set_current_cell_via_id but I can not access the cell ID of the cell where I clicked. The clicked cell is in the property_cache 'CurrentCellColID' of the alv object but this table is protected and I have no access to it. Method GET_CURRENT_CELL_COL_ID is also protected.

Any ideas how to put the cursor in the clicked cell?

best regards

stefan

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
1,163

You can use


* Get the Current Cell
  CALL METHOD CL_GUI_ALV_GRID=>GET_CURRENT_CELL
    IMPORTING
      E_ROW     = LE_ROW
      E_VALUE   = LE_VALUE
      E_COL     = LE_COL
      ES_ROW_ID = LES_ROW_ID
      ES_COL_ID = LES_COL_ID
      ES_ROW_NO = LES_ROW_NO.

Hello,

I have a alv grid using the method handle_data_changed for the fields quantity and price. When I change the price and click into another cell the system passes into this method.

Unfortunatly the cursor than is not in the clicked cell but in the first cell of this row. I used method set_current_cell_via_id but I can not access the cell ID of the cell where I clicked. The clicked cell is in the property_cache 'CurrentCellColID' of the alv object but this table is protected and I have no access to it. Method GET_CURRENT_CELL_COL_ID is also protected.

Any ideas how to put the cursor in the clicked cell?

best regards

stefan

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
1,164

You can use


* Get the Current Cell
  CALL METHOD CL_GUI_ALV_GRID=>GET_CURRENT_CELL
    IMPORTING
      E_ROW     = LE_ROW
      E_VALUE   = LE_VALUE
      E_COL     = LE_COL
      ES_ROW_ID = LES_ROW_ID
      ES_COL_ID = LES_COL_ID
      ES_ROW_NO = LES_ROW_NO.

Read only

0 Likes
1,163

Thanks a®s,

thats what I needed.

regards

stefan