Application Development and Automation 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: 
Read only

Function Module for Multi-level BOM Explosion With same alternative for all component

Former Member
0 Likes
2,455

Hi Freinds

Want to ask about how to explode multi level BOM

I have read some forum post and Tried it using : CS_BOM_EXPL_MAT_V2

My problem is

When I pass a material with Bom alternative 2, I want to explode all component using alternative 2

Lets say I have:

Material A

component 1 : Material B (I need to explode this material also)

component 2 : Material C (lets say this is ROH, no need to be exploded)

What I want :

Material A alt 2

component : Mat B (should using alt 2 also)

But in my case Material B will be exploded with alternative 1, not alternative 2 like the upper material (Material A)

Should I explode manually using Table? (STKO, STPO, etc.) or Use CS_BOM_EXPL_MAT_V2?

Am i missing some parameter to explode all component with same alternative from header material?

My Code

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

        EXPORTING

          capid                 = 'PP01'

          datuv                 = sy-datum

          mbwls                 = 'X'

          mktls                 = 'X'

          mehrs                 = 'X'

          mtnrv                 = t_mara-matnr "Just some variable

          stlal                 = t_mast-stlal "Just some variable, need to break down all component with same this stlal

          stlan                 = t_mast-stlan "Just some variable

          stpst                 = 0

          svwvo                 = 'X'

          werks                 = 'M008'

          vrsvo                 = 'X'

        IMPORTING

          topmat                = topmat

        TABLES

          stb                   = temp_stb

        EXCEPTIONS

          alt_not_found         = 1

          call_invalid          = 2

          material_not_found    = 3

          missing_authorization = 4

          no_bom_found          = 5

          no_plant_data         = 6

          no_suitable_bom_found = 7

          conversion_error      = 8

          OTHERS                = 9.

2 REPLIES 2
Read only

Former Member
0 Likes
872

Hello Vicky,

I am facing the same issue, did you find a way to solve it?

Read only

0 Likes
872

Hello Eduardo

Sorry, for this problem, I didn't manage to solve it

I didn't continue the project, because change of requirement

At that time, I think that if it's not possible using function module, I could select manually from table (MAST, STKO, STPO etc.)