Bom price
Hi all!!
I have the folowing situation:
Material x has a bom wih components y and z (those materials have standard price 10) . Standard price for x is let say 12. All the movements are made with these standard prices. How can be changed the standard price for material x with the sum of x and y ... ?( i mean 20); in cs11/cs01 I don't see standard prices.
10x.
Ps: without mr21.
Hi
You can update the Price of the Material X having Componenets Y & Z using Material Costing in Product cost Controlling.
You can Create a cost estimate with quantity structure using T.code CK11N
If you have a lot of material for updating the price, please use the Costing run.
This link can guide you much further.
http://help.sap.com/saphelp_47x200/helpdata/en/7e/cb938143a311d189ee0000e81ddfac/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/7e/cb938143a311d189ee0000e81ddfac/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/7e/cb938143a311d189ee0000e81ddfac/frameset.htm
Reward points if useful
Thanks & Regards
Kishore
Similar Messages
-
My question is whether there is a user-friendly way of updating BOM prices in a volatile component environment. I think the answer is no, and that I will need to create a custom program to do so. The details...
We have several customers which manufacture fairly complex products, involving multiple levels of BOMs. Because of the volatility of component prices, and for tax purposes, FIFO costing is utilized. Thus, component costs will be changing on a daily basis. While I understand that the actual postings for a Production Order (PdO) will use the correct costs at the time of issue and FG receipt based on the item's costing method, these companies need to have reasonably accurate rollup costs in order to manage their selling prices. These rollup prices would be considered "reference" values, and it's understood that actual production costs would vary.
I've read dozens of posts and viewed an expert session on maintaining rolled BOM costs:
[https://websmp109.sap-ag.de/~sapidb/011000358700000185812008E/LOG_CW07_How_to_update.wrf]. If I've properly understood and consolidated the information, maintaining prices must be done manually or with the Update Parent Item Prices Globally function. Manual updates would be incredibly time consuming, and frankly, unacceptable. The UPIPG function will yield correct results only if it is performed from the lowest level subassembly BOM's first and finishing with the top-level finished goods. As far as I know, SBO has no "low-level code" in the item master to indicate the lowest BOM level in which it appears. Therefore, using the UPIPG function would still be a manual process and there is insufficient information to guide a user through the correct sequence.
The only solution I can see would involve creating an external program, which could be run periodically (e.g., nightly or on-demand). The output of this program would be an updated price list for all items, reflecting current costs. The program would first dynamically create a temporary table containing each item and its low-level code. Then, it would explode and cost BOMs starting from the lowest level, and progressing up the levels. Each higher level would use the newly-updated prices for the lower levels. The only SBO table updated would be the price list.
I've already scoped and prototyped this program, but wanted to check if there are other alternatives. Any feedback would be much appreciated.
DaveThanks for considering my question, Gordon.
I pretty much finished the program and initial tests are looking good. In case you're interested, the following is how I approached the problem.
The custom program is an external (DI-API) VB.net program, written as a console application (ie, no UI, command-line startup with parameters, can be initiated via Windows Scheduler). I added a UDF to the PriceList table, and the program updates only those price lists with a value in the UDF. The UDF value is a comma-separated list of warehouses whose inventory should be used to formulate the "current cost". For each PriceList, there are two passes. The first pass processes only BUY items, and computes a "current cost", depending on the cost method and whether costing is global or by warehouse. For FIFO items, an average FIFO cost is calculated across the designated warehouses. For Moving Average, a weighted average of the Moving Averages is determined. For standard cost items, the standard costs are averaged. The PriceList is updated to reflect this "current cost" (which is only a reference value). The second pass processes only MAKE items. Rather than updating a static low-level code each time, I simply flatten each BOM down to it's BUY or non-inventory parts, and use the newly-updated prices for the BUY items. Each make item's price is updated in the PriceList, if there's been a change. A bit of recursive programming made the BOM explosion fairly easy.
The result is one (or more) PriceLists that reflect an averaged cost for non-make items, and essentially a BOM rollup cost using the updated component costs. We'll be running it nightly, which should provide fairly good reference values. I'm still hoping that SAP will, at some point, add some kind of automated BOM rollup functionality that responds to changing component costs.
Dave -
Exchange rate and BOM price update
Dear all,
I would like to update the price of my BOMs, in which I have components with prices in different currencies, according to the current exchange rate.
I saw that if I use the yellow triangle at the bottom of the BOM's form I get the right values while if I use the Update Parent Item Prices Globally functionality, even if the exchange rates have changed, I didn't get any suggestion to update the price.
Is it the right behaviour? Is there a way to update the BOM prices automatically according to the current exchange rates?
Thank you for the help.
MassimoHi Rahul,
thank you for your answer, but maybe I wasn't clear. I make an example:
Parent Item A
Component 1 --> Price 1 EUR
Component 2 --> price 1 USD
Exchange rate --> 1 USD= 0,82 EUR
Item A Price = 1,82 EUR
(EUR is the system currency)
Now, if the exchange rate changes (today 1 USD = 0,78 EUR), then I need to click on the triangle in the bottom of the BOM form to update the price (from 1.82 EUR to 1.78 EUR).
If I run the Update Parent Item Prices Globally function I don't get the same result... (or better I don't get any result!!!).
The prices in price lists could be in any currency, not only in system currency.
Regards.
Massimo -
Does anyone know if it is possible to change the BOM price list for each item in the BOM Globally for all BOM's.
I need to change the price list for all BOM's, this would save a lot of time.
Thanks for your helpHi brett
Update parent prices globally update the BOM prices based on the changes in the prices of the Component item, in single click it will give u the recommendation and the status of all the BOM prices it is our discretion to accept.
thanks & regards
baskar -
BOM Prices for production...
Hi Experts,
My client activated the ML, They are following Actual costing...no Standard cost estimation...
Now the reqirement is ..for one product they are having the multiple BOMs(With different combination of Raw materials), at the time of production the production people taking bom based on the availability of materials....
Now the requirement is he wants to now what is the present cost of the BOms(all BOMs) of that particular product on that date.
Based on this he can select which bom we can take for production.
How can we get the price of all BOMs for the particular product same time.....any standard report is there to achive this..
Please give your inputs..
Thanks
ChanduHi Chandy
Well if you want to check price for a BOM you have to run a cost anyway. (CK11N)
You can set a costing variant (OKKN) to work on standard costs (plan activity price) or you can set to take actual prices (actual activity price + last reg info purchase).
Anyway you will have to run and you can run reports to check it.
One problem would be compare the the BOM´s because you would have to run many costing versions and compare them.
Well I hope I have gave some scenarios to check.
Regards
Fred -
Hi Team,
This is a question in SRM MDM.
I am using Item Type BOM & Components.
The user is selecting a BOM, and say it has 3 components.
In the "Item Includes" tab he deselects 2 Components. So the BOM value gets updated to the Price of the only 1 Component.
On Add to Cart and Checkout cart .. when we see the Product.. the price is reset to Zero, instead of the price of only 1 component.
Please guide.
Thanks,
PritiAny suggestions ??
-
HI,
In cs01 the header material is Handpump(item catg is ERLA).And the sub item is *Haedbox & stand*.If I will increase the quantity at sub item level (i.e Haedbox & stand) then price will not calculated at header level please give me the solution.
So please give me the solution if I will increase at subitem level then how total price will calculate at header level.
Thanks,
RAJ.Hi,
If you have maintained pricing at main item level, then try to increase qty at main item level in sales order, system will add qty at sub item level accordingly and calculate pricing at main item level as your settings
correct me if i am wrong in understanding scenario
Sagar -
How about this implementation of BOM Explosion(simulate stack)
REPORT YZWX00301_06 LINE-SIZE 142
LINE-COUNT 65
MESSAGE-ID YM1
NO STANDARD PAGE HEADING .
INCLUDE
INCLUDE: YXXI00050.
*TABLES use table define
TABLES: MARA, " Material General Table
MARC, " Plant Data for Material
MDMA, " MRP Area table
EORD, " Vendor table
A018, " Vendor material mapping table
KONP, " Vendor condition table
MAST, " Material BOM table
STPO, " Material BOM Component table
STAS. " Material BOM Component table detail
*CONSTANTS define
CONSTANTS:
C_DAT_X TYPE C VALUE 'X',
C_MODE LIKE dxfields-fileoper VALUE 'R',
C_MASK LIKE dxfields-filemask VALUE '.',
C_FLG_LOCATION TYPE C VALUE 'A',
C_DFPATH(15) TYPE C VALUE '\bmwx\'.
Work Area Define
---- build stack structure -
DATA: BEGIN OF WK_STACK,
LEVEL(1) TYPE C, "Save Level
QUANT TYPE I, "Save Quantity
END OF WK_STACK.
---- BOM work area -
DATA: BEGIN OF WK_BOM,
LEVEL(1) TYPE C, "BOM LEVEL
MATNR LIKE MARC-MATNR, "MATERIAL 18
POSTP LIKE STPO-POSTP, "ITEM CATEGORY 1
MENGE LIKE STPO-MENGE, "BOM COMPONENT 13
DATUV LIKE STPO-DATUV, "VALID FROM 10
DATUB LIKE STPO-DATUV, "VALID TO 10
END OF WK_BOM.
---- DATA work area -
DATA: BEGIN OF DATAITEM,
LEVEL(1) TYPE C, "BOM LEVEL
MATNR LIKE MARC-MATNR, "MATERIAL
POSTP LIKE STPO-POSTP, "ITEM CATEGORY
MENGE LIKE STPO-MENGE, "BOM COMPONENT
DATUV LIKE STPO-DATUV, "VALID FROM!!!
DATUB LIKE STPO-DATUV, "VALID TO
EKGRP LIKE MARC-EKGRP, "PURCHASE ORG
LIFNR LIKE EORD-LIFNR, "Vendor code 10
MARK(1) TYPE C, "Mark
KBETR LIKE KONP-KBETR, "Rate price 11
KONWA LIKE KONP-KONWA, "Currency 5
KPEIN LIKE KONP-KPEIN, "Unit Qty 5
KMEIN LIKE KONP-KMEIN, "Condition Unit 3
DATAB LIKE A018-DATAB, "Condition from 10
DATBI LIKE A018-DATBI, "Condition to 10
END OF DATAITEM.
---- File Line work area -
DATA: BEGIN OF LINE,
WERKS(4) TYPE C, "Plaint 4
MATNR(18) TYPE C, "Material Number 18
EKGRP(3) TYPE C, "Purchase Group 3
LIFNR(10) TYPE C, "Vendor code 10
VDATU LIKE EORD-VDATU, "Vendor valid from 10
BDATU LIKE EORD-BDATU, "Vendor valid to 10
MARK(1) TYPE C, "Mark
KSCHL(4) TYPE C, "Condition type 4
KBETR(18) TYPE C, "Rate price 11
KPEIN(5) TYPE C, "Rate unit 5
KONWA(5) TYPE C, "Currency 5
KMEIN(3) TYPE C, "Condition Unit 3
DATAB LIKE A018-DATAB, "Condition from 10
DATBI LIKE A018-DATBI, "Condition to 10
END OF LINE.
*Local Data Object Define
DATA: WK_CNT TYPE I, "Count variable
WK_LVL TYPE I, "BOM level
WK_QTY TYPE I. "BOM component qty
DATA: WK_LIFNR LIKE EORD-LIFNR,
WK_MATNR LIKE MARC-MATNR.
*Internal Table define
DATA TAB_STACK LIKE STANDARD TABLE OF WK_STACK. "STACK TABLE
DATA TAB_BOM LIKE STANDARD TABLE OF WK_BOM. "FOR BOM
DATA TAB_DATA LIKE STANDARD TABLE OF DATAITEM. "FOR ALL
Parameter in Block1
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME. "TITLE TEXT-001.
PARAMETERS:
P_WERKS LIKE MARC-WERKS DEFAULT 'WX01', "Plant
P_STLTY LIKE STPO-STLTY DEFAULT 'M', "BOM Category
P_MATNR LIKE MARC-MATNR OBLIGATORY, "Material
P_STDAT LIKE EORD-VDATU OBLIGATORY DEFAULT SY-DATUM. "Standard Date
SELECTION-SCREEN END OF BLOCK B1.
Parameter in Block2
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_SCREEN RADIOBUTTON GROUP R1. "Screen output
SELECTION-SCREEN COMMENT 03(21) TEXT-001.
SELECTION-SCREEN POSITION 32.
PARAMETERS: P_FILE RADIOBUTTON GROUP R1. "NTFILE output
SELECTION-SCREEN COMMENT 34(17) TEXT-002.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
Parameter in Block3
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME.
PARAMETERS:
P_NTFILE(45) TYPE C LOWER CASE OBLIGATORY.
P_PCFILE LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B3.
INITIALIZATION
INITIALIZATION .
CLEAR : WK_CNT,
WK_LVL,
WK_QTY,
WK_MATNR,
WK_STACK,
WK_BOM,
DATAITEM.
WK_LVL = 0.
WK_QTY = 1.
REFRESH: TAB_STACK,
TAB_DATA,
TAB_BOM.
*& AT SELECTION-SCREE ON VALUE-REQUEST
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_NTFILE.
PERFORM F_SHOW_FILE_POPUP CHANGING P_NTFILE. "Popup display
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PCFILE.
PERFORM F_FILENAME_GET USING P_PCFILE
CHANGING P_PCFILE.
*& Form F_FILENAME_GET
--> ST_DAT_PATH : Preset path
<-- ST_DAT_FILENAME : Selected file name
FORM F_FILENAME_GET USING st_dat_path
CHANGING st_dat_filename.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = SPACE
def_path = st_dat_path
mask = ',.,.,'
mode = '0'
title = 'TXT-file select'
IMPORTING
filename = st_dat_filename
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE s002(yf1) WITH 'F_FILENAME_GET' sy-subrc.
ENDIF.
ENDFORM. "F_FILENAME_GET
MAIN PROCESS
START-OF-SELECTION.
---- Check material -
PERFORM CHECK_PROD.
---- get vendor data -
PERFORM GET_VENDOR_DATA.
---- output screen/file -
IF P_SCREEN = 'X'.
PERFORM SET_OUTPUT. "Output to screen directly
ELSEIF P_FILE = 'X'.
IF P_PCFILE <> ''.
PERFORM DOWNLOAD_DATA. "Write data into ntfile
ELSE.
MESSAGE E007(00) WITH 'P_PCFILE'.
ENDIF.
ENDIF.
END-OF-SELECTION.
ULINE (142).
WRITE: /002 'Component Material Count:', WK_CNT.
TOP-OF-PAGE
TOP-OF-PAGE.
WRITE: /002 'Product:', 013 P_MATNR,
030 '****** BOM Price List ******',
070 SY-DATUM,
095 'PAGE:',
100 SY-PAGNO.
ULINE (142).
WRITE: /001 '|Level',
007 '|Material',
026 '|Cat',
030 '|Quantity',
044 '|From',
055 '|To',
066 '|PurG',
071 '|Vendor',
082 '|MK',
085 '|Price',
101 '|Crncy',
107 '|UnitQty',
115 '|Unit',
120 '|From',
131 '|To',
142 '|'.
ULINE (142).
*&FORM CHECK_PROD
text
-->p1 text
<--p2 text
FORM CHECK_PROD.
SELECT SINGLE * FROM MARC
WHERE WERKS = P_WERKS " Plant
AND MATNR = P_MATNR " Material
AND DISPR IN ('F100','F200'). " Product
IF SY-SUBRC = 0.
PERFORM CHECK_BOM1 USING MARC-MATNR MARC-WERKS. " CHECK_BOM1
ELSE.
MESSAGE E022.
ENDIF.
ENDFORM. " CHECK_PROD
*&FORM CHECK_BOM1
text
-->p1 text
<--p2 text
FORM CHECK_BOM1 USING VALUE(FP_MATNR) VALUE(FP_WERKS).
SELECT SINGLE * FROM MAST
WHERE MATNR = FP_MATNR AND "Material
WERKS = FP_WERKS. "Plant
IF SY-SUBRC = 0.
PERFORM PUSH_STACK USING WK_LVL WK_QTY. "Save parent attribute
PERFORM CHECK_BOM2 USING MAST-STLNR. "Check BOM2
ENDIF.
ENDFORM. "CHECK_BOM1
*&FORM CHECK_BOM2
text
-->p1 text
<--p2 text
FORM CHECK_BOM2 USING VALUE(FP_STLNR).
SELECT * FROM STPO
WHERE STLTY = P_STLTY AND "BOM category
STLNR = FP_STLNR. "BOM number
PERFORM POPOUT_WK. "Pop out to work area
WK_BOM-LEVEL = WK_LVL. "Current BOM level
WK_BOM-MATNR = STPO-IDNRK. "Material number
WK_BOM-POSTP = STPO-POSTP. "ITEM Category
WK_QTY = STPO-MENGE * WK_QTY. "For Stack
WK_BOM-MENGE = WK_QTY. "BOM Component qty
PERFORM CHECK_BOM3 USING STPO-STLTY STPO-STLNR STPO-STLKN.
PERFORM CHECK_BOM1 USING STPO-IDNRK P_WERKS.
ENDSELECT.
PERFORM POPOUT_STACK.
ENDFORM. "CHECK_BOM2
*&FORM CHECK_BOM3
text
-->p1 text
<--p2 text
FORM CHECK_BOM3 USING VALUE(FP_STLTY) VALUE(FP_STLNR) VALUE(FP_STLKN).
SELECT SINGLE * FROM STAS
WHERE STLTY = FP_STLTY "BOM category
AND STLNR = FP_STLNR "BOM number
AND STLKN = FP_STLKN "BOM item
AND DATUV <= P_STDAT "Valid from
AND LKENZ = ' ' . "Valid
IF SY-SUBRC = 0.
WK_BOM-DATUV = STAS-DATUV. "Valid from
ENDIF.
SELECT SINGLE * FROM STAS
WHERE STLTY = FP_STLTY "BOM category
AND STLNR = FP_STLNR "BOM number
AND STLKN = FP_STLKN "BOM item
AND DATUV > P_STDAT "Valid from
AND LKENZ = 'X' . "Invalid
IF SY-SUBRC = 0.
SELECT SINGLE * FROM STAS
WHERE STLTY = FP_STLTY "BOM category
AND STLNR = FP_STLNR "BOM number
AND STLKN = FP_STLKN "BOM item
AND DATUV > P_STDAT "Valid from
AND LKENZ = 'X' . "Invalid
IF SY-SUBRC = 0.
WK_BOM-DATUB = STAS-DATUV. "Valid to
APPEND WK_BOM TO TAB_BOM.
ENDIF.
ELSE.
WK_BOM-DATUB = '99991231'. "Manul input
APPEND WK_BOM TO TAB_BOM.
ENDIF.
ENDFORM. "CHECK_BOM3
*&FORM PUSH_STACK
text
-->p1 text
<--p2 text
FORM PUSH_STACK USING VALUE(FP_LVL) VALUE(FP_QTY).
WK_STACK-LEVEL = FP_LVL + 1.
WK_STACK-QUANT = FP_QTY.
APPEND WK_STACK TO TAB_STACK. "Push stack
SORT TAB_STACK BY LEVEL. "Sort table by level
ENDFORM. "PUSH_STACK
*&FORM PUSH_STACK
text
-->p1 text
<--p2 text
FORM POPOUT_STACK.
DESCRIBE TABLE TAB_STACK LINES WK_CNT.
IF WK_CNT > 0.
DELETE TAB_STACK INDEX WK_CNT. "Popout stack
SORT TAB_STACK BY LEVEL. "Sort table by level
ENDIF.
ENDFORM. "POPOUT_STACK
*&FORM POPOUT_WK
text
-->p1 text
<--p2 text
FORM POPOUT_WK.
DESCRIBE TABLE TAB_STACK LINES WK_CNT.
IF WK_CNT > 0.
READ TABLE TAB_STACK INTO WK_STACK INDEX WK_CNT. "Popout stack
IF SY-SUBRC = 0.
WK_LVL = WK_STACK-LEVEL. "Current Level
WK_QTY = WK_STACK-QUANT. "Parent Qty
ENDIF.
ENDIF.
ENDFORM. "POPOUT_WK
*&FORM DOWNLOAD_DATA
text
-->p1 text
<--p2 text
FORM DOWNLOAD_DATA.
DATA: L_RETURN TYPE SY-SUBRC.
PERFORM GUI_DOWNLOAD
TABLES
TAB_DATA
USING
P_PCFILE
'X'
CHANGING
L_RETURN.
IF L_RETURN <> 0.
MESSAGE S020.
ELSE.
MESSAGE S021.
ENDIF.
ENDFORM. " DOWNLOAD_DATA
*&FORM GET_VENDOR_DATA
text
-->p1 text
<--p2 text
FORM GET_VENDOR_DATA.
LOOP AT TAB_BOM INTO WK_BOM.
CLEAR DATAITEM.
SELECT * FROM MARC
WHERE WERKS = P_WERKS "Plant
AND MATNR = WK_BOM-MATNR. "Material
DATAITEM-EKGRP = MARC-EKGRP.
SELECT SINGLE * FROM MARA
WHERE MATNR = MARC-MATNR AND "Material number
MTART IN ('1211','1221').
IF SY-SUBRC = 0.
SELECT COUNT(*) FROM EORD
INTO (WK_CNT)
WHERE WERKS = P_WERKS AND "Plaint
MATNR = WK_BOM-MATNR AND "Material
VDATU <= P_STDAT AND "Valid-From
BDATU > P_STDAT. "Valid-To
IF WK_CNT > 1.
DATAITEM-MARK = '*'.
ELSEIF WK_CNT = 0.
MOVE-CORRESPONDING WK_BOM TO DATAITEM.
APPEND DATAITEM TO TAB_DATA.
ENDIF.
SELECT * FROM EORD
WHERE WERKS = P_WERKS AND "Plaint
MATNR = WK_BOM-MATNR AND "Material
VDATU <= P_STDAT AND "Valid-From
BDATU > P_STDAT. "Valid-To
MOVE-CORRESPONDING WK_BOM TO DATAITEM.
DATAITEM-LIFNR = EORD-LIFNR. "Vendor code
SELECT * FROM A018
WHERE LIFNR = EORD-LIFNR AND "Vendor code
MATNR = EORD-MATNR AND "Material
EKORG = EORD-EKORG AND "Purchase org
DATAB <= P_STDAT AND "Valid-from
DATBI > P_STDAT. "Valid-to
DATAITEM-DATAB = A018-DATAB. "Condition From
DATAITEM-DATBI = A018-DATBI. "Condition To
IF SY-SUBRC = 0.
SELECT * FROM KONP
WHERE KNUMH = A018-KNUMH AND "Cnd Number
KSCHL = A018-KSCHL AND "Cnd Type
KAPPL = A018-KAPPL. "Cnd Cat
DATAITEM-KBETR = KONP-KBETR. "Price
DATAITEM-KONWA = KONP-KONWA. "Currency
DATAITEM-KPEIN = KONP-KPEIN. "Price Unit
DATAITEM-KMEIN = KONP-KMEIN. "Unit of Material
APPEND DATAITEM TO TAB_DATA. "Append TAB_DATA
ENDSELECT.
ENDIF.
ENDSELECT.
ENDSELECT.
ELSE.
MOVE-CORRESPONDING WK_BOM TO DATAITEM.
APPEND DATAITEM TO TAB_DATA.
ENDIF.
ENDSELECT.
IF SY-SUBRC <> 0.
MOVE-CORRESPONDING WK_BOM TO DATAITEM.
APPEND DATAITEM TO TAB_DATA.
ENDIF.
ENDLOOP.
ENDFORM. "GET_DATA
*& Form SET_OUTPUT
text
--> p1 text
<-- p2 text
FORM SET_OUTPUT .
CLEAR WK_CNT.
LOOP AT TAB_DATA INTO DATAITEM.
WRITE: /001 '|', 002 DATAITEM-LEVEL, "Material Number
007 '|', 008 DATAITEM-MATNR, "Purchase Grp
026 '|', 027 DATAITEM-POSTP, "Item category
030 '|', 031 DATAITEM-MENGE, "BOM Component qty
044 '|', 045 DATAITEM-DATUV, "BOM valid from
055 '|', 056 DATAITEM-DATUB, "BOM valid to
066 '|', 067 DATAITEM-EKGRP, "Purchase Org
071 '|', 072 DATAITEM-LIFNR, "Vendor
082 '|', 083 DATAITEM-MARK, "Mark flag
085 '|', 086 DATAITEM-KBETR, "Price
101 '|', 102 DATAITEM-KONWA, "Currency
107 '|', 108 DATAITEM-KPEIN, "Unit Qty
115 '|', 116 DATAITEM-KMEIN, "Unit OM
120 '|', 121 DATAITEM-DATAB, "Cnd From
131 '|', 132 DATAITEM-DATBI, "Cnd To
142 '|'.
WK_CNT = WK_CNT + 1.
ENDLOOP.
ENDFORM. " SET_OUTPUTPrabhu Peram,
Thanks very much.
I want to show an idea of BOM explosion by constructing a stack.
BOM explosion uses first-root-searching and pushes the "root" material into stack.If the "root" has no left-child,pops out the "root" material and searchs the right-child....and completes the entire BOM explosion.
Message was edited by:
Mic chen
Message was edited by:
Mic chen -
How to update only Raw material cost(CK11n) in Material Master ?
Hi Everybody,
My client has a requirement where only raw material costs from the BOM should get updated in Material Master (Accounting 1 view in Standard Price field).
But in Receipe & BOM for the Process Order, the client wants all Packing Materials and activites to be maintained.
Pls help me in this regards,
AnkitaHi Jagdish,
Let me put it this way to explain you my problem.
When running CK11n,
Total Cost is =
Total Raw Materials used Cost = QTY from BOM * Price from Material Master
+
Total Packing Materials used Cost = QTY from BOM * Price from Material Master
+
Total Utility cost = Qty from receipe * price in KP26
When viewing the cost componenet view in CK11n tcode, I can view the break up as follows
Raw Material Cost = XX rs
Packing Material Cost = XX rs
Overheads = XX rs
Total cost = sum of all above XX rs ( this is the cost which gets updated when realasing price thru t code CK40n)
But my client wants that at time of price relase, system should relase only total raw materil cost as standard price for the Finished Good in Material Master Accounting 1 view.
I hope now you are getting me.
Regards,
Ankita -
Hello,
I am working on product costing, i have prepared Cost sheet, Costing variant & Cost component.
Str of cost is as folows
10 Material Cost BOM & Price Base
20 Processing Cost Routing & Act prices base
30 Production OH 10% 10 to 20
40 Selling OH 10% 10 to 30
50 Other OH 10% 10 to 40
But while calcuting cost through ck11n, Oh of row 30, 40 & 50 ignores row 20.
Please provide me solution for the same.
Regards,
Hari GoreHi Hari,
Have you assign the correct cost elements/cost element group to row 20? It seems internal activity cost, so secondary cost element/cost element group should be assigned to row 20 as what cost elements assigned to the cost component. -
I know there has been lots of discussion on the forum about leaks, but I've got a big one and it's not even an add on. I've got an executable that uses the DI. I use a recordset to select the code field for virtually all the 7,000 BOMs in OITT. I attach the recordset to the product tree object's browser to be able to loop through each bom, using the b1 object, like this:
'get all boms that aren't templates (Cindy says to include those where U_xxdslsty is null or blank)
sql = "select code from oitt where code in (select itemcode from oitm where coalesce(U_xxdslsty,'') <> 'T')"
miscrs = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
miscrs.DoQuery(sql)
If Not miscrs.EoF Then
bom = oCompany.GetBusinessObject(BoObjectTypes.oProductTrees)
bom.Browser.Recordset = miscrs
Do While Not bom.Browser.EoF
Try 'pgm has failed on move next !!!
'update bom line items' price list & unit price; update bom header pricelist too
SetBomToMCL(bom, MCLPriceList)
bom.Browser.MoveNext()
Catch ex As Exception
mReturnStatus.RtnCode = -1
mReturnStatus.RtnMessage = "Failing inside browser loop: " & ex.ToString
End Try
Loop
End If
Inside that loop, I'm calling SetBomToMCL(bom, MCLPriceList) which receives the bom object byref & then changes the price list code on all the components, using a different record set to get the price on each component & then updates the price on the line item in a loop. I also update the bom price using the Items object. When I'm all done in that sub, I do release the com object stuff everyone recommends (for all the b1 objects used):
System.Runtime.InteropServices.Marshal.ReleaseComObject(oItm)
oItm = Nothing
gc.collect
before returning to the main proc to read another row. It is still chewing up memory "like there is no tomorrow". It's about halfway through the boms & it's up to 1.2 Gigs! As I step through in debug mode, it's interesting that the lines of code where I loop through the oitm.pricelist to find the correct one to update, memory usage seems to go up on each line of code:
For a As Integer = 0 To oItm.PriceList.Count - 1
oItm.PriceList.SetCurrentLine(a)
If oItm.PriceList.PriceList = MCLPriceList Then
oItm.PriceList.Price = TotalPrice
oItm.PriceList.Currency = "$"
Exit For
End If
Does anyone have any idea what I am doing wrong? Desperate for help - THANK YOU!
Edited by: John Chadwick on Aug 28, 2008 2:59 PMThe proc is below. It does seem to take more memory for every iteration of the pricelist loop for the OITM object & that memory never seems to free up. I've never heard any talk about releasing "sub-objects" via the ReleaseComObject command, but should I be doing something like this?
System.Runtime.InteropServices.Marshal.ReleaseComObject(oItm.Pricelist)
oItm.Pricelist = nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(oItm)
oItm = nothing
I wouldn't think so, but who knows.
Actually, when debugging & watching the memory changes, the ReleaseComObject command, and setting the object to nothing has no immediate affect on memory, nor does the gc.collect, for that matter - I usually wait a minute for the gc. to do something. It really seems that anytime I read a record from a set, anywhere, it gobbles more memory (understandable) but never let's go.
Also, I don't know if I'd be better off using only one recordset in this sub, or making it/them global variables that I only instantiate once in the constructor? It seems to me that I've gotten NullReference exceptions in other code when the recordset object is used after a period of inactivity, even if it is a global variable that has been instantiated (only once).
Private Sub SetBomToMCL(ByRef BOM As ProductTrees, ByVal MCLPriceList As Short)
Dim sql As String
Dim rs, miscrs As Recordset
Dim price, TotalPrice As Double
Dim parent As String
Dim pricelistfail As Boolean
Try
parent = BOM.TreeCode
rs = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
For x As Integer = 0 To BOM.Items.Count - 1
BOM.Items.SetCurrentLine(x)
BOM.Items.PriceList = MCLPriceList
sql = "select price from itm1 where itemcode = '" & BOM.Items.ItemCode & "' and pricelist = " & MCLPriceList
rs.DoQuery(sql)
If Not rs.EoF Then
price = rs.Fields.Item("price").Value
BOM.Items.Price = price
BOM.Items.Currency = "$" ' needed when the component has a zero price on the line before the change
TotalPrice += (BOM.Items.Price * BOM.Items.Quantity)
Else
logfile.WriteLogRecord(mReturnStatus.ToString)
Exit Sub
End If
Next
Dim retval As Integer = BOM.Update
If retval <> 0 Then
logfile.WriteLogRecord("BOM " & BOM.TreeCode & " not updated: " & vbCrLf & vbTab & mReturnStatus.ToString)
Else
'update the price list on the header record 'by hand' because field is not exposed.
sql = String.Format("update oitt set pricelist = {0} where code = '{1}'", MCLPriceList, parent)
miscrs = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
miscrs.DoQuery(sql)
'Then check to make sure it was successful
sql = String.Format("select pricelist from oitt where code = '{0}'", BOM.TreeCode)
miscrs = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
miscrs.DoQuery(sql)
If miscrs.Fields.Item("pricelist").Value <> MCLPriceList Then
logfile.WriteLogRecord("BOM header pricelist change failed for bom " & BOM.TreeCode & ": " & vbCrLf & vbTab & mReturnStatus.ToString)
Else
'update the price list price for the parent bom (if it's a make part).
oItm = oCompany.GetBusinessObject(BoObjectTypes.oItems)
If oItm.GetByKey(parent) Then
If oItm.ProcurementMethod = BoProcurementMethod.bom_Make Then
If Not IsNothing(oItm.PriceList) Then
Try 'pgm is failing sometimes on " if oitm.pricelist.price = mclpricelist with object reference not pointing to instance of an object for some reason
For a As Integer = 0 To oItm.PriceList.Count - 1
oItm.PriceList.SetCurrentLine(a)
If oItm.PriceList.PriceList = MCLPriceList Then
oItm.PriceList.Price = TotalPrice
oItm.PriceList.Currency = "$"
Exit For
End If
Next
Catch ex As Exception
pricelistfail = True
logfile.WriteLogRecord(mReturnStatus.ToString)
End Try
If Not pricelistfail Then
retval = oItm.Update
If retval <> 0 Then
logfile.WriteLogRecord(mReturnStatus.RtnMessage)
End If
End If
Else
mReturnStatus.RtnMessage = -99
mReturnStatus.RtnMessage = ("Price List object is corrupt for item " & oItm.ItemCode & "(Object reference not set to an instance of an object)")
End If
End If
End If
End If
End If
Catch ex As Exception
logfile.WriteLogRecord(mReturnStatus.ToString)
Finally
If Not IsNothing(rs) Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(rs)
rs = Nothing
End If
If Not IsNothing(miscrs) Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(miscrs)
miscrs = Nothing
End If
If Not IsNothing(oItm) Then
System.Runtime.InteropServices.Marshal.ReleaseComObject(oItm)
oItm = Nothing
End If
GC.Collect()
End Try
End Sub
I have also gotten some strange errors in this program after it has been running for hours. I've been assuming that they've been caused by low memory, but I actually got a system.nullreferenceexception on this line:
If oItm.PriceList.PriceList = MCLPriceList Then
And also, this message: '[Microsoft][SQL Native Client]Connection is busy with results for another command'
on this line (near the top of the sub): rs.DoQuery(sql)
but it only occurs after it's been running for several hours. You'll note 'rs' is a local variable and it's used in a loop. I don't instantiate it each time in the loop.
Big problem, long message & I appreciate you taking a look. -
BOM report showing materials and their prices
Hi all,
I'm trying to spool a report that shows the BOM materials and all their different prices so I can sum them up and know the total.
I tried using CS13. I changed the layout so the display can include the standard prices of the materials(as maintained in the material master) but nothing is displayed at all.
Is it possible that I'm using the wrong tcode? What am I doing wrong and how can I get the report?
Thank you very much.Dear Uzoamaka,
Check this links
[Multi level BOM explosion in CS11/12/13 Cost of items are not displayed;
[CS11,CS12,CS13;
Regards
Madhu -
Comparing prices for a BOM with selling and distribution price
Good day
I have been working on a query to bring information for a crystal report required by a client they want to compare the finished BOM with the selling price or distribution price of that BOM. I am not understanding a scenario where this BOM is sold to a particular BP price will definitely vary with BP depending on the terms and special prices. Can anyone help me enhance my query to have valuable results.
SELECT
Distinct T0.Father AS [BOM Product N0.],
T0.Code AS [BOM Item Component],
T2.ItemName AS [BOM Description],
T0.Quantity AS [Component Qty],
T0.Price AS [Comp Cost],
(Select (t3.Factor * t0.Price * t0.Quantity)
from OPLN t3
where t3.ListName = '1.selling price' ) [Selling Price],
(Select (t3.Factor * t0.Price * t0.Quantity)
from OPLN t3
where t3.ListName = '3.distPriceList' ) [Distribution Price],
T0.PriceList AS [Comp Price List],
T1.ListName AS [Price List Name],
T2.AvgPrice
FROM ITT1 T0
INNER JOIN OPLN T1
ON T0.PriceList = T1.ListNum
INNER JOIN OITM T2
ON T0.Code = T2.ItemCode
Where T2.ItmsGrpCod NOT IN (101,110,105)Hi,
Special price is in OSPP / SPP1 /SPP2 tables. Check the table to find the link.
Thanks,
Gordon -
Functinality to compare two material price with reference to BOM in CO
Hi All,
Is there is any functionality in Controlling which can compare the costing for two FERT materials.
or
is there is any functionality where we can compare two material price with reference to BOM in controlling
Please help me to compare the material price with reference to BOM
Regards
nanduHi,
You can use this report to compare two itemizations. The report compares the characteristics item number, item category, cost element, resource, material, cost center, plant/work center, cost center/activity type, operation number, BOM item, assembly indicator, and cost component.
You can access this report as follows:
Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Material Costing ® Cost Estimate with Quantity Structure or Cost Estimate Without Quantity Structure ® Compare
or
Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Information System ® Object Comparisons ® For Material ® Itemization Comparison.
For Detail Please reffer following link:
http://help.sap.com/saphelp_46c/helpdata/en/56/abd108f1a611d28a950000e8214595/content.htm
Thanks and Regards
Binoj M D -
Cost Estimate using Commercial Price 3 of BOM item
Dear Experts,
I am trying to create a cost estimate for certain materials using ABC costing variant. The objective is that the cost estimate should pick up Commercial price 3 from the material masters of the BOM item and then calculate cost estimate for the main product (The costing variant has been customized this way). However, for certain main products, the system is picking up the standard price of the BOM item and in some main products it it correctly picking up the Commercial price.
The BOM items used in the different products are different.
I am unable to understand this behaviour. If anyone has come across any such problem before, please help.
Regards,
Adityahi,
Check the Valuation variant and the strategy sequence whether you have selected the Commercial price 3 as the first priority and the Standard price as the next priority. If u dont want the standard price to be picked u remove this in the strategy sequence.
Further where the system is picking the standard price, possibly the commercial price 3 has not been defined in the material master. Possibly , the system is unable to find the commercial Price 3 and it is fetching the next Price as defined in the valuation variant which is the standard Price.
assign points if useful.
regards,
Maybe you are looking for
-
FIX for Canon MP 600 after leopard installation
I discovered a fix for the Canon MP 600 after the leopard installation. After many challenges and troubleshooting with no positive results I tried something that worked! Go to Applications on the HD, choose Utilities, Choose airport Utility.app. It w
-
Some video's won't open in flash player
I have windows XP service pack 3 and IE 8. On some web sites, some but not all of the video's won't open.I get no error code or anything, but there is what looks like a capital "T" in the upper left corner of the box where the video should be. There
-
Gurus... 1. How to set PO output to email...pls tell me the procedure in brief.. 2. In PO print in ME9F we are not getting the TRIAL PRINT, may be because the OUPUT MESSAGE HAS executed (which will show a GREEN CHECK MARK..but it mus
-
30EA1: Closing Query Result & Script Output Windows
It would be nice if you could close these output windows by middle mouse button clicking. You can close object viewing windows (tables, procedures) & SQL worksheet windows this way. Thanks, Justin
-
Greetings All, I had my service installed today, 8-5-11. Everything is great! Installer was great and I am happy. When I try to log in to My Verizon, it says they do not have any account by my name. I then type in my phone number and the same