Skip to Content
author's profile photo Former Member
Former Member

Tree node collapse is not working


I created tree node, i am able to display data in that node, But collapse is not working.

i kept this part of code in collapse event, event is triggering, but it is not collapsing.

DATA: lr_node TYPE REF TO if_bsp_wd_tree_node,

lv_size TYPE sytabix,

lv_index TYPE sytabix VALUE 1.

DATA: lv_event_thtmlb TYPE REF TO cl_thtmlb_tree.


lv_event_thtmlb ?= htmlb_event_ex.

typed_context->querynetrs->collapse_node( lv_event_thtmlb->row_key ).

CATCH cx_root.


( or below part)

DESCRIBE TABLE me->typed_context->querynetrs->node_tab LINES lv_size.

WHILE lv_index <= lv_size.

lr_node = me->typed_context->querynetrs->get_node_by_index( lv_index ).


lr_node->collaps_node( ).


lv_index = lv_index + 1.


please let me know why collapse is not working.




Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 05, 2011 at 07:13 AM

    HI Ram,

    did you try to do a reread afterwards?

    If you look at the component IBHIER view TreeEnhanced it uses a global variable node_modified that is set after the collapse.

    Then afterwards in the DO_PREPARE_OUTPUT this variable is checked and used to reread the entity.

    IF me->node_modified = abap_true AND me->entity IS BOUND.

    me->entity->reread( ).


    Maybe also add this part of coding in your method and in the DO_PREPARE_OUTPUT.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.