
get_current_cell
Use
You use this method to get the value and properties of the grid control cell on which the cursor is placed.

If a column and no cell is selected, the ALV Grid Control sets the row index to 0 and returns only column-specific information. The ALV Grid Control reacts analogously if a row is selected.
The ALV Grid Control returns two row and column indexes: one that refers to the output table (this is the value that you normally need for further processing), and one that refers to the current display in the grid control. These values are different from each other if, for example, rows are not displayed as a result of a filter set.
Features
CALL METHOD <ref.var. to CL_GUI_ALV_GRID>->get_current_cell
IMPORTING
Parameter |
Meaning |
E_ROW |
Row index of selected cell, related to the display in the grid control |
E_VALUE |
Value of selected cell |
E_COL |
Column index of selected cell, related to the display in the grid control |
ES_COL_ID |
Structure with information on column field name, related to the output table |
ES_ROW_NO |
Structure with information on index of row, related to the output table |
For an overview, see:
Methods of Class CL_GUI_ALV_GRID