You are on page 1of 6

How do I enhance a tree context node manually?

Example: Component GS_CM, View GS_CM/DocTree Context Node DOCTREE.


Add an attribute in tree structure and display on UI.

Preparation: Component GS_CM and View GS_CM/DocTree have to be enhanced.

Enhance class of context code for tree and add an attribute

1. Derive implementation class of context node with transaction SE24: create a


new class e.g. with a Z-name and set original context node class as
supperclass.
2. Redefine method CREATE_DOCTREE in derived context class
ZL_GS_CM_DOCTREE_CTXT,

copy the code from super class and substitute the class name for context node.

3. Create private attribute ZDOCTREE in context class with reference of Z-class


of context node

4. Redefine method GET_TABLE_LINE_SAMPLE in the class


ZL_GS_CM_DOCTREE_CN01 and add additional attribute in the structure,
e.g customer_field.
Enhance class of tree proxy

1. Derive proxy classes with transaction SE24: create a new class e.g. with a Z-
name and set original proxy class as supperclass.
2. Implement GET_ and SET_ Methods for new additional attribute

3. Redefine method IF_BSP_WD_TREE_NODE~GET_CHILDREN and replace


the name of proxy type with Z-class

4. Redefine Method REFRESH in the class of context node


ZL_GS_CM_DOCTREE_CN01 and replace the proxy class name with new
created Z-proxy class. If call of super method exists then check the logic there
and change the code suitably.

Enhance View attribute for tree

1. In the .htm Page substitute the type for three attribute


Enhance UI Configuration

After enhancement of context node and proxy the additional attribute is available in
configuration.

Resulting UI after enhancement

You might also like