Button at row repeater - How to identify what line button was clicked.
I`m developing a WD application using ROW_REPEATER to show a list of items. For each item, I have a button to access another view to show the detail about the line where button was clicked.
My application is very similar with example showed in this link: http://help.sap.com/saphelp_nw70/helpdata/en/44/93d3bc2e8c60d6e10000000a114a6b/frameset.htm
How can I pass the ID of the line where button were clicked to detail view?
Rohit Makkar replied
You can proceed as explained in here. In the onAction event of the Button place the following coding:
method ONACTIONONBUTTONCLICK . data: lr_element type ref to if_wd_context_element, lv_index type i. lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ). lv_index = lr_element->get_index( ).
Now lv_index will contain the table row number in which the Button was clicked upon.