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: 

FM for calculation of Weights of a BOM?

Former Member
0 Kudos

Hi ABAP,

i have/had to code a report which will display BOM´s.

According to that BOM, i need to print out the weight of the components, the weight of BOM´s in the BOM, and the weight of the BOM itself.

are there any FM´s that can calculate those values for me?

or is there any best-practice?

right now i explode the bom with CS_BOM_EXPLOSION.

parameters mehrs = 'X' if i need to calculate weights.

next step is that i calculate all the weights of the components, by either getting the weight from the BOM-position (STB-yy_ntgew), or getting it from MARA by material, or by calculation faktors.

Then when calculated all those weights, i loop over all my BOM´s in the BOM (xtlnr NE space), and calculate the weights of those by exploding them again using CS_BOM_EXPLOSION with mehrs = space.

after that looping over the exploded Bom´s and summing the previous calced values of the components.

last step is to calculate the total weight of the BOM, by adding all the values of the Bom´s in the Bom + components on Stufe = 1 which are no BOM.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

BAPI_COSTESTIMATE_GETEXPLOSION Determine BOM Explosion for a Cost Estimate

regards,

srinivas

<b>*reward for useful answers*</b>

2 REPLIES 2

Former Member
0 Kudos

Try Function modules

BOM_POST_V2_WBS

BAPI_BOM_UPLOAD_SAVE

BAPI_CC1_DNLOAD_WBSELEMENT

CURTOFOCUSCH_WBS_BOM

Hope it helps...

Abhay

pls. reward appropriate points

Former Member
0 Kudos

BAPI_COSTESTIMATE_GETEXPLOSION Determine BOM Explosion for a Cost Estimate

regards,

srinivas

<b>*reward for useful answers*</b>