Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Tree Structure

Former Member
0 Kudos
140

Hi All,

Is there any Function module to display the output in a ALV tree structure( like parent node --> child nodes)

Thanx in advance,

Regards,

Ravi

1 ACCEPTED SOLUTION

Former Member
0 Kudos
94

Hi kranthi,

1. Its quite simple.

2. Basically there are TWO FMs,

which do the job.

3. just copy paste in new program

and u will know the whole logic.

4.

REPORT abc.

DATA : tr LIKE TABLE OF snodetext WITH HEADER LINE.

*----


data

tr-id = '1'.

tr-tlevel = 1.

tr-name = 'amit'.

APPEND tr.

tr-id = '2'.

tr-tlevel = 2.

tr-name = 'mittal'.

APPEND tr.

*----


display

CALL FUNCTION 'RS_TREE_CONSTRUCT'

TABLES

nodetab = tr

EXCEPTIONS

tree_failure = 1

OTHERS = 4.

CALL FUNCTION 'RS_TREE_LIST_DISPLAY'

.

regards,

amit m.

3 REPLIES 3

former_member188829
Active Contributor
0 Kudos
94

Hi,

Check this link..

http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_basic.htm

And also Check these Examples..

BCALV_TREE_01

BCALV_TREE_02

BCALV_TREE_03

BCALV_TREE_04

BCALV_TREE_05

BCALV_TREE_06

BCALV_TREE_DEMO

BCALV_TREE_DND

BCALV_TREE_DND_MULTIPLE

BCALV_TREE_EVENT_RECEIVER

BCALV_TREE_EVENT_RECEIVER01

BCALV_TREE_ITEMLAYOUT

BCALV_TREE_MOVE_NODE_TEST

BCALV_TREE_SIMPLE_DEMO

BCALV_TREE_VERIFY

Former Member
0 Kudos
95

Hi kranthi,

1. Its quite simple.

2. Basically there are TWO FMs,

which do the job.

3. just copy paste in new program

and u will know the whole logic.

4.

REPORT abc.

DATA : tr LIKE TABLE OF snodetext WITH HEADER LINE.

*----


data

tr-id = '1'.

tr-tlevel = 1.

tr-name = 'amit'.

APPEND tr.

tr-id = '2'.

tr-tlevel = 2.

tr-name = 'mittal'.

APPEND tr.

*----


display

CALL FUNCTION 'RS_TREE_CONSTRUCT'

TABLES

nodetab = tr

EXCEPTIONS

tree_failure = 1

OTHERS = 4.

CALL FUNCTION 'RS_TREE_LIST_DISPLAY'

.

regards,

amit m.

Former Member
0 Kudos
94

Hi,

Please refer to the link below :

<a href="http://www.sapdev.co.uk/reporting/alv/alvtree.htm">http://www.sapdev.co.uk/reporting/alv/alvtree.htm</a>

Thanks,

Sri.