cancel
Showing results for 
Search instead for 
Did you mean: 

read select line in the table

Former Member
0 Kudos

hi,

can any one tell me how we code to get the selected line in the display table

thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

k

blent_evli
Explorer
0 Kudos

Hi,

You can do that with Web-Dynpro-Code-Wizard easy.

[link|http://help.sap.com/saphelp_smehp1/helpdata/de/3b/29933f09a5fb47e10000000a114084/content.htm]

Former Member
0 Kudos

Hi ,

1.Just select a row of table and click on button to read the value of selected row.

2. In the OnAction of button, just read the context node binded to the table using Code wizard(Control + F7).

3. below menttioned code will be automatically genearated and selected value's content will be stored in ls_cn_flight :

DATA lo_nd_cn_flight TYPE REF TO if_wd_context_node.
  DATA lo_el_cn_flight TYPE REF TO if_wd_context_element.
  DATA ls_cn_flight TYPE wd_this->element_cn_flight.
* navigate from <CONTEXT> to <CN_FLIGHT> via lead selection
  lo_nd_cn_flight = wd_context->get_child_node( name = wd_this->wdctx_cn_flight ).

* get element via lead selection
  lo_el_cn_flight = lo_nd_cn_flight->get_element(  ).

* get all declared attributes
  lo_el_cn_flight->get_static_attributes(
    IMPORTING
      static_attributes = ls_cn_flight ).

CN_FLIGHT is the node binded with table.

Former Member
0 Kudos

Hi

Code wizard can be of your help here as well...select the context node bound to table - select read in radiobutton, by default it reads

the selected element..

you can explore methods of class IF_WD_CONTEXT_NODe for simple functionalities like these and can go through basic WD documentation.

Regards

Manas Dua