Tip

SAP Tree Control vs. SAP Tree Model

If you have done any programming with SAP Tree controls, you know that there is some rather complex code that goes into using them. However if you are on a 4.6C platform, there is a simpler solution: SAP Tree Model. Tree Model is a class that sits on top of the Enjoy Tree Controls and provides additional functionality that you would otherwise have to program yourself.


The Tree Model controls, like the Tree controls, are broken into
three main classes for the three different types:

CL_SIMPLE_TREE_MODEL
CL_LIST_TREE_MODEL
CL_COLUMN_TREE_MODEL.

The advantage to using the tree model is that SAP has programmed
much of the application layer of working with Trees for you.  

First the Tree model maintains a copy of all the node and item data
for you at the application level.  There are methods that you can call
to read this data later and to check for duplicate node keys before
inserting them into your tree.  This eliminates the need for you to
maintain this information in your own program.  

The Tree model also checks all the node keys before they are passed
to the frontend contols.  This eliminates the Automation errors and
short dumps that are caused by duplicate keys in the tree control.  

The Tree model controls all the interaction with the frontend control.
It buffers the data and allows you to easily control when data is
sent to the frontend.  It also has highly optimized flush synchronization.  

Finally it adds much needed methods such as Search and Print
to

    Requires Free Membership to View

the Tree Control. Although greatly simplified over the tree control, Tree model still takes some practice to learn. SAP has some example programs that should help you. SAPSIMPLE_TREE_MODEL_DEMO SAPTLIST_TREE_MODEL_DEMO SAPCOLUMN_TREE_MODEL_DEMO SAPSIMPLE_TREEM_DRAG_DROP_DEMO SAPSIMPLE_TREEM_DRAGDROP_DEMO2

This was first published in May 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.