cancel
Showing results for 
Search instead for 
Did you mean: 

BOM (Bill Of Material) table problems - SA12

0 Kudos
2,011

We have a BOM (Bill of material) table according below...

Now it has been found that the material included in itself in certain components and subcomponents. See below what I mean. This is not valid and makes some recursive SQL does not work. My question is how through SQL can identify which materials are included in itself as a component. It may be a level 1 or 2 or less that they can be included.

Ex:

Material--------Component-------Quantity--------Materialtype
A---------------B---------------1---------------M
A---------------C---------------2---------------M
A---------------D---------------1---------------M
B---------------E---------------1---------------P
B---------------F---------------2---------------P
C---------------A---------------1---------------P --->Invalid
C---------------G---------------1---------------P
D---------------D---------------1---------------P --->Invalid
D---------------H---------------2---------------P
H---------------A---------------1---------------P --->Invalid
H---------------I---------------1---------------P

Accepted Solutions (0)

Answers (0)