cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Tree display

former_member610985
Participant
0 Kudos

Hi,

I want to display the Tree structure in the ALV table in the following manner

CONTRACT/ Subcontract

NAME

SUPPLIER

STATUS

OWNER

->100

XXXX

XXXXX

Open

YYYYYYY

    . 101

xxxx1

xxxxx1

open

yyyyy1

    . 102

xxxx2

xxxxx2

close

yyyyy2

Below is the table which is binded to ALV.  where Contract and Subcontract are the Hierarchy columns.

SUBCONTRACT

NAME

SUPPLIER

STATUS

Contract

OWNER

101

xxxx1

xxxxx1

open

100

yyyyy1

102

xxxx2

xxxxx2

close

100

yyyyy2

But now i can able to display the hierarchy as below in the ALV:

CONTRACT/ Subcontract

NAME

SUPPLIER

STATUS

OWNER

->100

    . 101

xxxx1

xxxxx1

open

yyyyy1

    . 102

xxxx2

xxxxx2

close

yyyyy2

So i want to display the parent details in the hierarchy table as mentioned in the above ALV table. But these details retrieved from another table.

->100

XXXX

XXXXX

Open

YYYYYYY

    wd_this->go_column = wd_this->go_tree_table->if_salv_wd_column_settings~get_column( 'Contract' ).
    wd_this->go_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).

    wd_this->go_column = wd_this->go_tree_table->if_salv_wd_column_settings~get_column( 'Subcontract' ).
    wd_this->go_column->if_salv_wd_column_hierarchy~set_hierarchy_column( abap_true ).

    wd_this->go_tree_table->if_salv_wd_table_hierarchy~set_last_hier_column_as_leaf( abap_true ).

Please guide me how to proceed futher to achieve this. Should i have to maintain all entries in same table which is binded to alv. If so how to maintain the entry so that i can get the required hierrchy.

Regards,

Arun.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member610985
Participant
0 Kudos

Hi,

Is it possible to make the hierarchy column as link to action. i have tried it but the hierarchy column is coming as non editable field.

Regards,

Arun.

m_aravindan
Active Participant
0 Kudos

Hi Arunagiri,

                     Since i havent tried this,     Take a look in to this document. hope it gives some idea..

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5c...

Regards

Aravindan

former_member610985
Participant
0 Kudos

Hi,

Else, please can any one let me know, to display the below hierarchy what is the table structure(which is binded to alv table) to be maintained.

CONTRACT/ Subcontract

NAME

SUPPLIER

STATUS

OWNER

->100

XXXX

XXXXX

Open

YYYYYYY

    . 101

xxxx1

xxxxx1

open

yyyyy1

    . 102

xxxx2

xxxxx2

close

yyyyy2

Regards,

Arun

former_member610985
Participant
0 Kudos

Hi,

As of now i am getting the hierarchy as below.

CONTRACT/ Subcontract

NAME

SUPPLIER

STATUS

OWNER

->100

       .

XXXX

XXXXX

Open

YYYYYYY

->100

    . 101

xxxx1

xxxxx1

open

yyyyy1

    . 102

xxxx2

xxxxx2

close

yyyyy2

I want to display it as below. Any idea how to do this. Please let me know.

CONTRACT/ Subcontract

NAME

SUPPLIER

STATUS

OWNER

->100

XXXX

XXXXX

Open

YYYYYYY

    . 101

xxxx1

xxxxx1

open

yyyyy1

    . 102

xxxx2

xxxxx2

close

yyyyy2

Regards,

Arun