10-01-2008 7:55 AM
Hai,
1) Is there a link between BOM Usage and BOM Application ?
If so, where we can exactly see the link between the two.
2) In Normal Routing (N), I am trying to Allocate Components. When I click on CompAlloc button I got a
Pop-up showing all the possible BOM usages of the Material given (like BOM Usage 1, 5, etc) along
with their Alternatives. I selected BOM Usage 5, but could not see any data for Allocation.
The message in the Status Bar is,
No entry found for the specified filter criterion.
But, when I got to CS03 and display this Material with BOM usage 5, I could see all the components.
What is the reason behind this ?
Thanks,
Shashidhar
10-01-2008 8:48 AM
Hi
A bill of material (BOM) describes the different components that together create a product. A BOM for a bicycle, for example, consists of all the parts that make up the bicycle: the frame, the saddle, wheels, and so on.
Process Flow
When you enter the material number of a bill of materials that is relevant for sales order processing, the system displays the material that describes the whole bill of materials as a main item. The individual components are displayed as lower-level items.
There are two ways to process a bill of materials in Sales. Once you have entered a bill of material in a sales order, the system runs pricing, inventory control, and delivery processing at:
Main item level if the material is assembled, or
Component level if the material is not assembled
The type of processing used by the system is determined by the item category group that you enter in the material master record for relevant materials.
Processing at Main Item Level
If you want the system to carry out pricing, inventory control, and delivery processing at main item level, enter ERLA in the Item category group field of the Sales: sales org. 2 screen in the material master record of the finished product. This means that the components only function as text items and are not relevant for delivery. The following graphic shows how a bill of material is processed at main item level.
Processing at Component Level
If you want the system to carry out pricing, inventory control, and delivery processing at the component level, enter LUMF in the Item category group field of the Sales: sales org. 2 screen in the material master record of the finished product. In this case, only the components are relevant for delivery. During processing the system automatically creates a delivery group. The latest delivery date among all the components becomes the delivery date for the entire delivery group
sample code
REPORT Z_MM_REP_BOM_MSRJ .
TABLES : EORD, EINA, EINE.
DATA: INT_STB LIKE STPOX OCCURS 0 WITH HEADER LINE,
INT_MATCAT LIKE CSCMAT OCCURS 0 WITH HEADER LINE.
DATA: L_MAKTX LIKE MAKT-MAKTX,
L_TOPMAT LIKE CSTMAT,
L_DSTST LIKE CSDATA-XFELD,
LIF LIKE EORD-LIFNR,
L_NETPR LIKE EINE-NETPR,
L_INFNR LIKE EINA-INFNR,
L_APLFZ LIKE EINE-APLFZ.
DATA : BEGIN OF INT_INFO OCCURS 0,
MATNR LIKE MARA-MATNR, " MATERIAL NUMBER FROM BOM EXPLOSION
LIFNR LIKE EORD-LIFNR, " VENDOR NUMBER FROM SOURCE LIST
APLFZ LIKE EINE-APLFZ, " PLANNED DEL TIME INFO REC
NETPR LIKE EINE-NETPR, " NET PRICE FROM INFO REC
PEINH LIKE EINE-PEINH, " QUANTITY FROM INFO REC
EBELN LIKE EKKO-EBELN, " LAST "P.O"
GRDAT LIKE SY-DATUM, " ??????
END OF INT_INFO.
PARAMETERS : P_MTNRV1 LIKE MARA-MATNR,
P_WERKS LIKE MARC-WERKS.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
FTREL = ' '
ALTVO = ' '
AUFSW = ' '
AUMGB = ' '
AUMNG = '0'
AUSKZ = ' '
AMIND = ' '
BAGRP = ' '
BEIKZ = ' '
BESSL = ' '
BGIXO = ' '
BREMS = ' '
CAPID = 'PP01'
CHLST = ' '
COSPR = ' '
CUOBJ = '000000000000000'
CUOLS = ' '
DATUV = '20031212'
DELNL = ' '
EHNDL = '1'
EMENG = '1'
ERSKZ = ' '
ERSSL = ' '
FBSTP = ' '
KSBVO = ' '
MBWLS = ' '
MKTLS = 'X'
MDMPS = ' '
MEHRS = 'X'
MKMAT = ' '
MMAPS = ' '
SPLWW = ' '
MMORY = '1'
MTNRV = P_MTNRV1
NLINK = ' '
POSTP = ' '
RNDKZ = ' '
RVREL = ' '
SANFR = ' '
SANIN = ' '
SANKA = ' '
SANKO = ' '
SANVS = ' '
SCHGT = ' '
STKKZ = ' '
STLAL = ' '
STLAN = ' '
STPST = '0'
SVWVO = 'X'
WERKS = P_WERKS
MDNOT = ' '
PANOT = ' '
QVERW = ' '
VERID = ' '
VRSVO = 'X'
IMPORTING
TOPMAT = L_TOPMAT
DSTST = L_DSTST
TABLES
STB = INT_STB
MATCAT = INT_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
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.
LOOP AT INT_STB.
ENDLOOP.
*
*STUFE Level (in multi-level BOM explosions)
*WEGXX Path (for multi-level BOM explosions)
*TTIDX Index frot cat tab
*VWEGX Path (for multi-level BOM explosions)
*IDNRK MATNR
*POSTP K, L, N
*MAKTX (FROM MAKT)
*QTY (FROM INV TAB ???)
LOOP AT INT_MATCAT.
WRITE 😕 int_matcat-index, 15 int_matcat-matnr.
LOOP AT INT_STB WHERE TTIDX = INT_MATCAT-INDEX.
IF INT_STB-POSTP = 'L'.
WRITE :/20 int_stb-idnrk, 35 int_stb-postp.
PERFORM FILL_VENDOR_FROM_SRC_LIST
USING INT_STB-IDNRK.
ENDIF.
ENDLOOP.
ENDLOOP.
*WRITE 😕 sy-uline.
LOOP AT INT_INFO.
SELECT INFNR INTO L_INFNR FROM EINA
WHERE MATNR = INT_INFO-MATNR AND
LIFNR = INT_INFO-LIFNR.
SELECT SINGLE NETPR APLFZ INTO (INT_INFO-NETPR, INT_INFO-APLFZ) FROM
EINE
WHERE INFNR = L_INFNR.
MODIFY INT_INFO.
CLEAR INT_INFO.
ENDSELECT.
ENDLOOP.
LOOP AT INT_MATCAT.
WRITE 😕 INT_MATCAT-INDEX, 15 INT_MATCAT-MATNR.
LOOP AT INT_STB WHERE TTIDX = INT_MATCAT-INDEX.
IF INT_STB-POSTP = 'L'.
WRITE :/20 INT_STB-IDNRK, 35 INT_STB-POSTP.
LOOP AT INT_INFO WHERE MATNR = INT_STB-IDNRK.
WRITE :/40 INT_INFO-MATNR,
50 INT_INFO-LIFNR,
65 INT_INFO-NETPR,
80 INT_INFO-APLFZ.
PERFORM get_last_po USING int_info-matnr int_info-lifnr.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDLOOP.
*loop at int_matcat.
write:/ int_matcat.
*endloop.
-
FORM get_material_desc *
-
........ *
-
--> MATNR *
-
FORM GET_MATERIAL_DESC USING L_MATNR.
SELECT MAKTX INTO L_MAKTX FROM MAKT
WHERE MATNR = L_MATNR AND SPRAS = SY-LANGU.
ENDSELECT.
ENDFORM.
&----
*& Form FILL_VENDOR_FROM_SRC_LIST
&----
text
-
--> p1 text
<-- p2 text
-
FORM FILL_VENDOR_FROM_SRC_LIST USING I_MATNR.
SELECT LIFNR INTO LIF FROM EORD WHERE MATNR = I_MATNR.
MOVE : I_MATNR TO INT_INFO-MATNR,
LIF TO INT_INFO-LIFNR.
APPEND INT_INFO.
CLEAR INT_INFO.
ENDSELECT.
ENDFORM. " FILL_DATA_FROM_INFOREC
-
FORM get_last_po *
-
........ *
-
FORM GET_LAST_PO USING L_MATNR L_LIFNR.
DATA: BEGIN OF INT_EBELN OCCURS 0,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKPO-AEDAT,
END OF INT_EBELN.
SELECT EBELN FROM EKKO INTO INT_EBELN WHERE LIFNR = L_LIFNR.
APPEND INT_EBELN.
CLEAR INT_EBELN.
ENDSELECT.
*
LOOP AT INT_EBELN.
SELECT SINGLE AEDAT INTO
ENDLOOP.
SELECT AEDAT INTO INT_EBELN-AEDAT
FROM EKPO
FOR ALL ENTRIES IN INT_EBELN
WHERE EBELN = INT_EBELN-EBELN AND
MATNR = L_MATNR.
MODIFY INT_EBELN.
CLEAR INT_EBELN.
ENDSELECT.
ENDFORM.
Thanks&Regards,
Naresh.
10-01-2008 9:29 AM
Hai Naresh,
Thanks for your reply.
I want some clarification regarding my 2) point in the above thread.
I am repeating the same point.
2) In Normal Routing (N), I am trying to Allocate Components. When I click on CompAlloc button I got a
Pop-up showing all the possible BOM usages of the Material given (like BOM Usage 1, 5, etc) along
with their Alternatives. I selected BOM Usage 5, but could not see any data for Allocation.
The message in the Status Bar is,
No entry found for the specified filter criterion.
But, when I got to CS03 and display this Material with BOM usage 5, I could see all the components.
What is the reason behind this ?
Thanks,
Shashidhar