Function Module to Explode BOM
Hi,
I need a function module to explode a BOM. The input for the funcion module is the material number and when I Execute, it should explode the BOM.
I found a couple of function modules, but my problem is I dont have a Sales Order Number, which is a Mandatory parameter for all these FMs.
So, could you please give a FM which explodes the BOM by taking the Material Number, Plant etc.
-Priya
Priya,
CS_BOM_EXPLOSION_MAT
CS_BOM_EXPL_MAT_V2
Also you can try searching CS* in transaction SE37.
Regards,
Prasobh
Similar Messages
-
Hello,
Is there any function module availabe in 4.7 which will explode the all levels of the BOM?
Regards,
MayurHi,
use below FM: Explore it with help of bapaer in SE37.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = P_APPL
DATUV = P_DATE
MEHRS = 'X'
WERKS = P_WERKS
MTNRV = MAT-MATERIAL
TABLES
STB = STB
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
OTHERS = 8. -
Function module to get BOM which WOULD be created if I open a production
Is there a function module to get the BOM which WOULD be created if I open a production order?
note that I don't have the produciton order created.
I already tried with the FM CS_BOM_EXPL_MAT_V2 and CSAP_MAT_BOM_READ.
I debuged the CO01, but I did not find it.
This BOM should include materials which are under a phantom component.
Edited by: Rodrigo Pelos on Jul 20, 2011 6:55 PMHi Greetson Shunmugasundaram,
thanks for the reply, but for the FMs CO_SD_RESB_FROM_BOM_CREATE and CO_SD_NEW_BOM_ASSIGNEMENT it's necessay to have an production order but I don't have it. And with CS_ALT_SELECT_COUPLED_PRODUCT I could not get a BOM.
Let me explain in more details how I'm going to use this information, I think I was not clear in my post.
I'm creating a report to compare the BOM of a production order with BOM which would be created today if I open a production order.
Then I can check if there was changes in the reservation (RESB) of the production order. If this changes happened, how many pieces. I'll check also if there was differences in consumption, because during the production order confirmation it is possible to make changes.
I would not like to make the BOM explosion "manually" because there are too many variables in the BOM like phantom, alternative, scrap and so on, but I don't know if the function module that I'd like to use exists. -
Bapi or Function module for getting Bom Item Details (Urgent)
Hi All,
I Want to get the Bom Item Details Corresponding to Production Order Number.
So Please Provide me Some Function Module or Bapi So that by giving the
Production Order number I will get all material related to that PO.
Thanks In Advance.Hi,
use the function module.
call function 'CS_BOM_EXPL_MAT_V2'
exporting
capid = 'STD1'
datuv = sy-datum
mktls = 'X'
mehrs = 'X'
mmory = '1'
mtnrv = matnr
werks = werks
tables
stb = it_stb2
matcat = it_matcat
exceptions
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
others = 8.
Regards,
Sankar. -
Function Modules related to BOM
Hi BW Gurus,
I am having a requirement to extract data from the function module for the PP module for the standard BOM.
I found out some function modules for my requirement csap_mat_bom_read and my problem here when i am trying to create a generic data source on using this function module it displays a error msg " The specified table does not exist ".
I am working first on function modules please let me know whether these function modules useful to fetch data in BW or not.
Give me your input of how to proceed further.
Regards,
SyedHi Shahid
You cannot create a generic datasource directly on a SAP standard function module, you should either create a custom FM and use the standard FM to get the data to a internal table and pass the values to a structure of datasource. Or use SAP tables to extract data to ITAB.
Rahul -
BAPI'S or Function Modules for creating BOM
Hi all,
Can any one please suggest me what is the exact function module or BAPI for creating BOM..
If any created the same through bapi's or FM your sample codes are also welcome..
Thanks and Regards,
KenyBAPI_DOCUMENT_CREATE2 and BAPI_MATERIAL_BOM_GROUP_CREATE
chk them -
Function module required for BOM Changes
Dear SAP Guru
I need the function module which gives me the details of changes done in the BOM.
Scenario: Need to develop the report which gives only the details of BOM changed on the given date. The BOM level might vary.
Regards
RahulDear
I think you should have ECM in place to have tracability for any changes carried out in BOM .
Refer earlier posting : Re: ECM ECR
If the ECM is in place , then you can see what changes has been done in CC02/03 Environmnet - > Reporting -> Bill of Material.
Otherwise please try the following Functinal Module : You can also try CEWB and CS80
1. CSAP_BOM_ITEM_MAINTAIN
2.CS_BOM_EXPL_MAT_V2
3.CHANGEDOCUMENT_READ and CDHDR
Refer : http://help.sap.com/saphelp_40b/helpdata/en/92/58b521417011d189ec0000e81ddfac/content.htm
Regards
JH -
Friends,
Is there any FM to get BOM(Bill of Material) when Material Number and Alternative BOM Text (stko-stktx) is given/known?
thnx.Hi Sey,
After Calling the function module. Please check the table T_STKO and check the filed ALT_TEXT Eq 'UNRESTRICTED' and delete all other records.
Hope this may help you.
Please award points for all useful answers.
Regards,
Lanka
Hi Sey,
Please note that you have to delete T_STPO records also when you are checking at T_STKO.
Step1:
Check T_STKO -->filed ALT_TEXT Eq 'UNRESTRICTED' .
Get T_STKO-BOM_NO
Delete T_STKO IF ALT_TEXT NE 'UNRESTRICTED' .
Step2:
Delete T_STPO records For T_STKO-BOM_NO = T_STPO-BOM_NO.
Regards,
Lanka
Message was edited by: Lanka Murthy -
Function module VERBRAUCH_BCO
Hi,
Can anybody explain me the purpose of the function module
AUFBAU_WERTETABELLE
VERBRAUCH_BCO
WERTE_ZU_WERKSMATERIAL.
Within this function module we are fetching the Material consumption from MVER table based upon plant and vendor. Can i get some more details related to this function modules and exact purpose of this function modules.
thanks,
Revathi V.hi zakir,
Function module to Explode BOM is
CS_BOM_EXPL_MAT_V2 -
Hi
We have a function module in which we call a BAPI Function Module and we need to declare same parameter while passing values to in and out of function module
I have a case where
Example call function 'bapi_create1'
Table
schlx = bapi...
but in Bapi function module schlx was declared as 'schlex'
thus it makes any difference in unicode environment and parameters declared need to same?hi zakir,
Function module to Explode BOM is
CS_BOM_EXPL_MAT_V2 -
Function Module for BOM for posting BOM component long text
Is there any SAP provided Function Module for posting BOM components long
text if so please let me know as it is very urgent for me.Hello Sridevi,
The following customer exits are available for BOM, please check the excect one.
http://help.sap.com/saphelp_46c/helpdata/en/4a/d286ba5a1111d3b47b006094b9d648/frameset.htm
Hope this helps.
Regards
Arif Mansuri -
EXPLODE BOM COMPONENT QTY -REG
Hi abapers,
I am creating a report inwhich showing all BOM components for sale order
wise.
I have used FM 'CS_BOM_EXPL_MAT_V2' to show all the BOM
components.
Now I want to display the component quantity also based on required
quantity as we do in CS11.
Is there any tables or function modules to get those fields.
Thanks in advance.
Regards
RajaramHi,
please check out the following link it might help you
Re: Function Module for Displaying BOM
*****please reward points if the information is helpful to you*********** -
Function module to get the valid Subcontract BOM and components for Pur doc
Hello Gurus,
I need help to create a z report of subcontracting bom and their components exploded in Schedule agreement. Seems like there is no standard report which can give the boms from purcashing doc. Can someone please tell me the name of the function module for it? any help will be highly appreciated.
Regards,
Owaishi
u can use
STPO BOM - item
STAS BOMs - Item Selection
STZU Permanent BOM data
also check stko or mast or stpo
or
Perhaps you can run ST05 while run some transaction for display the
BOM.
Once the transaction for display the BOM gets finished, you need to stop the
trace on ST05 and then display it, you will see tables readden in the
transaction,
not tried plz check*
reward if helpful
regards
kunal
Edited by: kunal ingale on Jul 22, 2008 6:21 AM -
Function module to get the BOM details for a material-plant combination
hi
Is there any function module to get the BOM details such as
BOM Usage -STLAN
Alternative BOM -STLAL
Items -POSNR
Required Quantity-EMENG
Resulting Quantity-MENGE
Unit of measure -BMEIN
Base unit of measure-MEINS
for a given material-plant combination
if so please suggest me some FMs.................
Awaiting for ur reply..............try the below fm it may be useful for you
DATA : BEGIN OF I_BOM OCCURS 0.
INCLUDE STRUCTURE STPOX.
DATA : END OF I_BOM.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
DATUV = SY-DATUM
MEHRS = 'X'
MTNRV = P_MATNR
WERKS = P_WERKS
TABLES
STB = I_BOM
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
CONVERSION_ERROR = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.
Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.
regards
shiba dutta -
BOM function module to find sub components
Hi all ,
I got a requirement . I have to find out the components required for a given product .Like if A is made up of X,Y and Z . If i have A , a final product , then how could i know its sub components X,Y and Z .
Is there any Function module .
Regards ,
RajAparna,
One doubt.Does the function module metioned by you will even explode if a Component under the header material is having a sub-assembly which again is having some components and those componenets also have sub-assembly so on....
I mean in one shot if we give the header material it should explode all the BOMS of the corresponding components.
We have developed a small program kindly have a look at it.Does this whole program can be replaced by that function module alone?
As we need supply area w.r.t a component under header material we are displaying only those fields in the output.
REPORT ZBOMEXPLOSION.
TABLES: MBEW,
MARA, "Material Master
MAKT,
MARC,
MAST, "BOM Header
STKO, "BOM Detail
STPO, "Bom Components
STAS. "BOM Alternative
*Declarations for ALV
type-pools slis.
DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA:itrepid TYPE sy-repid.
itrepid = sy-repid.
DATA:itevent TYPE slis_t_event.
DATA:itlistheader TYPE slis_t_listheader.
DATA:walistheader LIKE LINE OF itlistheader.
DATA:itlayout TYPE slis_layout_alv.
DATA:top TYPE slis_formname.
DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA :itsort1 TYPE slis_sortinfo_alv.
DATA:itprintparams TYPE slis_print_alv.
DATA:itvariant TYPE disvariant.
data : title type lvc_title.
field-symbols <fs> type LVC_TITLE.
concatenate 'BOM Explosion level by level' ' ' into title separated by
space.
assign title to <fs>.
DATA:PARENT-MATNR LIKE MAST-MATNR,
CHILD-MATNR LIKE STPO-IDNRK,
CHILD-WERKS LIKE MAST-WERKS,
CHILD-STLAL LIKE MAST-STLAL,
W_MAKTX LIKE MAKT-MAKTX,
W_LEVEL TYPE I,
W_DOT(1),
W_LVL(12),
W_LVL1(12),
W_LVL2(2),
WCNT TYPE I.
DATA: BEGIN OF ITAB OCCURS 100,
CNT TYPE I,
LEVEL TYPE I,
LVL1 LIKE W_LVL1,
WERKS LIKE MAST-WERKS,
POSNR LIKE STPO-POSNR,
IDNRK LIKE STPO-IDNRK,
PRVBE LIKE STPO-PRVBE,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 100,
WERKS LIKE MAST-WERKS,
IDNRK LIKE STPO-IDNRK,
END OF ITAB1.
DATA: BEGIN OF ITAB2 OCCURS 100,
CNT TYPE I,
SUBCNT TYPE I,
LEVEL TYPE I,
LVL1 LIKE W_LVL1,
WERKS LIKE MAST-WERKS,
POSNR LIKE STPO-POSNR,
IDNRK LIKE STPO-IDNRK,
prvbe like stpo-prvbe,
SBASE TYPE P,
MAKTX LIKE MAKT-MAKTX,
END OF ITAB2.
PARAMETERS: P_WERKS LIKE MAST-WERKS,
P_MATNR LIKE MAST-MATNR,
P_STLNR LIKE MAST-STLNR,
P_STLAN LIKE MAST-STLAN,
P_STLAL LIKE MAST-STLAL.
perform zmm.
perform alv.
*& Form zmmspt
* text
* --> p1 text
* <-- p2 text
form zmm .
SELECT * FROM MAST WHERE WERKS = P_WERKS
AND MATNR = P_MATNR
AND STLNR = P_STLNR
AND STLAN = P_STLAN
AND STLAL = P_STLAL.
SELECT SINGLE * FROM MARA WHERE MATNR = MAST-MATNR.
IF SY-SUBRC NE 0.
CONTINUE.
ENDIF.
IF MARA-LVORM <> 'X'.
PARENT-MATNR = MAST-MATNR.
CHILD-MATNR = MAST-MATNR.
CHILD-WERKS = MAST-WERKS.
CHILD-STLAL = MAST-STLAL.
CLEAR ITAB.
CLEAR ITAB-LEVEL.
MOVE MAST-WERKS TO ITAB-WERKS.
MOVE MAST-MATNR TO ITAB-IDNRK.
WCNT = WCNT + 1.
MOVE WCNT TO ITAB-CNT.
APPEND ITAB.
W_LEVEL = 1.
PERFORM GETCHILD.
ENDIF.
ENDSELECT.
SORT ITAB BY LEVEL DESCENDING.
LOOP AT ITAB.
PERFORM GET_BOM.
MOVE ITAB-WERKS TO ITAB1-WERKS.
MOVE ITAB-IDNRK TO ITAB1-IDNRK.
APPEND ITAB1.
CLEAR ITAB2.
MOVE-CORRESPONDING ITAB TO ITAB2.
APPEND ITAB2.
ENDLOOP.
SORT ITAB2 BY CNT.
LOOP AT ITAB2.
CLEAR: MAKT-MAKTX.
SELECT SINGLE * FROM MAKT WHERE MATNR = ITAB2-IDNRK AND
SPRAS = 'E'.
SELECT SINGLE * FROM MBEW WHERE MATNR = ITAB2-IDNRK AND
BWKEY = ITAB2-WERKS.
ITAB2-MAKTX = MAKT-MAKTX.
MODIFY ITAB2.
ENDLOOP.
endform. " zmm
*& Form GETCHILD
* text
* --> p1 text
* <-- p2 text
form GETCHILD .
SELECT * FROM STPO WHERE STLNR = MAST-STLNR
ORDER BY POSNR.
SELECT SINGLE * FROM STKO WHERE STLNR = STPO-STLNR
AND STLAL = MAST-STLAL.
SELECT SINGLE * FROM STAS WHERE STLNR = STPO-STLNR AND
STLKN = STPO-STLKN AND
STLAL = MAST-STLAL.
IF SY-SUBRC EQ 0.
CLEAR: W_DOT, W_LVL, W_LVL1.
PERFORM MOV_DATA.
CHILD-MATNR = STPO-IDNRK.
W_LEVEL = W_LEVEL + 1.
PERFORM SUBCHILD.
W_LEVEL = W_LEVEL - 1.
ENDIF.
ENDSELECT.
endform. " GETCHILD
*& Form SUBCHILD
* text
* --> p1 text
* <-- p2 text
form SUBCHILD .
SELECT SINGLE * FROM MAST WHERE MATNR = CHILD-MATNR
AND WERKS = CHILD-WERKS.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
SELECT * FROM STPO WHERE STLNR = MAST-STLNR
ORDER BY POSNR.
SELECT SINGLE * FROM STKO WHERE STLNR = STPO-STLNR AND
STLAL = MAST-STLAL.
SELECT SINGLE * FROM STAS WHERE STLNR = STPO-STLNR AND
STLKN = STPO-STLKN AND
STLAL = STKO-STLAL.
IF SY-SUBRC EQ 0.
W_DOT = '.'.
PERFORM MOV_DATA.
CHILD-MATNR = STPO-IDNRK.
W_LEVEL = W_LEVEL + 1.
PERFORM SUBCHILD.
W_LEVEL = W_LEVEL - 1.
SHIFT W_LVL.
ENDIF.
ENDSELECT.
endform. " SUBCHILD
*& Form MOV_DATA
* text
* --> p1 text
* <-- p2 text
form MOV_DATA .
W_LVL2 = W_LEVEL.
CONCATENATE W_DOT W_LVL INTO W_LVL.
CONCATENATE W_LVL W_LVL2 INTO W_LVL1.
MOVE W_LVL1 TO ITAB-LVL1.
MOVE W_LEVEL TO ITAB-LEVEL.
MOVE MAST-WERKS TO ITAB-WERKS.
MOVE STPO-POSNR TO ITAB-POSNR.
MOVE STPO-IDNRK TO ITAB-IDNRK.
MOVE STPO-PRVBE TO ITAB-PRVBE.
WCNT = WCNT + 1.
ITAB-CNT = WCNT.
APPEND ITAB.
endform. " MOV_DATA
*& Form GET_BOM
* text
* --> p1 text
* <-- p2 text
form GET_BOM .
SELECT SINGLE * FROM MAST WHERE MATNR EQ ITAB-IDNRK AND
WERKS = ITAB-WERKS.
IF SY-SUBRC EQ 0.
SELECT * FROM STPO WHERE STLTY = 'M' AND
STLNR = MAST-STLNR AND
DATUV LE SY-DATUM.
SELECT SINGLE * FROM STKO WHERE STLTY = 'M' AND
STLNR = STPO-STLNR AND
STLAL = MAST-STLAL.
SELECT SINGLE * FROM STAS WHERE STLNR = STPO-STLNR AND
STLKN = STPO-STLKN AND
STLAL = STKO-STLAL.
ENDSELECT.
ENDIF.
endform. " GET_BOM
*& Form alv
* text
* --> p1 text
* <-- p2 text
form alv .
IF itab2[] IS INITIAL.
MESSAGE 'No Values exist for the Selection.' TYPE 'S'.
STOP.
ENDIF.
DEFINE m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
itfieldcat-do_sum = &4.
itfieldcat-outputlen = &5.
append itfieldcat to itfieldcat.
clear itfieldcat.
END-OF-DEFINITION.
m_fieldcat 'LVL1' '' 'Level' '' 04.
m_fieldcat 'POSNR' '' 'Item' '' 06.
m_fieldcat 'IDNRK' '' 'Component' '' 18.
m_fieldcat 'MAKTX' '' 'Description' '' 40.
m_fieldcat 'PRVBE' '' 'Supply Area' '' 12.
itlayout-zebra = 'X'.
itlayout-colwidth_optimize = 'X'.
itlayout-no_subtotals = ' '.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
IS_LAYOUT = itlayout
IT_FIELDCAT = itfieldcat[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
IT_SORT = itsort[]
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab2
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EXPORT ITAB2 TO MEMORY ID 'KK_ITAB2'.
endform. " alv
K.Kiran.
Maybe you are looking for
-
Table/field/report showing approver of payment run in F110
After reviewing the payment proposal in F110, supervisor approves the Payment Run by clicking u201CStart immediatelyu201D in Schedule Payment pop-up. For audit purposes, we need to view who approved specified payment runs. Anyone knows the table, f
-
When I want to share my iPad mini photos, the app freezes
Like the title says: the iPhoto and Camera app freeze when I try to share photos to my photo stream or to Facebook. I don't really know how to deal with this. Any suggestions? Thanks.
-
Hebrew writing in CS6 incorrect
I have installed trail of version 6, during the installation there was an option to choose supported language. I chose English with Hebrew support option --> i expected that it will be like middle eastern previous versions --> but after the instalati
-
Problems With updating photos to Ipod
Its been a while since i cant put any photos in the ipod.....when its updating an error screen comes up that says *name of photo* could not be copied to Ipod because the photo cannot be displayed on the Ipod.......all the images are normal JPEG.....-
-
Java Importer - Error Occuring While invoking
I have installed form6i along with the forms6i server in my machine.When I try to invoke the Java Importer I am getting an error message as "PDE-UJI1 Unable to create JVM". I have set the classpath for importer.jar and also installed jre1.3 in the ma