SAP Tree and Tree Model (BC-CI)


SAP Tree and SAP Tree Model are techniques based on SAP's Control Framework that you can use to display hierarchically-arranged data in tree format. SAP Tree, introduced in Release 4.6A, can be used to display data at the frontend. The SAP Tree Model, new in Release 4.6C, also allows you to administer the data within the control instance.

The graphic illustrates the difference: The SAP Tree receives application data from the program and passes it to its corresponding frontend component, either directly, or at the next synchronization. However, it cannot hold any data itself, which means that to find out attributes of a node or item other than its key or name, you must program the request yourself on the basis of the node key. The SAP Tree Model, on the other hand, incorporates a data management part and also encapsulates a normal tree control instance. All of the data that is passed to the tree is held within the Tree Model instance as well as being sent to the frontend. Consequently, actions like searching within the tree take place within the ABAP program, and do not require time-consuming network communication.

Implementation Considerations

When deciding whether to use the SAP Tree or the SAP Tree Model, you should remember that the SAP Tree Model provides some useful functions that are not available in the SAP Tree. For example, the SAP Tree Model allows you to:

  • Check node keys before you send them to the frontend (to ensure that there are no duplicates)
  • Search within the tree
  • Print the tree

The SAP Tree Model also provides

  • Automatic flush handling
  • Automatic handling of node transfer to the frontend

To use the SAP Tree you must have a SAPgui with Release 4.6A or higher. To use the SAP Tree Model, you must have a SAPgui with Release 4.6C or higher.


Certain features of the SAP Tree and SAP Tree Model are not available under SAPGUI for HTML. For further information, refer to The Tree Controls in SAPGUI for HTML.