I am working on a navigation list example where ONSELECT of an entry in the list corresponsding values should be populated in the internal table.
so i have context like
+ navi_list ( leadselection Yes singleton No )
++ Navi_rec_node ( recursion node )
data CONTEXT_ELEMENT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA ls_navi_list TYPE wd_this->element_NAVI_LIST.
DATA lo_nd_n1 TYPE REF TO if_wd_context_node.
Get key information for selected navigation list entry
lo_nd_n1 = wd_context->get_child_node( name = 'NAVI_LIST' ).
get element via lead selection
context_element = lo_nd_n1->get_element( ).
static_attributes = ls_navi_list ).
but i am not able to get the selected element in the internal table
Edited by: Tarang Shah on May 26, 2011 2:39 PM
> why do i do not need to get the lead selection etc....why did just specifying the paramter context_element in importing worked??
Naviagtion_list has only onSelect event, it does not have lead_selection event as in TABLE UI.
However it has id,context_element standard parameter filled on onSelect event.
> i had already declared it within the code then why did not it work
If you mean this code shown below then i would expect that you have context_element reference.
CALL METHOD wdevent->get_context_element
name = 'CONTEXT_ELEMENT'
value = context_element.