cancel
Showing results for 
Search instead for 
Did you mean: 

Load Recursion Node ( Navigation List )

rub_alfonso
Explorer
0 Kudos

Hi Gurus,

I´m trying to load recursion node (on Supply Function) just to show the result on a Navigation List element ... but I´m having some problems ...

Please, anyone have an example code ? I would be depply grateful

Thanks in advance !!

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi Rub, you can put spanish tutorial for Navigation Listo into

http://scn.sap.com/community/spanish

Forum WD ABAP rules don't allow it.

Thanks in advance.              

rub_alfonso
Explorer
0 Kudos

Hi Jose Luis,

I´m trying.

Regards.

rub_alfonso
Explorer
0 Kudos

Hi Jose Luis,

Here you have.

Regards !!

0 Kudos

Excellent job Rub.

Your document describe in a nice form how a Navigation List Works with recursión nodes, is a great job.

Thanks a lot for that.

José Luis

0 Kudos

Hi Alfonso:

Can you solve Navigation List with n-level?

Actualy I have the same requiriment, and only can have n-levels with Table   like  DEMO_TABLE_WITH_TREE,  thanks in advance.

Former Member
0 Kudos
rub_alfonso
Explorer
0 Kudos

Hi Krishna,

I´m looking for an example like the one in the first link you sent, but a bit more complex. I would like to have more than 1 level on the navigation list, in that example just 1 level is being used.

Thank you !!

Former Member
0 Kudos

In this Example:

Context Node    :DATASOURCE

Recursion Node :DATASOURCE_RECURSION

Attributes          :TEXT

                         ENABLED

Bind TEXT to itemText property of Navigation List UI Element.

Bind ENABLED to enabled Property.

Bind the DATASOURCE node to itemSource property

  

Write this code in Supply Funtion of the context node DATASOURCE and debug, so that u can understand and apply for your requirement.

   DATA lo_el_datasource TYPE REF TO if_wd_context_element.

   DATA ls_datasource    TYPE wd_this->element_datasource.

   DATA lt_datasource    TYPE wd_this->elements_datasource.

   DATA parent_node      TYPE REF TO if_wd_context_node.

   DATA name TYPE string.

   parent_node = parent_element->get_node( ).

   IF parent_node->get_node_info( ) = node->get_node_info( ).

     parent_element->get_attribute( EXPORTING name = 'TEXT'

                                    IMPORTING value = name ).

   ELSE.

* Adding main elements to the navigation list

     ls_datasource-text = 'Nav List 1'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

     ls_datasource-text = 'Nav List 2'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

     ls_datasource-text = 'Nav List 3'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

     ls_datasource-text = 'Nav List 4'.

     ls_datasource-enabled = abap_true.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

   ENDIF.

* Adding sub elements to the navigation list

   IF name = 'Nav List 1'.

     ls_datasource-text = 'Hi'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

     ls_datasource-text = 'Bye'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

   ENDIF.

   IF name = 'Hi'.

     ls_datasource-text = 'Hello'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

     ls_datasource-text = 'Bolo'.

     APPEND ls_datasource TO lt_datasource.

     CLEAR ls_datasource.

   ENDIF.

* Bind the data to the node

   node->bind_table( lt_datasource ).

   REFRESH lt_datasource.

Thanks,

Mahendra K.

rub_alfonso
Explorer
0 Kudos

Hi Mahendra,

Useful information.

Thank you !!