Show TOC

constructorLocate this document in the navigation structure

You use this method to instantiate the list tree.

CREATE OBJECT list_tree
        EXPORTING lifetime              = lifetime 
                parent                  = parent
                shellstyle              = shellstyle
                node_selection_mode     = node_selection_mode
                hide_selection          = hide_selection
                item_selection          = item_selection 
                with_headers            = with_headers
                hierarchy_header        = hierarchy_header
                list_header             = list_header
        EXCEPTIONS lifetime_error       = 1
                cntl_system_error       = 2
                create_error            = 3
                illegal_node_selection_mode = 4
                failed                  = 5.
         

Parameters

Description

lifetime

Lifetime Management parameter. The following values are permitted:

  • list_tree->lifetime_imode : The control remains alive for the duration of the internal session (that is, until the session is ended by one of the following statements: leave program. leave to transaction. set screen 0, leave screen. ). After this, the finalize method is called.

  • list_tree->lifetime_dynpro : The control remains alive for the lifetime of the screen instance, that is, for as long as the screen remains in the stack. After this, the free method is called. Using this mode automatically regulates the visibility of the control. Controls are only displayed when the screen on which they were created is active. When other screens are active, the controls are hidden.

  • l ist_tree->lifetime_default : If you create the control in a container, it inherits the lifetime of the container. If you do not create the control in a container (for example, because it is a container itself), the lifetime is set to simple_tree->lifetime_imode .

parent

Container in which the SAP Tree can be displayed ( see also SAP Container ).

node_selection_mode

list_tree->node_sel_mode_single : Only single selection allowed.

list_tree->node_sel_mode_multiple : Multiple selection allowed.

hide_selection

Hides a selection

item_selection

Flags whether individual entries should be selectable. If you set this attribute, the node can only be selected using its icon.

If the attribute is not set, the entire node can be selected as a single unit.

with_headers

Flags whether headers are used.

hierarchy_header

Structure with the definition of the first header.

list_header

Structure with the definition of the following header.