2008 May 23 7:42 AM
Hello All,
I need a logic for re-cursive call.I am drilling down the BOM components.Example as below.
If I have A as header with B as component and again B may have C as component again C may have D and E as components in it.
Now if I pass A i should find B,C,D,E,F.
Please suggest somebody some idea how to get this logic?
I am using the function module CS_BOM_EXPL_MAT_V2 to get the components of a BOM.
Regards
Mahesh
2008 May 25 9:48 PM
Hello Mahesh
I would assume that if you set IMPORTING parameter MEHRS ( Multi-level explosion ) = 'X' and do not restrict the multi-level explosion then you should get the entire hierarchy.
Regards
Uwe
2008 May 25 10:44 PM
Use cs_mat_bom_read.
after boming once loop over stb internal table and within the loop check the phantom field. if it's equal to X call this form itself and so and so ..
It's very easy to implement.
If you want the source code I'll attach it.
Regards,
Rebeka
2010 May 23 6:44 AM
Hello Rebecca,
can you send the code you mentioned to perform recursive logic? It would be most helpful if you can.
Thanks!