cancel
Showing results for 
Search instead for 
Did you mean: 

creating tree

Former Member
0 Kudos

Hello Experts,

How can i create a tree like

parant node as project

child node as the subproject

Thanks,

Shaik Shadulla

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

closed

Former Member
0 Kudos

Hi Shaik,

1. you need to create a node as a root node

2. create a node as a parent node again into root node,

3. create two attribute into parent node name and value for your tree,

4. create an item node into parent node.

5. and create again two attribute name and value into item node for your tree items.

root

->parent

-name

-value

->item

-name

-value

6. now create a tree element into your layout levela and assign root node to datasource of tree element.

7. create an element type of 'TreeNodeType' under tree and assign parent node to datasource of this element.

8. create an element type of 'TreeItemType' under tree and assign item node to datasource of this element.

9. now fill tree with suply functions of nodes.

codes of suply function of parent node as below,

data: kinds type wdr_name_value_list.
data: kind type wdr_name_value.

kind-name = 'K01'.
kind-value = 'motor türü 1'.
append kind to kinds.

kind-name = 'K02'.
kind-value = 'motor türü 2'.
append kind to kinds.

node->bind_table( kinds ).

codes of suply function of item node as below,

data: motor_types type wdr_name_value_list,
      kind type string.

parent_element->get_attribute( exporting name = 'NAME' importing value
= kind ).

data: motor_type type wdr_name_value.

case KIND.

when 'K01'.
  motor_type-name = 'T11'.
  motor_type-value = 'tür 1 tip 1'.
  append motor_type to motor_types.

  motor_type-name = 'T12'.
  motor_type-value = 'tür 1 tip 2'.
  append motor_type to motor_types.

when 'K02'.
  motor_type-name = 'T21'.
  motor_type-value = 'tür 2 tip 1'.
  append motor_type to motor_types.

  motor_type-name = 'T22'.
  motor_type-value = 'tür 2 tip 2'.
  append motor_type to motor_types.

  motor_type-name = 'T23'.
  motor_type-value = 'tür 2 tip 3'.
  append motor_type to motor_types.

endcase.

node->bind_table( motor_types ).

i wish i helped you.

Regards.