Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BOM Recursive logic

Former Member
0 Kudos

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

3 REPLIES 3

uwe_schieferstein
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hello Rebecca,

can you send the code you mentioned to perform recursive logic? It would be most helpful if you can.

Thanks!