cancel
Showing results for 
Search instead for 
Did you mean: 

WD table get Line selection

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

former_member184578
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

but i dont have this action on leadselect. in the property use?

former_member184578
Active Contributor
0 Kudos

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

Former Member
0 Kudos

i dont have this action (onSelect) in my layout (after clicing on the table UI element)

@ i want know the type of the attributes (ex: lo_nd_it_vttk...) and waht is that (PATH)??

thank you all

Former Member
0 Kudos

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.

Former Member
0 Kudos

hello Kissnas,

I really dont have this event (onselect) in my elemts properties !!!

THIS is a ViewContainerUIElement

Former Member
0 Kudos

Hi,

Upto now you are talking about TABLE UI Element, now saying VIEWCONTAINER UI, VCUI elemnt donesnt have that properties.

What is your requirement, dont confuse all.

Cheers,

Kris.

Former Member
0 Kudos

the component that i set in comp controller is SALV_WD_TABLE for this viewcontainer,

Former Member
0 Kudos

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