‎2007 Aug 06 5:52 AM
Hi all,
is there any function module to find which item(bom) the given material belongs to,how to find this.
thanks in advance
siva
‎2007 Aug 06 5:58 AM
try this fm
CS_BOM_EXPL_MAT_V2
here
CAPID = application id
datuv = sy-datum
mehrs = 'X' ' for multi level bom
mtnrv = header material no
werks = plant.
and you can try also fm CS_WHERE_USED_MAT.
regards
shiba dutta
‎2007 Aug 06 6:03 AM
‎2007 Aug 06 6:08 AM
go to cs12 tcode there the application area field is there just for exploding the bom there what value you are giving that is the application id. In my company it is PP01 for pp.
regards
shiba dutta
‎2007 Aug 06 6:06 AM
Hi,
Try FM: CSAP_MAT_BOM_READ.
First hit against the MAST table with the material number. Then hit against STPO with the internal BOM number to get the components. There are also some function modules that will do this to.
data: xmast type mast.
data: istpo type table of stpo with header line.
Select Single * from mast
where matnr = p_matnr.
If sy-subrc = 0.
Write:/ 'This material has a BOM'.
else.
Write:/ 'No BOM found'.
Endif.
write:/ 'Components'.
select * into corresponding fields of table istpo
from stpo
where stlnr = xmast-stlnr.
loop at istpo.
write:/ istpo-idnrk.
endloop.
Regards