‎2005 Mar 26 4:56 PM
HI friends,
can any one give me an overview of how BOM is created, Exploded and a BOM is released.
Please Let me know,
Thanks in Advance,
Regards,
Roberts.K
‎2005 Mar 27 2:30 AM
Hi Roberts,
A BOM or Bill Of Materials is basically a list of components and the quantities that go into the making of a semi-finished or finished product. You create a BOM using CS01 transaction. A BOM will have different statuses, and usage(experimental, sales, production, etc).
A BOM can be of one level or multiple levels meaning that if the making of a semi-finished or finished product includes just direct materials, then it is one level, but if the making of a product involves making some intermediate semi-finished products then you have a multi-level BOM.
As an example, let us take the manufacturing of cigarettes. A cigarette is a finished product and its BOM may contain blended tobacco, foil, filter and some flavors. Now within this list, a filter, or a flavoring material may by itself needs to be manufactured before assembling into the cigarette. So they will have their own BOMs. This BOM within BOM may go down to some additional levels depending on the complexity of the manufacturing of the finished product. So from the highest level(at the finished product level), when you want to know all the materials that went into the making of it, then you will not only look at its BOM but also expand the included BOMs which is BOM explosion.
The tables involved are MAST, STKO, STAS, STPO etc. Please let me know if you need addiotional information.
Regards,
Srinivas
‎2005 Mar 27 12:57 PM
Hi Srinivas,
Thank you very much for the information,
any function modules to see BOM's .
How to see a BOM explosion, any function module , i.e a BOM under a BOM, and what is the difference between <b>WBS BOM</b> and <b>Material BOM</b> .
Please Let me know ,
Thanks in advance,
Regards,
Roberts.K
‎2005 Mar 28 6:10 AM
CS_BOM_EXPLOSION AND CS_BOM_EXPL_MAT_V2 THIS TWO FM IS USED TO SEE THE MATERIAL BOM. IT IS WORK SAME AS CS12 STD TCODE. THE PARAMETER ARE PLANT / MATERIAL / USAGE OF BOM / LEVEL.
‎2005 Mar 28 8:16 PM
<b>Material BOM</b> is used to rollup to the finished material (could also be used for calculating the cost of a material and the materials involved in a sale of a finished material)
i.e. What Materials are needed to produce a particular finished product (A = D + E), what costs impact the production of a finished product (C = F + G), what materials need to be shipped as part of a sales order (TV = TV + user guide + rebate forms).
On a similar analogy the <b>WBS BOM</b> is used to rollup the various elements of a Project (also used for calculating the cost of a project)
Hope that helps!
Rishi<b></b>
‎2005 Mar 28 9:52 PM
Hai Joseph,
Thanks for the information, i will get back to you if i need any clarification.
Thanks once again,
Regards,
Roberts.K
‎2005 Jun 15 2:14 PM
Hi Srinivas,
My requirement is to put the level of BOM in a structure as .1,..2,..3 as it goes down the nodes.Can u guide me how to go about?
Vijay
‎2005 Jun 15 2:27 PM
Hello,
sample code:
DATA: l_dglvl LIKE stpol_add-dglvl.
DATA: l_lvl TYPE i.
DATA: l_lvl_c(2).
LOOP AT stb.
CLEAR: l_dglvl,
l_lvl,
l_lvl_c.
l_lvl = stb-stufe.
l_lvl_c = stb-stufe.
DO l_lvl TIMES.
CONCATENATE '.' l_dglvl INTO l_dglvl.
ENDDO.
CONCATENATE l_dglvl l_lvl_c INTO l_dglvl.
CONDENSE l_dglvl.
....
endloop.Hope this helps you.
But have you marked this as question? How do you close this thread??
Regards, Murugesh AS
Message was edited by: Murugesh Arcot
‎2005 Jun 16 3:03 PM
Thank you Murugesh.I dunno I messed it up..lemme see if i can close it
Vijay
‎2005 Jun 16 3:06 PM
‎2005 Jun 16 4:20 PM
STB is the internal table containing the BOM.
It is the result of the Call Function 'CS_BOM_EXPL_MAT_V2' which enable to explode your BOM.
Take a look at the following piece of code :
* I Tables for "call CS_BOM_EXPL_MAT_V2 "
data: begin of t_stb occurs 0.
include structure stpox.
data: end of t_stb.
data: begin of matcat occurs 50.
include structure cscmat.
data: end of matcat.
data: dstst_flg like csdata-xfeld.
data: begin of selpool.
include structure cstmat.
data: end of selpool.
...
call function 'CS_BOM_EXPL_MAT_V2'
exporting
auskz = ' '
capid = 'PP01'
datuv = sy-datum
emeng = '1.000'
stlan = '1'
mtnrv = matnr
mehrs = 'X'
mmory = '1'
stpst = '0'
werks = werks
importing
topmat = selpool
dstst = dstst_flg
tables
stb = stb
matcat = matcat
exceptions
material_not_found = 4
no_plant_data = 8
no_bom_found = 12
no_suitable_bom_found = 16.
sort t_stb by stufe.
Hope this helps.
Erwan.
‎2005 Jun 16 5:12 PM
Hi,
Also have alook at FUGR: CSS4 / CSAP for other BOM related FMs / APIs.
Regards, Murugesh AS
‎2005 Jun 16 6:07 PM
‎2005 Jun 21 3:14 PM
So Erwan, how do i need to create 'stb' as and moreover what do i need to give at the place of 'matnr' and 'werks' in the code u have mentioned.
Do i need to create 'Stb' of STPOX struct type?
I am using BOM for the first time...so plz help me.
Vijay
‎2005 Jun 21 4:08 PM
Hello,
Data: stb LIKE stpox OCCURS 0 WITH HEADER LINE.
MATNR - you give the material for which you would like see the exploded BOM and WERKS is the Plant.
Please debug Tx. CS12 which uses the above FM.
Best Regards, Murugesh AS
‎2005 Jun 21 4:58 PM
Thank you Murugesh.Can you look into the below code
I just want to check how it gives me..So for test purpose i wrote this...What is wrong with this it doesnot execute.
REPORT ZBOM .
data: begin of t_stb occurs 0.
include structure stpox.
data: end of t_stb.
data: begin of matcat occurs 50.
include structure cscmat.
data: end of matcat.
data: dstst_flg like csdata-xfeld.
data: begin of selpool.
include structure cstmat.
data: end of selpool.
DATA: l_dglvl LIKE stpol_add-dglvl.
DATA: l_lvl TYPE i.
DATA: l_lvl_c(2).
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
AUSKZ = ' '
CAPID = 'PP01'
DATUV = sy-datum
EMENG = '1.000'
MEHRS = 'X'
MMORY = '1'
MTNRV = '1535'
STLAN = '1'
STPST = '0'
WERKS = '1040'
IMPORTING
TOPMAT = selpool
DSTST = dstst_flg
TABLES
stb = t_stb
MATCAT = matcat
EXCEPTIONS
MATERIAL_NOT_FOUND = 4
NO_BOM_FOUND = 8
NO_PLANT_DATA = 12
NO_SUITABLE_BOM_FOUND = 16
sort t_stb by stufe.
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_stb.
CLEAR: l_dglvl,
l_lvl,
l_lvl_c.
l_lvl = t_stb-stufe.
l_lvl_c = t_stb-stufe.
DO l_lvl TIMES.
CONCATENATE '.' l_dglvl INTO l_dglvl.
ENDDO.
CONCATENATE l_dglvl l_lvl_c INTO l_dglvl.
CONDENSE l_dglvl.
WRITE:/ l_dglvl.
Endloop.
‎2005 Jun 21 6:11 PM
Hi Murugesh,
I think the code I pasted is totally messed up..See what I want to do is get those BoM Levls Concatenated with . in a internal table and want to print them on screen to check the program.Could you plz elmme know about that.
Vijay
‎2005 Jun 23 8:07 AM
Hello,
Please check the following code:
REPORT ZBOM .
data: t_stb LIKE stpox OCCURS 0 WITH HEADER LINE,
matcat LIKE cscmat OCCURS 0 WITH HEADER LINE,
g_dstst LIKE csdata-xfeld,
topmat LIKE cstmat.
*data: begin of t_stb occurs 0.
*include structure stpox.
*data: end of t_stb.
*data: begin of matcat occurs 50.
*include structure cscmat.
*data: end of matcat.
*data: dstst_flg like csdata-xfeld.
*data: begin of selpool.
*include structure cstmat.
*data: end of selpool.
parameters p_MTNRV like mara-matnr.
parameters p_werks like marc-werks.
DATA: l_dglvl LIKE stpol_add-dglvl.
DATA: l_lvl TYPE i.
DATA: l_lvl_c(2).
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
*AUSKZ = ' '
CAPID = 'PP01'
DATUV = sy-datum
ehndl = '1'
*EMENG = '1.000'
MEHRS = 'X'
MMORY = '1'
MTNRV = p_MTNRV
*STLAN = '1'
*STPST = '0'
WERKS = p_werks
IMPORTING
TOPMAT = topmat
DSTST = g_dstst
TABLES
stb = t_stb
MATCAT = matcat
EXCEPTIONS
MATERIAL_NOT_FOUND = 4
NO_BOM_FOUND = 8
NO_PLANT_DATA = 12
NO_SUITABLE_BOM_FOUND = 16
sort t_stb by stufe.
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_stb.
CLEAR: l_dglvl,
l_lvl,
l_lvl_c.
l_lvl = t_stb-stufe.
l_lvl_c = t_stb-stufe.
DO l_lvl TIMES.
CONCATENATE '.' l_dglvl INTO l_dglvl.
ENDDO.
CONCATENATE l_dglvl l_lvl_c INTO l_dglvl.
CONDENSE l_dglvl.
WRITE:/ l_dglvl.
write: t_stb-idnrk.
Endloop.
This gives output in the expected format.
Hope this helps you.
Best Regards, Murugesh AS
‎2005 Jun 23 9:28 AM
Hello,
If my reply has answered your query, award points and please close this thread. Else, let me know if you have any further questions.
Best Regards, Murugesh AS