on 05-30-2011 10:22 AM
Hello all,
how can'i get the selected line in a Table UI element ( not ALV UIelement), which can methode in which class trigger this line selection? and olso the ction that cant trigger it.
Thank you all
Hi,
When you select any record in table..this code will get select record.
* navigate from <CONTEXT> to <IT_VTTK> via lead selection
lo_nd_it_vttk = wd_context->path_get_node( path = `ZSHIPMENT_CHANGE.CHANGING.IT_VTTK` ).
* get element via lead selection
lo_el_it_vttk = lo_nd_it_vttk->get_element( ).
* get all declared attributes
lo_el_it_vttk->get_static_attributes(
IMPORTING
static_attributes = ls_it_vttk ).
When you want to get this record that is the question, i mean when you select and click on button or when select itself or any link, in that event write code, or simply you can use code wizard and read that node you wil get selected record.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
We can get the selected line of the Table UI element by using the following code. Which can be achived by using the code wizard button,
go to code wizard and select the node which u have binded. simple it gived the method call get static attributes
eg: lo_el_element->get_static_attributes( ls_table ).
so this ls_table consists of the line which u have selected.
and action which gets triggered when u click on the table line is ON LEAD SELECTION. which is prsent in the properties of UI elements in the VIew..
Regards,
Sana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In table UI create an action for onLeadSelect Event.
In that method just read that node., using code wizard.,
or lo_nd_test->get_static_attributes( importing attributes = ls_table ) method.
ls_table contains the selected row.
hope this helps u.,
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
Click on Table UI in layout., Under properties.., u can see onSelect onLeadSelect ....... at onLeadSelect clickon button at last it will ask to give action name., Create an action and place your code there..
check this link : http://www.saptechnical/Tutorials/WebDynproABAP/Call/Webdynpro.htm
use dot com in the above link..
hope this helps u.,
Thanks & Regards,
Kiran
Hi,
In Table ui elements properties you will find EVENTS - in that you will find onselect or onleadselect.
Help..
http://help.sap.com/saphelp_ERP2005/helpdata/en/b5/ac884118aa1709e10000000a155106/content.htm
OR
You can create your own action, in that action you write your code to get selected record.
Cheers,
Kris.
Hi,
Up to now we are discussing about table ui element. your requirement is ALV Table.
Go to veiw->select methods->create one method say onselect, make it event handler(method type ) and in event click
f4 you get all options there you can select onleadselect select that write your code in your new method.
Cehckk this..
Cheers,
Kris.
Edited by: kissnas on May 30, 2011 1:10 PM
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.