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: 

Need FM to bring BOM explosion and quantity

Former Member
0 Kudos
682

Hi,

I'm using FM CS_BOM_EXPL_MAT_V2 to bring BOM explosion, but this function doesn't return the correct quantity like VA01 when I enter the main material and its order quantity.

Does someone know any other function to explode BOM material and return each quantity, depending the main material order quantity entered?

My codes are:

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

capid = 'SD01'

datuv = sy-datum

emeng = w_qtd

mtnrv = material-matnr

werks = material-werks

TABLES

stb = gt_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.

Thank you.

Chang

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos
143

Have U passed MEHRS ='X'. in the import parameter of function module?

3 REPLIES 3

former_member194669
Active Contributor
0 Kudos
144

Have U passed MEHRS ='X'. in the import parameter of function module?

0 Kudos
143

Hi a®s,

The only difference in putting MEHRS ='X'. is the function returns multilevel of part list. The function still doesn't return the quantity based on main material order quantity like VA01 (salesorder create) does.

Thank you anyway.

Chang

Former Member
0 Kudos
143

Hi,

I have solved this problem by myself.

I have sent wrong quantity because of different unit of measure used in salesorder creation. So I executed FM MATERIAL_UNIT_CONVERSION first and inform the right quantity to FM CS_BOM_EXPL_MAT_V2 and it worked fine.

Thank you everyone.