on 05-26-2011 10:09 AM
Hi ,
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
context
+ navi_list ( leadselection Yes singleton No )
++ Navi_rec_node ( recursion node )
++ TEXT
++ SELECTABLE
++ CARRID
++ CONNID
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
break-point.
lo_nd_n1 = wd_context->get_child_node( name = 'NAVI_LIST' ).
get element via lead selection
context_element = lo_nd_n1->get_element( ).
context_element->get_static_attributes(
IMPORTING
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
my issue is when i click on the 3 rd item in the list only the 1st item value is getting populated...also the carrid and connid values in the context are not getting populated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i tried using the below classes and found that my lead selection is not working ...it is always 1 ..eventhough i select 3rd item in the naviogation list...how do i correct this
CALL METHOD wdevent->get_context_element
EXPORTING
name = 'CONTEXT_ELEMENT'
RECEIVING
value = context_element. " getting the clicked line
data lv_index type i.
CALL METHOD lo_nd_n1->GET_LEAD_SELECTION_INDEX
RECEIVING
INDEX = lv_index.
Edited by: Tarang Shah on May 26, 2011 5:47 PM
Hi Bhaskaran,
>
> I checked the value of context_element in debug...
>
> it is
>
> i think it is 0..
No, it is not zero. It is bounded,it is object. You need not have to get the lead selection etc.
Just insert context_element of the type ref to if_wd_context_element as importing parameter.
use
context_element->get_static_attributes( ) method.
hi bhaskar,
many thanks for your help....it is working now....one final question and then you would have solved my problem fully..
why do i do not need to get the lead selection etc....why did just specifying the paramter context_element in importing worked??
i had already declared it within the code then why did not it work
> 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
EXPORTING
name = 'CONTEXT_ELEMENT'
RECEIVING
value = context_element.
Hi Tarang,
Code is correct.
What is your problem, what you want to do exaclty. Why you used recursion node?? here
by using this..
context_element->get_static_attributes(
IMPORTING
static_attributes = ls_navi_list ).
Now in ls_navi_list you will get selected record.
cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I am having a navigation list on selection of a particular item in the list the corresponding details should be displayed in a table..
i am using recursion node because in the SAP PDF following is mentioned
"Create a recursion node (name: NAVI_REC_NODE) as a sub node
of NAVI_LIST. The recursion node has to repeat the structure of node
NAVI_LIST".
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.