Programme SAP SAPCOLUMN_TREE_MODEL_DEMO - Example: Column Tree Model (with Documentation)

Description
This program demonstrates the use of the Column Tree Model (classCL_COLUMN_TREE_MODEL).
The contents of a Column Tree Model are displayed at the frontend usinga Column Tree Control.
In a Column Tree, the items belonging to each node are arranged incolumns. In the example, the tree has three columns with the logicalnames 'Column1', 'Column2', and 'Column3'. The topmost node has an itemin each of these three columns:

  • 'Root Col. 1' in column 'Column1'

  • 'Root Col. 2' in column 'Column2'

  • 'Root Col. 3' in column 'Column3'

  • There are two kinds of columns in a column tree:
    • Columns in the hierarchy area: These columns are arranged beneath the
    • hierarchy heading. The hierarchy heading is the leftmost heading in thecontrol (in the example: 'Hierarchy Header'). There is normally onlyone column in the hierarchy area. In the example, this is the columnwith the name 'Column1', which contains the entries 'Root Col.1','Child1 Col. 1' and so on.
      • Columns outside the hierarchy area: These columns have their own
      • heading. In the example, there are two columns outside the hierarchyarea. They have the headings 'Column2' and 'Column3'.

        Selection
        The items of each node can be selected individually. Clicking on thefolder or leaf symbol of a node selects the whole node.
        It is also possible to set up the selection mode so that clickinganywhere within a node always selects the whole node (by setting theITEM_SELECTION parameter of the constructor method to ' '). If you dothis, you cannot use pushbuttons, links, or changeable checkboxes asitems.

        Events
        Events are displayed as they occur in the group box on the right-handside of the screen. The following events can be triggered in theexample program:

        NODE_DOUBLE_CLICK
        Double-click on a node. In the example, you must click on the folderor leaf symbol to do this. However, if ITEM_SELECTION = ' ', the eventis triggered whenever you double-click any part of the node.

        ITEM_DOUBLE_CLICK
        Double-click on an item in the tree. This event can only occur ifITEM_SELECTOIN = 'X'.

        HEADER_CLICK
        The user clicked a heading in the control. The node_key output fieldcontains the name of the heading in question.

        BUTTON_CLICK
        The user clicked a pushbutton item.

        LINK_CLICK
        The user clicked a link item.