Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Class CL_TREE_MODEL

Former Member
0 Kudos

Dear Colleagues !

I'd like to develop a tree in the class CL_TREE_MODEL because it has an own method PRINT_TREE to print the content in a tree form. But how can I fill the tree with nodes and items, which method is responsible for it ?

Thank You for Your helps !

Regards Peter

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Peter

You cannot use class CL_TREE_MODEL for building your tree control because this is just the basic class for a class hierarchy (e.g. it does not have a method ADD_NODE).

Instead, you need to use one of its subclasses, e.g. CL_ITEM_TREE_MODEL -> CL_COLUMN_TREE_MODEL or CL_SIMPLE_TREE_MODEL.

All these subclasses inherit the PRINT_TREE method of CL_TREE_MODEL.

For sample reports of these classes have a look through the programs in package SEU_TREE_MODEL.

Regards

Uwe

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

Hello Peter

You cannot use class CL_TREE_MODEL for building your tree control because this is just the basic class for a class hierarchy (e.g. it does not have a method ADD_NODE).

Instead, you need to use one of its subclasses, e.g. CL_ITEM_TREE_MODEL -> CL_COLUMN_TREE_MODEL or CL_SIMPLE_TREE_MODEL.

All these subclasses inherit the PRINT_TREE method of CL_TREE_MODEL.

For sample reports of these classes have a look through the programs in package SEU_TREE_MODEL.

Regards

Uwe

Former Member
0 Kudos

Hi Uwe,

thank You for Your help, I changed the program - and it functions fine !

Kind regards

Peter