cancel
Showing results for 
Search instead for 
Did you mean: 

Tree in WD ABAP - urgent

Former Member
0 Kudos

HI Experts,

I am working on WD for ABAP.

I am using a tree to display some data. Node1 points to Root and subnode1 point to node1.

node1-->root

subnode1--> node1

When we expand node1, it shows ">" (arrow) for child nodes.

and if we further expand chld node(sunbnode1) we can see "." (Dot)

As per my requirement IF the node1 does not have any value for subnode1 than node1 should not show ">" , istead of that it should how "." for that child node.

could anyone plz tell me ....

1)how can I solve this.

2)How to use recursive node. I have never used recursive nodes.

PLease reply ASAP. Its very urgent.

for helpfull answers full points would be rewarded.

Regards,

Vishal.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

see my comments

Former Member
0 Kudos

Hi,

When you work on Tree, you should remember 4 important attributes.

expanded, parent row key, row_key and is_leaf.

To add children to parent we will have to maintain the relationship between row_key of PARENT and parent_row_key of CHILD.

if row_key = 1, then parent_row_key shoud be eqaul to row_key of parent, so that the corresponding childs will get added to parent.

if u put is_leaf = 'X'., then it means that they bcome childs(no longer exapndable ".")

and when u expand a parent, then expand = 'X'.

Provide Reward points.

Rewards,

Former Member
0 Kudos

Thanks Bharat.

but in my case I am using tree control. In which I dont have IS_leaf property.

How can I bind this.

Do you have any sample code for parent and child relationships.

Regards,

Vishal.

Former Member
0 Kudos

We can solve this problem by binding the HASCHILDREN propert of the tree node with context. and pass 'X' to context value at runtime. It would disable the arrows '>'.

Vishal Gupta

Former Member
0 Kudos

Hi,

refer to the examples wdr_test_tree,wdt_tree,wdt_tree_table_by_key,wdt_tree_table_by_nst

Former Member
0 Kudos

Hi Sridevi,

I have seen these examples. But these does not solve my purpose.

Regards,

Vishal

Former Member
0 Kudos

Hello,

I suggest you to read this [http://help.sap.com/saphelp_nw04s/helpdata/en/21/ad884118aa1709e10000000a155106/frameset.htm].

Regards,