on 05-26-2014 7:38 AM
Hi,
I've done one hierarchy table. i'll expand the data and will check values under hierarchy. i've used for this hierarchy Recursion node.
Now i want to download this data into excel. Expanded data is not coming only main node data coming. At time of expanding im binding data to recursion node. Now how to get data from recursion node.
Hi ,
Please see this example DEMO_TABLE_WITH_TREE .On the click of parent node,you will get all the child node(where based on condition, you will bind the child nodes). Move that child nodes data into global internal table and use that itab for your data manipulation.
Hope this helps you.
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
You can achieve your requirement as below
Example:
I have the context node as below
To read the data of recursive node REC_ORG_UNIT, check the below code
method ONACTIONGET_DATA .
DATA lo_nd_org_unit TYPE REF TO if_wd_context_node.
DATA lt_org_unit TYPE wd_this->Elements_org_unit.
data ls_org_unit LIKE LINE OF lt_org_unit.
data lo_element TYPE REF TO if_wd_context_element.
data lo_nd_rec type REF TO if_wd_context_node.
data lt_recursive_data like lt_org_unit.
DATA LT_TEMP LIKE lt_recursive_data.
* navigate from <CONTEXT> to <ORG_UNIT> via lead selection
lo_nd_org_unit = wd_context->get_child_node( name = wd_this->wdctx_org_unit ).
lo_nd_org_unit->get_static_attributes_table( importing table = lt_org_unit ).
refresh lt_recursive_data.
LOOP AT lt_org_unit INTO ls_org_unit.
lo_element = lo_nd_org_unit->get_element( index = sy-tabix ).
IF lo_element is BOUND.
lo_nd_rec = lo_element->GET_CHILD_NODE( name = 'REC_ORG_UNIT' ).
ENDIF.
IF lo_nd_rec IS BOUND.
lo_nd_rec->get_static_attributes_table( importing table = lt_TEMP ).
free lo_nd_rec.
ENDIF.
APPEND LINES OF LT_TEMP TO lt_recursive_data.
ENDLOOP.
endmethod.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.