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: 

3 level hierarchical ALV

Former Member
0 Kudos

Hi,

I need to display hierarchical data in alv. I can nest the data up to 2 levels (with REUSE_ALV_HIERSEQ_LIST_DISPLAY) but i need 3 levels. For example:

- header line 1

- detail line 1

- sub detail line 1

- sub detail line 2

- detail line 2

- sub detail line 1

- header line 2

...

is there any way to do what i want?

thanks,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ferudun,

refer to BCALV_TREE_01 which is a standard program.

this may help you.

Regards,

Radhika

6 REPLIES 6

Former Member
0 Kudos

Hi,

I don't think it is possible.

You probably can look at using SAP's Column Tree Control ( CL_GUI_COLUMN_TREE).

There is example in the system - SAPCOLUMN_TREE_CONTROL_DEMO. You can always avoid the screen on the right hand side in the DEMO and have just the tree on the entire screen.

Regards,

Ravi

Note : Please mark all the helpful answers

vinod_gunaware2
Active Contributor
0 Kudos

Hi goto <b>SE38 give BALV*</b> then try to search the program

which will fullfill ur requiment.

regards

vinod

former_member188685
Active Contributor
0 Kudos

Hi,

You can check the sample program <b>BALVHD01</b> for reference.

Regards

Vijay

Former Member
0 Kudos

Hi,

I dont think it is possible with the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY as it takes two internal tables(one for header details and other for item details).

Probably you can try it out using the following function module as you can mention upto any level.

call function 'RS_TREE_CONSTRUCT'

tables

nodetab = i_snodetext

exceptions

tree_failure = 1

id_not_found = 2

wrong_relationship = 3

others = 4

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'RS_TREE_LIST_DISPLAY'

exporting

callback_program = v_program

importing

f15 = f15

.

you can also check BCALVTREE programs in SE38 for your refrence.

Regards,

Sangeeta.

Former Member
0 Kudos

Hi Ferudun,

refer to BCALV_TREE_01 which is a standard program.

this may help you.

Regards,

Radhika

Former Member
0 Kudos

Hi

could u please send me the Hierarchical ALV code,it can help me a lot,i tried a lot but i was unable to find the right code.

thank you