Upload 6
Upload 6
Like in the tree profile definition, multiple columns (up to 20) can be defined, too.
One entry in this table defines the content of one tree cell:
Page 7
BOL Tree (Generic Tree)
o It is also possible to define translatable OTR texts as the content of the cell. The syntax for
the OTR path is: “OTR/<otr_alias_name>”. E.g. “OTR/CRM_IC_APPL/PARTNER”. The
OTR texts can be found or created in the transaction SOTR_EDIT
Value path B, C: You can define up to 3 values in the paths A, B and C which will be concatenated
and separated by a blank and diplayed in the cell
Editable: Defines whether this cell can be edited. If the Edit Mode (see Implementation Tasks) is
active and the flag is marked the value defined in Edit Value Path is rendered as an input field. The
value paths A, B and C are not used in edit mode.
Edit Value Path: The value path for the edit mode. (see Value Path A for syntax, don’t use OTR
texts here)
Is Link: Defines whether the value should be rendered as a link within this cell.
Link Event ID: An event handler method of the parent UI Component is called when this link is
clicked, this ID is passed to differentiate between the links. (see Implementation Tasks)
3 Implementation Tasks
This chapter describes the needed implementation tasks to use the generic tree component IUBOTREE.
The next step is to set the tree profile which should be used in the tree component. This can be done
e.g in the method WD_USAGE_INITIALIZE of the parent component controller class:
Page 8
BOL Tree (Generic Tree)
Page 9
BOL Tree (Generic Tree)
ls_tree_props-toolbar_foreign_use = ‘TRUE’.
ls_tree_props-maxbuttonnumber = ‘8’.
ls_tree_props-fill_up_empty_rows = ‘FALSE’.
ls_tree_props-personalizable = ‘FALSE’.
ls_tree_props-display_mode = ‘X’.
ls_tree_props-initial_select
= if_crm_iu_bol_tree_evt_service=>co_mode_select_first.
ls_tree_props-expand_collapse_all = abap_true.
ls_tree_props-find = abap_true.
ls_tree_props-allow_unselect = abap_true.
ls_tree_props-multiselect = abap_true.
TRUE:
tree property MAXBUTTONNUMBER
o possible values: integer numbers
o default value: 8
o A “more” button appears if there are more buttons available the defined in this property.
Page 10
BOL Tree (Generic Tree)
o if TRUE: Expand All and Colapse All buttons appears in the toolbar:
o if no line is selected, everything is expanded/collapsed, if lines is are selected, only the are
expanded/collapsed
tree property FIND
o possible values: '' = no buttons visible; X = Position/Next Hit butt. visible
o default value: ‘’
Page 11
BOL Tree (Generic Tree)
o the maximal visible rows are defined here, if more rows are there a vertical scroll bar
appears:
To define a link event see 2.2.1 (cell attribute “Is Link” is marked and Link ID is defined)
To define a OCA event see 2.1.4 (OCA with OCA-ID is defined)
Toolbar buttons can not be defined via customizing, but via implementation (see below in this chapter)
To handle the events in the parent component the tree provides an event service. This event_service is a
public component node of the tree component. The event_service node implements the interface
if_crm_iu_bol_tree_evt_service. To get an instance of the service the public static method
cl_iubotree_bspwdcomponen_cn08=>get_event_service( ir_parent_component = <parent
component instance> iv_tree_usage_name = <tree usage name> )should be used. This can
be done e.g. in the WD_USAGE_INITIALIZE of the parent component. Additionaly, to the event service you
need to implement one or more event handler. An event handler has to implement the interface
IF_CRM_IU_BOL_TREE_EVT_HANDLER. E.g. the parent component itself could be the event handler.
So, if you have the service and an event handler you can register(subscribe) the handler to all events or only
to an event type or even only to a specific event:
data tree_event_service type ref to if_crm_iu_bol_tree_evt_service.
if tree_event_service is bound.
* subcsibe to all events:
tree_event_service-
>subscribe( event_handler = me event_type = space event_id = space ).
Page 12