cancel
Showing results for 
Search instead for 
Did you mean: 

navigation list

former_member206760
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi,

in OnSelect event handler , wdevent object has a parameter context_element.

Please check that in debug if that is filled.

former_member206760
Active Contributor
0 Kudos

Hi Bhaskaran,

I checked the value of context_element in debug...

it is

i think it is 0..

former_member206760
Active Contributor
0 Kudos

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

former_member206760
Active Contributor
0 Kudos

hi guys,

how do i enable the lead selection for my navigation list ui element any idea??

Edited by: Tarang Shah on May 26, 2011 6:18 PM

Former Member
0 Kudos

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.

former_member206760
Active Contributor
0 Kudos

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

Former Member
0 Kudos

> 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.

former_member206760
Active Contributor
0 Kudos

many thanks bhaskar...

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

former_member206760
Active Contributor
0 Kudos

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".

Former Member
0 Kudos

Hi Tara,

For your requirement no need to create recursion node. just create node with attributes you will reach your

requirement.

Cheers,

Kris.

former_member206760
Active Contributor
0 Kudos

recursion node is needed for navigation list UI element

if i do not use it i get a dump saying recursion node is needed