Structure TREEMLNODT

Definition

TREEMLNODT is a data structure that describes the attributes of a single node in a List Tree Model. Its definition is stored centrally in the ABAP Dictionary, and you can use it to define the data types of your own parameters.

TREEMLNODT is also the line type of the internal table type TREEMLNOTA.

Use

You can use TREEMLNODT to specify the type of a work area for the actual parameter node_table in method add_nodes of class cl_list_tree_model.

Structure

Component

Type

Description

node_key

STRING

The key by which the node is identified in the tree. This must be unique thorughout the tree. You should only use letters, digits, and the underscore character in node keys.

relatkey

STRING

The key of a node to which the new node is related in position. If the new node is the first or last root node, this parameter must have the value ' '.

relatship

I

The relationship between the new node and the node specified in relatkey. Possible values are:

  • CL_TREE_MODEL=>RELAT_FIRST_CHILD Inserts the new node as the first child node of the node specified in relative_node_key. This must be a folder.

  • CL_TREE_MODEL=>RELAT_LAST_CHILD Inserts the new node as the last child node of the node specified in relative_node_key. This must be a folder.

  • CL_TREE_MODEL=>RELAT_PREV_SIBLING Inserts the new node directly before the related node at the same level.

  • CL_TREE_MODEL=>RELAT_NEXT_SIBLING Inserts the new node directly after the related node at the same level.

  • CL_TREE_MODEL=>RELAT_FIRST_SIBLING Inserts the new node as the first node at the same level as the related node.

  • CL_TREE_MODEL=>RELAT_LAST_SIBLING Inserts the new node as the last node at the same level as the related node.

    Note: If relatkey is empty, the new node is inserted as a root node. Where the above values contain the word FIRST or PREV, it is inserted as the first root node. Where they contain LAST or NEXT, it is inserted as the last.

hidden

AS4FLAG

Specifies whether the node should be hidden ( 'X') or visible ( ' '). Default is visible.

disabled

AS4FLAG

Specifies whether the node can be selected ( ' ') or not ( 'X'). The default is not disabled.

isfolder

AS4FLAG

Specifies whether the new node should be a folder or a leaf. Possible values:

  • 'X': Node is a folder

  • ' ': Node is a leaf

n_image

C(6)

Specifies the image used for the node. Possible values:

  • initial: The system uses the default values (leaf symbol for a leaf, closed folder symbol for a folder)

  • '@XY@': An SAP icon with the code XY.

  • 'BNONE': No image is displayed. The node text begins at the position in which the image would normally be displayed. If you use this value for a node, you should also use it for all of its other same-level nodes.

exp_image

C(6)

Specifies the image used for an open folder. The possible values are the same as those listed above for the image parameter.

style

I

Sets the colors of the text and the background for the node. The possible values for this field are any static constant CL_TREE_MODEL=>STYLE_*. For further details, refer to the definition of CL_TREE_MODEL in the Class Builder.

no_branch

AS4FLAG

Specifies whether connecting lines should be drawn between the nodes ( ' ') or not ( 'X'). The default is for the lines to be drawn.

expander

AS4FLAG

May only be set for a folder. If you set this attribute, the closed folder always displays a '+' symbol, even if it is empty. When the user clicks on the folder, the event EXPAND_NO_CHILDREN is triggered.

dragdropid

I

Only relevant if you want the node to be drag and drop-enabled. It contains the handle for a drag and drop object.

userobject

REF TO OBJECT

Can be assigned any reference to an application object

itemsincom

AS4FLAG

Indicates that the item specification is incomplete. For further information, refer to Loading Items on Demand.

last_hitem

C(12)

The last item to appear under the hierarchy heading in the tree display