cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to "mix" the nodes and leaves of the tree so if they are at the same level, they will display in a specified order.

Former Member
0 Kudos

Is there a way to "mix" the nodes and leaves of the tree so that even if they are at the same level (1,2,3...), they will display in a specified order (via sort sequence, alphabetical, etc.).

History:

We are using the Tree UI element to display/manage a material bom interface. We seem to be running into an issue with displaying the nodes/leaves of the tree.. regardless of the order that the context is built (which is currently the order of the exploded BOM from from CS_BOM_EXPL_MAT_V2), the bom is displayed with the nested boms at the top of each level and the single materials below them. For example. If  TK1 contains Material1, Material2, Material3, Kit1(containing component1, comp2, comp3), Material4, Kit2(containing comp4, comp5, comp6), and Material5 (in this order), the tree will display with the A level node as TK1, the next node as Kit1 (with its subleaves of comp1,comp2,comp3), Kit2(with subleaves of comp4,comp5,comp6), THEN Material1, material2, material3, material4, material5.  Our users are adamant about the items displaying in the correct order (which should be alphabetical based on the description for one report and by location for purposes of inventory for another). I've searched but not been able to locate a similar question. If I've missed it, please point me in the right direction. The users want the tree,  not a "tree" table.  This is our first attempt at the tree, so maybe we're missing something basic?

TK1

-Mat1

-Mat2

-Mat3

-Kit1

--Comp1

--Comp2

--Comp3

-Mat4

-Kit2

--Comp4

--comp5

--comp6

-Material5

displays as

TK1

-Kit1

--Comp1

--Comp2

--Comp3

-Kit2

--Comp4

--Comp5

--Comp6

-Mat1

-Mat2

-Mat3

-Mat4

-Mat5

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

co-workers said example picture is misleading.. we can make the order work if everything is a "folder" but not a mix of "folders" and "files" (if making a visual reference to the windows browser). i.e - a file is represented as an empty folder.

TK1    

. Mat1

. Mat2

. mat3

> kit1   

.. comp1

.. comp2

.. comp3

. mat4

> kit2

.. comp4

.. comp5

.. comp6

. mat5

displays at

TK1

> kit1

.. comp1

.. comp2

.. comp3

> kit2

.. comp4

.. comp5

.. comp6

. mat1

. mat2

. mat3

. mat4

. mat5

we can make it work if everything is a folder. This is our current workaround.

TK1

> mat1

> mat2

> mat3

v kit1 (when expanded)

.. comp1

.. comp2

.. comp3

> mat4

> kit2 (when not expanded)

> mat5

Former Member
0 Kudos

Have only one recursive node and for materials set hasChildren = abap_false. See WDR_TEST_EVENTS view TREE_RECUR_DYNLOAD for reference.

Former Member
0 Kudos

Thanks! I think we have him headed in the right direction now!.

Answers (0)