SAP Function TREE_ICON_VIEW - Display icons in tree structure

Parameter Reference Type Length Default Optional Text
BUTTON ICON-BUTTON C 1 'X' X Icons for pushbuttons
FUNCTION ICON-FUNCTION C 1 'X' X Icons for function keys
ICON_CLASS ICON-I_CLASS N 1 0 X Icon class (Expanded tree)
ICON_GROUP ICON-I_GROUP N 1 0 X Icon group (Expanded tree; with class only)
ICON_NAME ICON-NAME C 30 'ICON_*' X Long text for icon selected
LANGUAGE SYST-LANGU C 1 SPACE X QuickInfo language
LOCKED ICON-LOCKED C 1 'X' X Locked icons
MESSAGE ICON-MESSAGE C 1 'X' X Icons for message display
ONLYDISPLAY 0 SPACE X Space if Choose not required
SCREEN_END_COLUMN SYST-CUCOL I 4 0 X Column where the list dialog box appears
SCREEN_END_LINE SYST-CUROW I 4 0 X Line where the list dialog box appears
SCREEN_START_COLUMN SYST-CUCOL I 4 0 X Column where the list dialog box begins
SCREEN_START_LINE SYST-CUROW I 4 0 X Line where the list dialog box begins
STATUS ICON-STATUS C 1 'X' X Icons for status display
TEXTFIELD ICON-TEXTFIELD C 1 'X' X Icons in text

Parameter Reference Type Length Text
ICON_ID ICON-ID C 4 Internal representation of icon selected
ICON_NAME ICON-NAME C 30 Long text for icon selected
ICON_SIZE ICON-OLENG b 1 Width of selected icon
ICON_TEXT ICONT-QUICKINFO C 30 QuickInfo for icon selected

Exception Text
NO_ICON_SELECTED No icon matches selection criteria
NO_OBJECT_FOUND Table ICON empty

Functionality
This function module displays the icons available in a tree structureorganized according to class and group assignments. You can enter ageneric icon name if you wish ('*' for as many characters as possible,'+' fo exactly one character). You may also define an attribute filter.For example, you can display all icons that may be used withpushbuttons. If you enter a class or a class and a group, the icon treeis displayed and expanded at the point you have chosen.
Double-clicking on an icon (or selecting it and choosing the 'Choose'pushbutton) returns the ID, short text, display length, and name of theicon. You can switch this functionality by selecting the 'Display only'checkbox (= 'X').
You can set a default language (for the short text and class names andgroup names) in the field 'Language'. If the texts are not available inthe language selected, exception NO_ICON_SELECTED is raised. If you donot explicitly determine a language, the logon language is used as theselection criterion. If no appropriate entry is found in the databasetable ICON, the function module returns NO_OBJECT_FOUND exception.

Example
CALL FUNCTION 'TREE_ICON_VIEW'
EXPORTING
ONLYDISPLAY = ' '
LANGUAGE = 'DE'
BUTTON = 'X'
STATUS = ' '
MESSAGE = ' '
FUNCTION = ' '
TEXTFIELD = ' '
LOCKED = ' '
ICON_NAME = 'ICON_+++_*'
ICON_CLASS = 2
ICON_GROUP = 3
IMPORTING
ICON_ID = p_iconid
ICON_TEXT = p_icon_text
ICON_SIZE = p_icon_size
ICON_NAME = p_icon_name
EXCEPTIONS
NO_ICON_SELECTED = 1
NO_OBJECT_FOUND = 2
OTHERS = 3
.
returns all icons that correspond to search string ICON_+++_* and thatare for use with pushbuttons and are available in German. The listhierarchy is expanded at group 3 (functions) of class 2 (spezial).Double-clicking on the icon places its corresponding data in the outputparameter.


Notes