cancel
Showing results for 
Search instead for 
Did you mean: 

ALV TREE in Web Dynpro

Former Member
0 Kudos

Hi guys,

I am trying to display data from the internal table to ALV tree by using TreeByKeyTableColumn.

can anyone please help me out or suggest proper way to display.

thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sam,

you need to set the column as a hierarchie key

Something like...

 ls_column-r_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).

Your system should have an example.

See WDC <b>SALV_WD_DEMO_TABLE_TREE</b>

See method ON_UPLOAD_COMPLETE

The code is useful even if you cant get the tool to upload data

good luck

Phil.

Former Member
0 Kudos

Hi ,

But the example given is not available in my system . Im using 6.4 version . Is there any other example for TREE in ALV ?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi ,

> But the example given is not available in my system . Im using 6.4 version . Is there any other example for TREE in ALV ?

I think you must be confused. Either your system isn't 6.40 or you aren't doing Web Dynpro ABAP because Web Dynpro ABAP isn't available on 6.40. Also why do you keep asking the same question across several forum threads? I am going to delete the duplicate threads.

Try the WD Component SALV_WD_TEST_TABLE_HIER.

Former Member
0 Kudos

Hi ,

I was telling abt the SAP LOGON release version ( 640 Final Release ) and ofcourse not the WAS version . WAS is 7 0 only .

The example which is given by you is not having any sample data . So im not able to find the tree .

Now i have created a tree structure . But could you help me out in adding child nodes to the corresponding parent node in alv tree ? .

Thanks in advance .

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi ,

> I was telling abt the SAP LOGON release version ( 640 Final Release ) and ofcourse not the WAS version . WAS is 7 0 only .

> The example which is given by you is not having any sample data . So im not able to find the tree .

> Now i have created a tree structure . But could you help me out in adding child nodes to the corresponding parent node in alv tree ? .

>

> Thanks in advance .

Although you might not have the sample data to run the application, you should still be able to look at the source code of the application. Also don't be confused by the File Upload prompt of the test applications. It just is there if you want to override the data in the database. If you just press the upload button without specifying the file it will instead read the data from the database. If you database tables are empty, you can run the program BCALV_GENERATE_ALV_T_T2.

Now as far as adding child nodes - that isn't exactly how things work with the ALV TREE. You don't actually have a heirarchy of nodes like when creating a tree element. You can only set set columns as hierarchy columns. It then uses sorting and grouping based upon these columns to make a psedo tree. However your data has to remain flat.

For example you can take the flat SFLIGHT data in the example and define a hierarchy column of CARRID and CONNID.

http://www.flickr.com/photos/tjung/2802287945/

You then get output that looks like this:

http://www.flickr.com/photos/tjung/2802287971/

If you simply change the hierarchy column definition to add the Departure Date, the output changes (without any changes to the underlying data structure):

http://www.flickr.com/photos/tjung/2802287989/