2008 Mar 31 1:00 PM
hi guys,
in object oriented alv's how can ı get value of selected cell?
hi guys,
in object oriented alv's how can ı get value of selected cell?
2008 Mar 31 1:08 PM
use method:
CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->get_selected_cells
IMPORTING
ET_CELL = <internal table of type LVC_T_CELL > .
2008 Mar 31 3:29 PM
using that method ı can select cell and then ı send that cell to another alv but problem is ı have to take value of cell but method doesn't work because each time, ı don't why, cell value is empty.
do you have any suggesstion ?
2008 Mar 31 4:20 PM
Does it return nothing at all, or only row and column ID? If row and column ID are returned just use these to determine value through your internal table.
I'm not quite sure why this method isn't working correct. Can you select individual cells, or can you only select entire rows and columns. Maybe the sel_mode of the layout structure is not set correct. Try and set it to SEL_MODE = D and then try method get_selected_cells again.
Alternative method would be to use get_current_cell.
Hope this helps, else I'm out of suggestions.
2008 Apr 02 8:49 AM
get_selected_cell return 3 parameters, in my code i can take 2 of them but third one which is the value of cell, can not return from method, ı don not why :DDD
ı try other methods, D
2008 Apr 02 9:05 AM
Hello Selcuk
I assume you mean method GET_CURRENT_CELL (because I do not see any method GET_SELECTED_CELL in this class on ECC6.0).
The problem that you do not get the value of parameter E_VALUE might by the type of your local variable.
I assume you are using a STRING variable. Replace it with a simple C-type variable, e.g.:
DATA: ld_value TYPE lvc_value.
DATA: ld_row TYPE i.
DATA: ld_col TYPE i.
CALL METHOD go_grid->get_current_cell
IMPORTING
e_row = ld_row
e_value = ld_value
e_column = ld_col.
Regards
Uwe
2008 Apr 02 9:13 AM
ı find sel_mode in structure but how can ı set sel_mode ? such as;
layout-sel_mode = 'X'.
2008 Apr 02 9:19 AM
Hello Secul
Below you find some explanations:
NO_ROWMARK
If this field is set, the button at the beginning of a row is hidden in selection modes cell selection ( SEL_MODE = 'D' ) and column/row selection ( SEL_MODE = 'A' ).
Possible values: SPACE, 'X'
SEL_MODE
Set the selection mode (see table at C.4.).
Possible values: SPACE, 'A', 'B', 'C', 'D'
Value
Mode
Possible selections
Comment
SPACE
same as 'B'
see 'B'
Default setting
'A'
Column and row selection
Multiple columns
Multiple rows
The user selects the rows through pushbuttons at the left border of the grid control.
'B'
Simple selection, list box
Multiple columns
Multiple rows
'C'
Multiple selection, list box
Multiple columns
Multiple rows
'D'
Cell selection
Multiple columns
Multiple rows
Any cellsThe user selects the rows through pushbuttons at the left border of the grid control.
Regards
Uwe
2008 Apr 02 9:38 AM
2010 Jul 22 4:29 AM
Hello selcuck,
I am also facing the same problem.
Can you please tell me how u solved this issue..
If u have any sample coding.. it will be really helpful.
Regards,
Linda.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |