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: 

how to find header bom for a particular child bom

Former Member
0 Kudos

for a particular serial number (sernr-equi) contains

material number( matnr-equi) this is a child material number.

so i need to find header material(bom component) for this particular material .

i am passing material idnrk(equi-matnr) in stpo table to get header bom. i am getting more than one stlnr(bom components) for material with deiffernet serial number.

there is no serial number field in stpo i could not able to find material with requried serial number used in bom component.

tell me how can i proceed further.

6 REPLIES 6

Former Member
0 Kudos

Hi Sridhar,

Use CS15 TCODE.This will display u the Header Bom for Child material.

Regards,

Digesh Panchal

Former Member
0 Kudos

Hi Sridhar.

There is a function module that searchs BOM item .

For example ,

CALL FUNCTION 'CSAP_MAT_BOM_ITEM_SELECT'

EXPORTING

  • I_STPO =

material = p_material

plant = p_plant

bom_usage = p_bom_usage

alternative = p_alternative

  • VALID_FROM =

  • VALID_TO =

fl_material_check = 'X'

fl_foreign_key_check = 'X'

  • IMPORTING

  • FL_WARNING =

TABLES

t_stpo = tbl_stpo

EXCEPTIONS

error = 1

OTHERS = 2

But you want to know where is used BOM Header .

You know..

1st.

select STLNR

from stpo

...

2nd.

select STLNR , MATNR

from mast

where stlnr in (1st stlnr)

...

then you will find materials

that you want to konw .

good luck. ( Sorry My Written-English is Konglish.. -a)

0 Kudos

Hi daniel Kim,

Thank you for information.

first i have serial number, with this i found material number for particular serial no(sernr) from table EQUI.

then, i passed this matnr(material nomber)as IDNRK in table STPO and i got STLNR(Bom component) here my problem is i got more than one STLNR for this Material number,

this means this material is used in more than one STLNR,

From this STLNR's how do i find correct STLNR which matches with material and serial number sernr-equi.

Thanks

sreedhar marri

0 Kudos

Sridhar,

You should understand the concept of BOMs for this first. Let us say you are making a plastic bottle. This is your header material. Now to make the plastic bottle, you need plastic in some form and may be a cap, and some lable wrapped around it. So the plastic, cap and lable will be the components. Now imagine you have to make the same bottle with different lables. Then you will still have the same header material BOM, but you will create alternates, each alternate is different only in their lable component. So if I look at STPO, I may find several components for the header material, because at this level, you are not looking at the alternate. Also, this becomes even more complicated when you the same lable is used in making a plastic bottle, a glass bottle and a paper box. Now if you go to STPO with the component material number, you will get more results because you now have the same component being used in making different things.

So you need more information to identify exactly which header BOM material you need.

Srinivas

0 Kudos

Adding more complexity to the situation is the validity dates on the item as well as header if you are using ECM(Engineering Change Management). The same component can be valid up to a certain date. Your STPO record will not tell you whether the component material is still valid or not.

You have to use the function module mentioned previously by other person or othe function modules like GET_STKO, GET_MAST, and GET_STPO.

But bottom up approach will always lead to multiple header materials unless your business is such that a particular component will be used in making only one header material.

Srinivas

Former Member
0 Kudos

Hi Sridhar,

Use CS_BOM_EXPLOSION FM.

CALL FUNCTION 'CS_BOM_EXPLOSION'

EXPORTING

capid = 'PP01'

datuv = SY-DATUM

mtnrv = header-stlnr

werks = header-werks

mehrs = 'X'

TABLES

stbd = stbd

stbe = stbe

stbk = stbk

stbm = stbm

stbp = stbp

stbt = stbt

EXCEPTIONS

alt_not_found = 1

call_invalid = 2

missing_authorization = 3

no_bom_found = 4

no_plant_data = 5

no_suitable_bom_found = 6

object_not_found = 7

conversion_error = 8

OTHERS = 9.

Afetr Passing capid,datuv,mtnrv,werks,mehrs values, FM will build STBP Table Which comntain all comnponents related to ur STLNR.

Regards,

Digesh Panchal

Note : Please reward points, if it solve ur problem