on 04-08-2008 5:10 AM
hi,
i have a tree ui element in my view.
i have to populate the tree from database.
i have populated the node, but i cannot populate the child elements.
how do i do it. plz tell me fast
thanks & regards,
ritwik.
Hi,
Pls refer the Demo Program WDT_TREE.
Regards,
Padmam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Define the action "onLoadChildren" of the tree node. In the event handler for this action, write your code to fetch children.
Regards,
Reema.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi reema,
this is the code for populating the node:
DATA lo_nd_appr_tree_temp TYPE REF TO if_wd_context_node.
DATA lo_el_appr_tree_temp TYPE REF TO if_wd_context_element.
DATA ls_appr_tree_temp TYPE wd_this->Element_appr_tree_temp.
navigate from <CONTEXT> to <APPR_TREE_TEMP> via lead selection
lo_nd_appr_tree_temp = wd_context->get_child_node( name = wd_this->wdctx_appr_tree_temp ).
get element via lead selection
lo_el_appr_tree_temp = lo_nd_appr_tree_temp->get_element( ).
CALL METHOD lo_nd_appr_tree_temp->CREATE_ELEMENT
EXPORTING
STATIC_ATTRIBUTE_VALUES =
RECEIVING
ELEMENT = lo_el_appr_tree_temp.
CALL METHOD lo_nd_appr_tree_temp->BIND_ELEMENT
EXPORTING
NEW_ITEM = lo_el_appr_tree_temp
SET_INITIAL_ELEMENTS = ABAP_TRUE
INDEX =
RECEIVING
ELEMENT = lo_el_appr_tree_temp.
ls_appr_tree_temp-TEMP_TYPE = 'NODE'.
ls_appr_tree_temp-HAS_CHILD = 'X'.
CALL METHOD lo_el_appr_tree_temp->SET_STATIC_ATTRIBUTES
EXPORTING
INDEX = USE_LEAD_SELECTION
STATIC_ATTRIBUTES = ls_appr_tree_temp.
can you please tell me how to populate the children.
please reply soon.
Thanks,
Ritwik.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.