SAP Tree Model

Use

The SAP Tree Model has been introduced to complement the SAP Tree Control. Unlike the SAP Tree Control, which only displayed data without actually administering it, the SAP Tree Model holds all of the data that is to be displayed on the application server. Instead of communicating directly with the tree at the frontend, the application program has only to communicate with the tree model. The tree model also ensures optimal performance - an important aspect of tree control programming that was previously left to the programmer.

Implementation Considerations

Use the SAP Tree Model whenever you want to display data in a hierarchical tree format.

Features

Like the SAP Tree, the SAP Tree Model has three variants (see Overview of SAP Tree Model Classes):

  • Simple tree

  • List tree

  • Column tree

The SAP Tree Model also contains features that make it more comfortable to use than the normal SAP Tree:

  • Automatic synchronization between the tree model on the application server and the tree control at the frontend

  • Automatic flush handling

  • Search and print functions

  • Checks on the validity of node data before it is sent to the frontend (reduces the risk of runtime error CNTL_ERROR)

  • Automatic control of how much data is sent to the frontend and when

  • Option to display the tree in tabular form

  • A freely-usable object reference to which you can assign an application-related object.

Constraints

Certain features of the SAP Tree Model do not work in the SAPGUI for HTML environment. For further information, refer to The Tree Controls in SAPGUI for HTML.