cancel
Showing results for 
Search instead for 
Did you mean: 

edit cel of table , leadselection

Former Member
0 Kudos

Hi ,

I have an editable table with 2 checkboxes as editable fields , if i check on 1, it has to check on the second checkbox.

Problem : if i toggle the first checkbox, i don't have yet the leadselection .. how to solve this ?

this is the toggle method :

Data : lo_nd_selection_items type ref to if_wd_context_node,

lo_el_selection_items type ref to if_wd_context_element,

lv_cockpit type c.

  • navigate from <CONTEXT> to <PORTALCONTEXT> via lead selection

lo_nd_selection_items = wd_context->get_child_node( name = wd_this->wdctx_selectionitems ).

  • get element via lead selection

lo_el_selection_items = lo_nd_selection_items->get_element( ).

  • get single attribute

lo_el_selection_items->get_attribute(

EXPORTING

name = `COCKPIT`

IMPORTING

value = lv_cockpit ).

if ( lv_cockpit = abap_true ).

  • set single attribute

lo_el_selection_items->set_attribute(

name = `DASHBOARD`

value = lv_cockpit ).

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

ls_context_element type ref to if_wd_context_element,

ls_context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT').

lo_nd_selection_items->set_lead_selection( ls_context_element ).

Former Member
0 Kudos

Th code above is of the toggle method.

I know i have to set the lead selection element with lo_nd_selection_items-> set_lead_selection ( context element)

the question is how i get the right context element ?

Former Member
0 Kudos

add to the parameters of you on toggle method the parameter context_element type if_wd_context_element,

this is the context element where you toggled the checkbox value

grtz,

Koen

Former Member
0 Kudos

Hi,

implement the on toggle action handler of your checkbox to do your double selection,

in the parameter context_element your line will be available and thus you can modify the other attribute.

Grtz,

Koen