cancel
Showing results for 
Search instead for 
Did you mean: 

Table's second line not in editable mode .

Former Member
0 Kudos

Hi ,

I have created a table in webdynpro . The problem is while execute it i am able to fill only the first line of the table . I am not able to manipulate from the second line of the table . If any one knows the solution to this

problem help me .

with regards ,

M.Sreeram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

The above given codes were helpful and made the second row in editable mode.But i am not able to do calculations as i do in the first row . it again reads the value on the first row not the second one .

with regards ,

M.Sreeram.

Former Member
0 Kudos

Hi,

U need to select the lead selected value. When u want to read the selected row, then use the following code for reading it.

DATA lo_nd_node TYPE REF TO if_wd_context_node.
  DATA lo_el_node TYPE REF TO if_wd_context_element.
  DATA ls_node TYPE wd_this->element_node.
  DATA lv_carrid LIKE ls_node-CARRID.
* navigate from <CONTEXT> to <NODE> via lead selection
  lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
  lo_el_node = lo_nd_node->get_lead_selection(  ).
* get single attribute
  lo_el_node->get_attribute(
    EXPORTING
      name =  `CARRID`
    IMPORTING
      value = lv_carrid ).

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Thanks agarwal i was able to fix the problem with the above given sample code . The problem was i did not

select the row and pressed enter . If i select the particular row and do operations its working fine .

with regards ,

M.Sreeram

Former Member
0 Kudos

hi,

The above given command does not work properly . i am still having problem in reading the second line of the row .

with regards,

M.Sreeram .

Former Member
0 Kudos

Hi,

Please paste the code which u are using for reading the second row. And also tell about ur attributes which u are reading.

Regards,

Pankaj Aggarwal.

Former Member
0 Kudos

Hi,

As i think u are initializing only the first row of the Table. Initialize the table to as many row's, as u want in editable mode.

Use the following code:

DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
  DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
  DATA ls_cn_try TYPE wd_this->element_cn_try.

  DATA ls_cn_try1 TYPE wd_this->elements_cn_try.

* navigate from <CONTEXT> to <CN_TRY> via lead selection
  lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).


do 5 times.

clear ls_cn_try.
append ls_cn_try to ls_cn_try1.
lo_nd_cn_try->bind_table( ls_cn_try1 ).

enddo.

Here cn_try is the name of the node which is binded to the table ui element.

Regards,

Pankaj Aggarwal

abhimanyu_lagishetti7
Active Contributor
0 Kudos

That means there are no more records in the Node to update.

Your Node Cardinality is 1..n , by default there is one element in the node hence you are able to edit the first row.

You need to add the elements to the node dynamically in order to edit it.

refer the code

data: lr_node type ref to if_wd_context_node.

data: ls_node type <Node_type>.

lr_node = wd_context->get_child_node( 'NODE_NAME' ).

lr_node->bind_element( NEW_ITEM = ls_node SET_INITIAL_ELEMENTS = abap_false ).

Abhi