on 04-23-2011 4:51 AM
Hi guys,
I have an ALV table, if I click on any particular cell,then it should open a pop window. ( i am able to open pop up ).
My requirement is
how can we retrieve the index of selected cell ?
Regards
Srinivas
Hi
Try this Code
Data: context_element type ref to if_Wd_context_element.
context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
context_element->get_static_attributes( importing static_attributes = ls_stru ).
Regards
Arun.P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi arun,
I dnt want the cell structure values, I want to know the index value of selected cell.
My requirement: IN alv table , by default it will select first row, if i click on any cell then it wll open open a pop with secondary information related to t that cell value.
But here if i click on any cell , it is showing secondary information of first row value.
If I want to get secondary information of second row value, first i have to select second row, then i have to click on any cell of the second row, so i wll get secondary information for second row,
So my requirement is without selecting second row, if i click on any cell of second row i should be able to retrieve the secondary information of second row value.
So, here how can we get the index value of selected cell ?, if we know the index value, then my problem will solve.
Regards
Srinivas
Regards
Srinivas
Hi Srinivas,
create 'Event handler' for the event 'ON_CLICK' of alv interface controller in your controller, this event handler has got two parameters
1. r_param type ref to if_salv_wd_table_click
2. wdevent type ref to cl_wd_custom_event
using any of the above parameters you can get index of current row where link is being clicked.
lv_index = r_param->index .
or
we can use wdevent parameter also!!!
hope this is what you are looking for.
HI sanasrinivas,
"When you clicking any cell its showing information of first row" because in your context node 'initialized lead selection' is set so to get details of any row you have to select that one.
Any way you can achieve the same by using the r_param parameter any time. If you using ON_CLICK event handler then get directly the index value like
DATA INDEX_VALUE TYPE I.
INDEX_VALUE = R_PARAM->INDEX.
if you are using ONDATACHECK use like :-
FIELD-SYMBOLS: <WA_ROW> LIKE LINE OF R_PARAM->T_MODIFIED_CELLS.
FIELD-SYMBOLS: <L_VALUE> TYPE ANY.
DATA: INDEX_VALUE TYPE I.
LOOP AT R_PARAM->T_MODIFIED_CELLS ASSIGNING <WA_ROW>.
ASSIGN <WA_ROW>-R_VALUE->* TO <L_VALUE>.
INDEX_VALUE = <WA_ROW>-INDEX.
ENDLOOP.
You will get the index value easily.
Reply in case of any issue.
Regards,
Monishankar C
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.