on 10-31-2008 8:43 AM
I have a table having 10 rows. In one of the column of the table, i am using the LINKTOACTION. If i click on that , i need to call a view based on the rownumber of the table. So my question is how to capture the row number of the table in which i clicked on LINKTOACTION ?
Hi Manjunath,
If you are working with events in a table the system does automatically pass on the WDEVENT of type CL_WD_CUSTOM_EVENT to the event handler method. In this case WDEVENT consists of 2 values in the PARAMETERS table : ID & CONTEXT_ELEMENT. First get the reference of this context element & then you can call the get_index method on the context element reference and get your row number. Put the code below into the event triggered by your LinkToAction & then you can get your row number.
Regards,
Uday
DATA: lr_element TYPE REF TO if_wd_context_element,
lv_column_name type string,
lv_row_number type i value 0.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
lv_column_name = wdevent->get_string( name = 'ID' ).
lv_row_number = lr_element->get_index( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.