02-02-2010 8:23 PM
Hi Guys,
Have a question at hand which needs help!!!.
I have a list of meaterials with associated meaterial number.(say I have 20 meaterials)
I need to find the Meaterial BOM's(transaction cs03)- the root BOM,which contain one of these list of meaterials,
condition being(need BOM'S where)
where MARA-matkl = 'xyz' OR knvv-kdgrp = 'abc'
Is there any Function Module or class functions to do this.If not what is the best way to proceed..
That is to say in short,
-Have to loop through these 20 meaterials one at a time
-Find the Meaterial BOM's which contain the first meaterial satisfying the condition.
-Store all the BOM's containing this meaterial in a list or so.
-loop to the 2nd meateral and find the BOm's containing the 2nd meaterial and so on.
Any help is appreciated...
Thanks
P
02-03-2010 4:14 AM
Hi,
Please use this function module
CSAP_MAT_BOM_READ
here in import pass the material number (MATERIAL) and BOM_USAGE
and get the list of bom's in tables - T_STPO and T_STKO.
Hope it helps.
Regards
Hiren K.Chitalia
02-03-2010 1:57 PM
Hi,
Thanks for the reply.
Iam new to ABAp and Iam trying to fulfill a task using this Function Module.
Regarding the "csap_mat_bom_read" module ,I would like to clear up some things.
In the Interface of this function module I see the "Tables" key word as well.Should I have to pass the T_stpo and T_stko structure when calling the function so that it is filled up after the function returns.
TABLES
*" T_STPO STRUCTURE STPO_API02 OPTIONAL
*" T_STKO STRUCTURE STKO_API02 OPTIONAL
The T_stko and t_stpo,are they itabs?
The meaterial number, Iam passing in as input parameter.In which returned table will I find it in the header(stko) or in the position table(stpo).
So If I pass in a meaterial number and if this meaterial is contained in 2 BOm's.
the stko - contains the header items of the 2 boms(I assume).ie: 2 rows in the itab.
the stpo - what does it contain?It has to contain the componenent meaterials of the 2 Bom's..right...How is it stored..
Please enlighten me.....
P
02-03-2010 2:10 PM
You can use this function module to display a single-level material BOM. Any assemblies in the BOM are not exploded.
chk this help doc.
http://help.sap.com/saphelp_40b/helpdata/ru/92/58b507417011d189ec0000e81ddfac/content.htm
you can use BAPI_MATERIAL_BOM_GROUP_CREATE ,which will create a BOM for a material
02-03-2010 2:29 PM
Hi,
I need only single level root BOM's for each loop on the "list of meaterials"
Have modified my 1st post as follows.Thats what I need.
I have a list of meaterials with associated meaterial number.(say I have 20 meaterials)
I need to find the Meaterial BOM's- the root(Header) Meaterial BOM,which contain one of these list of meaterials as a child.
Is there any Function Module or class functions to do this.If not what is the best way to proceed..
That is to say in short,
-Have to loop through these 20 meaterials one at a time
-Find the root BOM's which contain the first meaterial as child satisfying the condition.
-Store the root BOM's containing this meaterial in a list or so.(there could be 1 or more bom which contain this meaterial as child)
-loop to the 2nd meateral and find the root BOm's containing the 2nd meaterial as child and so on.
The 2nd post are questions if I need to use the suggested FM.
Iam desperate for a solution:)
Edited by: pazzuzu on Feb 3, 2010 3:48 PM
Edited by: pazzuzu on Feb 3, 2010 3:55 PM