on 08-07-2009 5:08 AM
Hi,
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?
Many thanks!
Flávio Furlan
Hi,
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.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Flavio,
I tried recreating your scenario. I am displaying the information from SFLIGHT using a RowRepeater & I have a button beside each row of data. when I click up on the button am succesfully able to retrieve the buttons information using the same approach as suggested by Rohit.
METHOD onactionfetch_bookings .
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( ).
ENDMETHOD.
Regards,
Uday
Hi Rohit and Uday,
You are correct. Solution provided by Rohit solved my problem.
I found the problem. When I was implementing Rohit's solution, I was replacing 'CONTEXT_ELEMENT' by own context name 'POST'.
lr_element = wdevent->get_context_element( name = 'POST' ).
instead
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
Thanks for your help!
See you!
Flávio
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.