Application Development and Automation 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: 
Read only

Create a third level node in tree view SAP CRM

0 Likes
639

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
Read only

0 Likes
564

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
Read only

0 Likes
565

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.