Structure TREEMSUNO

TREEMSUNO is a data structure that you use to pass changes in node attributes to the simple tree model. Your definition is stored centrally in the ABAP Dictionary. You can use it to define the data types of your parameters.

TREEMSUNO is also the line type of the internal table type TREEMSUNOT.

Use

You use this structure to specify the line type of the actual parameter NODE_TABLE in the method UPDATE_NODES of CL_SIMPLE_TREE_MODEL. You can also use it to create a work area for the internal table.

In the structure, you specify the key of the node you want to change, and the new values of each of the relevant changeable attributes. Each attribute also has a corresponding flag field in the structure with the name U_<attribute>. You must check this corresponding flag for each attribute that you want to change.

Structure

Component

Type

Description

node_key:

STRING

Key to identify the node in the tree. This must be unique throughout the tree. You should only use letters, digits, and the underscore character in node keys.

relatkey

STRING

Key of the node which affects the position of the new node. 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. The following values are possible:

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

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

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

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

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

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

hidden

AS4FLAG

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

disabled

AS4FLAG

Specifies whether the node can be selected (' ') or not ('X').

isfolder

AS4FLAG

Specifies whether the new node is a folder or a leaf Possible values:

  • 'X': Node is a folder

  • ' ': ' ': Node is a leaf

n_image

C(6)

Specifies the icon for the node Possible values:

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

  • '@XY@': XY: SAP icon with code XY

  • 'BNONE': No image is displayed. The node text starts at the position where the icon would normally appear. If a node does not have a folder or leaf symbol this should also apply to all nodes at the same level.

exp_image

C(6)

Specifies the icon for the node The possible values are the same as those listed above for the image parameter.

style

I

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

no_branch

AS4FLAG

Specifies whether connecting lines should be displayed between the nodes (' ') or not ('X'). By default, the lines are displayed.

Expander

AS4FLAG

This property can only be set for folders. If you set it, the symbol '+’ is always displayed for the closed folder, even if it empty.

dragdropid

I

Only relevant if the node is to be drag&drop-enabled. It receives the handle for the drag&drop object.

userobject

REF TO OBJECT

Any reference can be assigned to an application object.

Text

STRING

Node text

u_all

AS4FLAG

Indicates that all changeable attributes have been modified

u_hidden

AS4FLAG

Indicates that the corresponding attribute has been modified

u_disabled

AS4FLAG

u_isfolder

AS4FLAG

u_n_image

AS4FLAG

u_exp_image

AS4FLAG

u_style

AS4FLAG

u_no_branch

AS4FLAG

u_expander

AS4FLAG

u_dragdropid

AS4FLAG

u_userobject

AS4FLAG

u_text

AS4FLAG