cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation of Tree Strucure in ABAP

ananthula_sumanth
Participant
0 Kudos

Hi,

I have to display a report in the tree structure.

--->Node....

Root Node------>Node....

--->Node.....

-


>Node....

The report goes like this...Is there any way to implement the same. I have to display the report in ALV.

and it is interactive.

Thanks in advance,

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_9643
Active Contributor
0 Kudos

hi sumanth,

you can use htmln:Tree tag for ur problem

u try this code,

<htmlb:tree id = "t1"

title = "t1"

tooltip = "Tooltip for t1"

toggle = "X" >

<htmlb:treeNode id = "n1"

text = "n1"

image = "@09@" />

</htmlb:treeNode>

<htmlb:treeNode id = "node3"

link = "http://www.xyz.com"

text = "Node3"

isOpen = "true"

image = "@A0@" />

</htmlb:treeNode>

</htmlb:tree>

u can similarly add any number of trees and their nodes.

and u can also define events in eventhandler corresponding to each child.

try this code in event handler

DATA: event TYPE REF TO CL_HTMLB_EVENT.

event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).

IF event IS NOT INITIAL AND event->name = 'tree'.

DATA: tree_event TYPE REF TO CL_HTMLB_EVENT_TREE.

tree_event ?= event.

ENDIF.

Regards,

kamaljeet

athavanraja
Active Contributor
0 Kudos

Are you talking about showing this on a BSP page or on SAP gui?

For SAP gui refer to

CL_GUI_COLUMN_TREE

CL_GUI_LIST_TREE

CL_GUI_SIMPLE_TREE

classes and the associate demo programs.

If its on a BSP page refer to Kamaljeet Singh's response. Additionaly check out this weblog.

/people/durairaj.athavanraja/blog/2004/11/21/bsphow-to-build-performance-efficient-dynamic-htmlbtree

Regards

Raja

Answers (0)