Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a third level node in tree view SAP CRM

0 Kudos

Hi,

     I need to create a third level in a treeview. I created the application according to the tutorial , but can only create two levels. I checked in post found here in the SCN: , but could not understand what brings up the third level in the hierarchy. Can you help me?

Thankyou!

1 ACCEPTED SOLUTION

0 Kudos

Hi,

     I solved the problem using the code below:

lv_entity ?= lr_col->get_first( ).

  WHILE lv_entity IS BOUND.

    lr_child = me->node_factory->get_proxy(

           iv_bo = lv_entity

           iv_parent_proxy = me

           iv_proxy_type = 'ZCL_PRODUCT_TREE' ).

    lr_child->is_leaf = abap_false.

    lr_child->expand_node( ).

    APPEND lr_child TO rt_children.

    lv_entity ?= lr_col->get_next( ).

  ENDWHILE.

1 REPLY 1

0 Kudos

Hi,

     I solved the problem using the code below:

lv_entity ?= lr_col->get_first( ).

  WHILE lv_entity IS BOUND.

    lr_child = me->node_factory->get_proxy(

           iv_bo = lv_entity

           iv_parent_proxy = me

           iv_proxy_type = 'ZCL_PRODUCT_TREE' ).

    lr_child->is_leaf = abap_false.

    lr_child->expand_node( ).

    APPEND lr_child TO rt_children.

    lv_entity ?= lr_col->get_next( ).

  ENDWHILE.