Skip to Content

Display complex tree with node relationships

Aug 01, 2017 at 08:42 AM


avatar image

Hello Community,

I am working on a way to display rather complex relationships between bill of materials (BOMs). So when the user enters a material, it shows the BOM of the material and then, in a relationship, the BOMs of the component, and so forth..

This is a picture I found on Google that displays the general idea:

I am looking for a way to print such a tree on the screen, preferably with controls (to handle double clicks, maybe change color of nodes, ..)

The display you may know from transaction SQVI (to display joins between tables) is a little bit too complex (as we only need to display little information in the node itself) but also gives another idea about what I'm looking for. (I think that is CL_QUERY_JOIN_CNTRL / CL_QUERY_JOIN_DATA)

Classes like CL_SIMPLE_TREE_MODEL however don't seem complex enough, as we only have the "list tree" display (as far as I know).

Could class CL_FPM_TREE_RENDERING be something to display it like mentioned above? I haven't found example programs for this though.

Thanks a lot for your help!


EDIT: I found some example programs such as HIER_BO2 / HIER_BO1 (which use function CNET_GRAPHIC_HIERARCHY to print the hierarchy) / GRSTRU00 that in a way outline what I want to do. However, I realize, that one of the difficulties with displaying hierarchies for BOMs is, that a component can have multiple parent nodes (a screw, for example can be used in multiple products). That does not seem possible with those functions.

10 |10000 characters needed characters left characters exceeded

What are the requirements for double clicks? Will it be okay with a web solution? Eg. is very easy to use for drawing trees


Hi Lars, thanks for your reply.

Is there (an easy) connectivity to a SAP system? Because we have all the information in SAP and the system is supposed to draw the trees automatically based on the BOMs we currently have in the system, the user is not supposed to do that manually.

Double-Clicks are really rather nice to have. I'd assume if such a solution exists in SAP, we can also put in an event handler.

Thanks, Rick

* Please Login or Register to Answer, Follow or Comment.

0 Answers