Reg.Calculate Raw material cost(Fabric)+Process cost(semifinished -cutting)
Dear Friends
Please consider our below scenario
In AFS, PO is created and stock is maintained in unrestricted (Raw material)
and then Production order is created for Cut pcs and Raw material is issued to production order through 261 mvt type
next Cut pcs is received against the production order through 101 Mvt type. Now operation cost is not added with the Raw material cost, only the Raw material cost is represents in MIGO-> FOOTER - QUANTITY->Quantity in LC field. What to do to calculate the process cost too.
When we receive the cut pcs what we attached as component to the cutpcs's cost is calculated, the charge for Cutting is not calculated. we want both cutpcs charge(10.00 per pc)+component cost(raw mat. 180.00 per 1 kg)
Cut pcs 10 pcs * 10 Rs = 100 Rs
Raw mat 10 kg * 180 Rs = 1800 Rs
the total cost is 1900 Rs should come in that field
Thanks
Rajakumar.K
Hi,
Process cost is picked up though the activity you maintained in the routing.
Pre requites
1. Activity planning should be done through KP26.
2. Work center should have right formula
3. The standard value key which you using in routing should be there in workcenter formula.
In production order ---> Goto -
> Cost -
> Cost analysis
check whether you getting activity cost(In yours case Cutting cost)
Regards,
Vishal
Similar Messages
-
Raw Material Consumption to Process Orders
Hi Friends,
I need help with changing the way how we consume raw materials in our manufacturing organization.
Current Process:
A. Receive product A in Warehouse, movement type 101. Debit Inventory Account, and Credit GR/IR.
B. Move product A to a storage location (out of Warehouseu2019s custody). Movement type 311. No impact to P&L, as no accounting entries.
C. Consume product A in a u2018Process Orderu2019 from that storage location 311. Debit Consumption Account, and Credit Inventory Account.
Product A is listed in Bill of Materials and has to be issued to process orders for final consumption u2013 to give production variance as we are on standard costing system.
Desired Process:
We want to have stronger controls in our organization. We want to hit P&L in step B, as soon as Warehouse issues items out. This can be done using movement type 201 GI for Cost Center.
But we also desire to see final consumption happening in process orders, as all our BOMs and standard costs account for the consumption of product A.
Please advice how do we issue items to a process order that have already been issued to a Cost Center. What is it that I am missing?
Thanks,
Meet AI believe we will stick with our current process. See Ajay's reply on the link below:
Raw Material Consumption to Process Orders
Thanks and regards,
Meet A. -
Volatile raw material price and actual costing
Hello,
We are investigating the use of material ledger / actual costing in SAP. We have multiple production plants and multiple distribution warehouses that would be modeled as a plant.
We are worried that due to the extreme volatility of our raw material prices and the fact that some of our products have low volume or slow turnover in some warehouses, our cost of goods sold in SAP using material ledger / actual costing will be difficult to explain and not reflective of actual conditions.
For example, if a product is placed in Warehouse A in month 1, receives very little new product in months 2-4, and then we sell a lot of that product from warehouse A in month 4, the cost of those goods will be very close to the month 1 cost. We are worried about how that will affect our cost of goods sold.
We would like to hear from other companies that have similar conditions to see if this really causes any problems using actual costing / material ledger.
Thanks,
JimmyHello,
Thank you for your response. We would like to understand why other companies do not have a problem with this behavior. Our company is concerned that this will reduce visibility of raw material price fluctuations in COGS (and reports that use COGS data), and make it more difficult to explain COGS behavior. Note that we have some reports on COGS data by material.
In our current system, COGS consumes inventory at the average price accross all warehouses.
Thanks,
Jimmy -
Raw material planning for process industry.
I am going to implement SAP R/3 in process industry where i get raw material from farmers.I have to accept all raw material from surrounding villages because it's a government rule.So its necessary that all farmers should produce well quality yield. For that they must follow standard procedure to grow their crop.Is it possible to plan this using SAP PP?
How to face this type of sceanrieo?Hi kiran Ghule,
With the functions of the Quality Management (QM) module, you can implement it.
The QM application component supports tasks associated with quality planning, quality inspection and quality control. In addition, it controls the creation of quality certificates you can do this
Explore your self in this module if any problem then come back.
Regards
R.Brahmankar -
Raw material consumption - subcontrat process
I got a PO to investigate why raw material consumption is not posted in subcontracting scenario
When i investigated i realized that user might have unticked 543 movement line in MIGO while posting Goods receipt of finished product ..
Invoice is already paid for this PO vendor
All postings ok except consumption of raw material.
Only Consumption of raw material cant be posted manually isnt it
How we correct these instances ?
I can think of below, suggest if any better
1. Credit memo
2. reverse GR for finished product
3. post GR again correctly checking 101 and 543
4. InvoiceDear
Below link will help you
http://wiki.sdn.sap.com/wiki/display/SCM/Subcontracting+Process
http://www.sap-img.com/materials/sub-contracting-cycle.htm
http://www.sap-basis-abap.com/pp/subcontracting-in-sap.htm
http://www.sap-basis-abap.com/sapmo005.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-log-mm/subcontracting-process-in-mm-2179995
Regards
Aamir -
Reg. Raw material sales from unresticted to out side vendor
Dear Friends
1. I want to sale 100kg of raw material to outside vendor ,what is the MM part.
2. I want to return the old material to the vendor and get back new materials,what are the prerequisites.
3. We don't want release stretagy for one particular vendor out of 500 vendors how to configure this
Kindly advise me
Thanks
Rajakumar.K1. I want to sale 100kg of raw material to outside vendor ,what is the MM part.\
- extend material to sales view and create a sales order - PGI and billing. you also need to create that vendor as a customer
2. I want to return the old material to the vendor and get back new materials,what are the prerequisites.
- many options are there.. 1. refer the old PO and return through 122 movement type. 2. create a return PO and return with 161 movement type. or create return delivery and return with outbound delivery(it involves lot of config)
3. We don't want release stretagy for one particular vendor out of 500 vendors how to configure this
what are your criteria's for release? -
Reg. Process cost and raw material cost add
Dear Friends
We are doing subcontracting that is E & L combination main material is Semifinished and component is Raw material, when I do goods receipt component is going to consumption through 543 mvt type(process order consumption),but the raw material cost and process cost is not added only the process cost is comming. what to do in this case. Pls help me, how to add both of cost.
Thanks
Rajakumar.Khi,
What is the price control in accounting view you have maintained for semifinished? If it is S then it will not get updated. Only if it is V, system will capture raw material & process cost to the Semi Finished.
regards,
JP -
Hi,
any one can help in this issue.
i am not getting the raw materila cost & manfacture conversion cost for for the bom of FG - SFG - SFG - SFG- RAW
FG - finished goods,
SFG - semi finished goods
RAW - raw material.
plz provide the solution.
raw material and manfacture conversion cost is calculated in PERFORM z_process_data. subroutine.
REPORT z_co_production_cost_nsk.
TABLES: afko, bkpf, t001w , caufv.
TYPE-POOLS: kkblo,
slis.
DATA: d_datefrom LIKE sy-datum,
d_dateto LIKE sy-datum,
d_repid LIKE sy-repid,
d_uname LIKE sy-uname,
d_returncode TYPE i,
d_tabix TYPE i,
d_kokrs LIKE tka01-kokrs,
d_waers LIKE tka01-waers,
wa_fieldcatalog TYPE slis_fieldcat_main,
wa_listevents TYPE slis_alv_event,
wa_listlayout TYPE slis_layout_alv,
wa_print_info TYPE slis_print_alv,
wa_listheader TYPE slis_listheader,
d_headerlines TYPE i.
DATA: BEGIN OF t_caufv OCCURS 0,
aufnr TYPE caufv-aufnr,
werks TYPE caufv-werks,
objnr TYPE covp-objnr,
gamng TYPE caufv-gamng,
plnbez TYPE caufv-plnbez,
rsnum TYPE caufv-rsnum,
END OF t_caufv.
*Added by Anand Bothra on 24/11/2003
DATA: t_ab_caufv LIKE t_caufv OCCURS 0 WITH HEADER LINE.
DATA: t_temp_caufv LIKE t_caufv OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_afpo OCCURS 0,
aufnr TYPE afpo-aufnr,
posnr TYPE afpo-posnr,
wemng TYPE afpo-wemng,
amein TYPE afpo-amein,
charg TYPE afpo-charg,
END OF t_afpo.
DATA: BEGIN OF t_afpo1 OCCURS 0,
aufnr TYPE afpo-aufnr,
refaufnr TYPE afpo-aufnr,
objnr TYPE caufv-objnr,
rsnum TYPE afko-rsnum,
wemng TYPE afpo-wemng,
werks TYPE afpo-dwerk,
charg TYPE afpo-charg,
END OF t_afpo1.
DATA: BEGIN OF t_makt OCCURS 0,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF t_makt.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv,
t_listevents TYPE slis_t_event,
t_sortsequence TYPE slis_t_sortinfo_alv,
t_listheader TYPE slis_t_listheader.
DATA: BEGIN OF t_production_costs OCCURS 0,
objnr TYPE covp-objnr, " Object Number
kstar TYPE covp-kstar, " Cost Element
wkgbtr TYPE covp-wkgbtr, " Cost of Line Item in CO area curr
mbgbtr TYPE covp-mbgbtr, " Quantity of Line Item
matnr TYPE covp-matnr, " Material Number
kokrs TYPE covp-kokrs, " Controlling Area
belnr TYPE covp-belnr, " Cost Accounting Document
buzei TYPE covp-buzei, " Item Number in Document
END OF t_production_costs.
DATA: BEGIN OF t_production_costs1 OCCURS 0,
objnr TYPE covp-objnr, " Object Number
kstar TYPE covp-kstar, " Cost Element
wkgbtr TYPE covp-wkgbtr, " Cost of Line Item in CO area curr
mbgbtr TYPE covp-mbgbtr, " Quantity of Line Item
kokrs TYPE covp-kokrs, " Controlling Area
belnr TYPE covp-belnr, " Cost Accounting Document
buzei TYPE covp-buzei, " Item Number in Document
END OF t_production_costs1.
DATA t_production_costs2 LIKE t_production_costs1
OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_suborders OCCURS 0,
aufnr TYPE caufv-aufnr,
prevaufnr TYPE caufv-aufnr,
objnr TYPE covp-objnr,
rsnum TYPE caufv-rsnum,
END OF t_suborders.
DATA: BEGIN OF t_outputtab OCCURS 0,
plnbez LIKE afko-plnbez, " Material Number
objnr LIKE caufv-objnr, " Object Number
maktx LIKE makt-maktx, " Material Description
charg LIKE afpo-charg, " Batch Number
aufnr LIKE afko-aufnr, " Production Order Number
gamng LIKE caufv-gamng, " Total Order Quantity
wemng LIKE afpo-wemng, " Goods Receipt Quantity
amein LIKE afpo-amein, " Unit of Measure
yield TYPE p DECIMALS 2, " Percentage Yield
totalrmcost TYPE p DECIMALS 2, " Total Raw Material Cost
totalpmcost TYPE p DECIMALS 2, " Total Packing Mat. Cost
mfgconvcost TYPE p DECIMALS 2, " Manu. Conversion Cost
pkgconvcost TYPE p DECIMALS 2, " Packing Conv. Cost
rmperunit TYPE p DECIMALS 2, " Raw Cost per unit
pmperunit TYPE p DECIMALS 2, " Pack Mat cost per unit
ccperunit TYPE p DECIMALS 2, " Conv Cost per unit
totperunit TYPE p DECIMALS 2, " Total Cost per unit
waers LIKE tka01-waers, " Currency Key for CO Area
END OF t_outputtab.
*Added by Anand Bothra on 24/11/2003.
DATA: t_ab_outputtab LIKE t_outputtab OCCURS 0 WITH HEADER LINE,
t_temp_outputtab LIKE t_outputtab OCCURS 0 WITH HEADER LINE.
BEGIN OF INSERTION VIP110703
DATA:wa_prev_outputtab LIKE LINE OF t_outputtab,
wa_production_costs LIKE LINE OF t_production_costs.
DATA:prev_totmatqty TYPE p DECIMALS 2,
prev_tot_mfgconv_cst TYPE p DECIMALS 2,
grand_mat_qty TYPE p DECIMALS 2 ,
tmp_aufnr TYPE caufv-aufnr.
DATA: BEGIN OF t_suborders_propcost OCCURS 0,
aufnr TYPE caufv-aufnr,
prevaufnr TYPE caufv-aufnr,
objnr TYPE covp-objnr,
rsnum TYPE caufv-rsnum,
proprmcost TYPE p DECIMALS 2,
prop_mfg_convcost TYPE p DECIMALS 2,
END OF t_suborders_propcost.
DATA: wa_suborders LIKE LINE OF t_suborders.
END OF INSERTION VIP110703
BEGIN OF INSERTION VIP111003
DATA: prev_aufnr TYPE caufv-aufnr,
prev_matnr TYPE mara-matnr,
curr_matnr TYPE mara-matnr.
DATA: bln_suborder ,
ratio TYPE p DECIMALS 5.
BEGIN OF INSERTION VIP111003
*Added by Anand Bothra on 28/11/2003
DATA: d_flag TYPE c.
SELECTION-SCREEN BEGIN OF BLOCK zblock1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_plnbez FOR afko-plnbez,
s_aufnr FOR afko-aufnr,
"Added By Vivek on 29.11.2005
s_auart FOR caufv-auart obligatory.
PARAMETERS p_werks LIKE t001w-werks OBLIGATORY.
SELECTION-SCREEN END OF BLOCK zblock1.
SELECTION-SCREEN BEGIN OF BLOCK zblock2 WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_monat FOR bkpf-monat NO-EXTENSION OBLIGATORY.
PARAMETERS p_gjahr LIKE bkpf-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK zblock2.
SELECTION-SCREEN BEGIN OF BLOCK zblock3 WITH FRAME TITLE text-022.
PARAMETERS: p_detsum RADIOBUTTON GROUP rad,
p_sum RADIOBUTTON GROUP rad.
SELECTION-SCREEN END OF BLOCK zblock3.
INITIALIZATION.
d_repid = sy-repid.
d_uname = sy-uname.
p_werks = 'G001'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name EQ 'P_WERKS'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON s_monat.
IF s_monat-high IS INITIAL.
IF NOT ( s_monat-low BETWEEN 1 AND 12 ).
MESSAGE e398(00) WITH text-023 text-024 space space.
ENDIF.
ELSE.
IF ( ( s_monat-low LT 1 ) OR ( s_monat-high GT 12 ) ).
MESSAGE e398(00) WITH text-023 text-024 text-025 space.
ENDIF.
ENDIF.
START-OF-SELECTION.
PERFORM z_get_period_dates.
PERFORM z_select_prod_orders.
PERFORM z_select_prod_costs.
PERFORM z_select_addl_prod_costs.
PERFORM z_select_mat_desc.
END-OF-SELECTION.
IF d_returncode EQ 0.
PERFORM z_process_data.
*Added by Anand Bothra on 24/11/2004.
PERFORM z_select_to_print.
PERFORM z_prepare_fieldcat.
PERFORM z_get_alv_events.
PERFORM z_define_sortsequence.
PERFORM z_define_layout.
PERFORM z_display_list.
*Added by Anand Botra on 25/11/2003.
PERFORM z_export_to_excel.
PERFORM z_send_mail_and_download.
ELSE.
MESSAGE i017(p5).
ENDIF.
*& Form Z_GET_PERIOD_DATES
text
--> p1 text
<-- p2 text
FORM z_get_period_dates.
Determine the date range from the fiscal period range and
fiscal year entered on the selection screen
DATA: d_firstdate LIKE sy-datum,
d_lastdate LIKE sy-datum,
t_dates LIKE scscp_period_str OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
EXPORTING
i_gjahr = p_gjahr
i_periv = 'V3'
IMPORTING
e_first_day = d_firstdate
e_last_day = d_lastdate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
CALL FUNCTION 'CSCP_PARA1_GET_PERIODS'
EXPORTING
i_datuv = d_firstdate
i_datub = d_lastdate
i_timeunit = 'M'
TABLES
et_dates = t_dates.
SORT t_dates BY sindex.
DELETE t_dates INDEX 1.
LOOP AT t_dates.
SUBTRACT: 1 FROM t_dates-sindex,
1 FROM t_dates-datub.
MODIFY t_dates TRANSPORTING sindex datub.
ENDLOOP.
CLEAR: d_datefrom,
t_dates.
READ TABLE t_dates WITH KEY sindex = s_monat-low.
d_datefrom = t_dates-datuv.
CLEAR d_dateto.
IF s_monat-high IS INITIAL.
d_dateto = t_dates-datub.
ELSE.
CLEAR t_dates.
READ TABLE t_dates WITH KEY sindex = s_monat-high.
d_dateto = t_dates-datub.
ENDIF.
ENDFORM. " Z_GET_PERIOD_DATES
*& Form Z_SELECT_PROD_ORDERS
text
--> p1 text
<-- p2 text
FORM z_select_prod_orders.
Select all production orders as per the selection criteria provided
DATA: d_dlv_code LIKE jstat-stat,
d_teco_code LIKE jstat-stat,
t_status LIKE jstat OCCURS 0 WITH HEADER LINE.
SELECT SINGLE name1 INTO t001w-name1 FROM t001w WHERE werks = p_werks.
if s_plnbez-low eq space and s_plnbez-high eq space.
endif.
SELECT aufnr werks objnr gamng rsnum plnbez
INTO CORRESPONDING FIELDS OF
TABLE t_caufv FROM caufv
WHERE aufnr IN s_aufnr
AND auart IN ('PP01', 'LL02') : BY VIVEK
AND auart in s_auart " Added By Vivek on 29.11.2005
AND werks = p_werks
AND plnbez IN s_plnbez
AND getri BETWEEN d_datefrom AND d_dateto
ORDER BY aufnr.
d_returncode = sy-subrc.
IF d_returncode NE 0.
STOP.
ENDIF.
Filter out only those production orders that have a status
DLV (Delivered) or TECO (Technically Confirmed).
CLEAR: d_dlv_code,
d_teco_code.
PERFORM z_get_status_code USING 'DLV' CHANGING d_dlv_code.
PERFORM z_get_status_code USING 'TECO' CHANGING d_teco_code.
LOOP AT t_caufv.
REFRESH t_status.
CALL FUNCTION 'STATUS_READ'
EXPORTING
CLIENT = SY-MANDT
objnr = t_caufv-objnr
only_active = 'X'
IMPORTING
OBTYP =
STSMA =
STONR =
TABLES
status = t_status
EXCEPTIONS
object_not_found = 1
OTHERS = 2
IF sy-subrc EQ 0.
CLEAR t_status.
READ TABLE t_status WITH KEY stat = d_dlv_code.
IF sy-subrc NE 0.
CLEAR t_status.
READ TABLE t_status WITH KEY stat = d_teco_code.
IF sy-subrc NE 0.
DELETE t_caufv.
ENDIF.
ENDIF.
ELSE.
DELETE t_caufv.
ENDIF.
ENDLOOP.
IF t_caufv[] IS INITIAL.
d_returncode = 4.
STOP.
ENDIF.
Added by Anand Bothra on 24/11/2003**********
t_ab_caufv[] = t_caufv[].
Added by Anand Bothra on 28/11/2003.
IF ( s_plnbez-low EQ space AND s_plnbez-high EQ space ).
IF ( s_aufnr-low EQ space AND s_aufnr-high EQ space ).
d_flag = 'N'.
ELSE.
d_flag = 'Y'.
ENDIF.
ELSE.
d_flag = 'Y'.
ENDIF.
IF d_flag = 'Y'.
Added by Anand Bothra on 21/11/2003.**********
*Get the batch number of the entered order
DATA: itab_afpo LIKE afpo OCCURS 100 WITH HEADER LINE.
DATA: BEGIN OF t_ab_charg OCCURS 0,
*Added by Anand on 27/11/2003
aufnr LIKE afpo-aufnr,
charg LIKE afpo-charg,
END OF t_ab_charg.
LOOP AT t_caufv.
SELECT aufnr charg FROM afpo INTO t_ab_charg WHERE aufnr =
t_caufv-aufnr.
APPEND t_ab_charg.
CLEAR t_ab_charg.
ENDSELECT.
ENDLOOP.
IF sy-subrc = 0.
SELECT * FROM afpo INTO TABLE itab_afpo WHERE charg = d_ab_charg.
ENDIF.
LOOP AT t_ab_charg.
SELECT * FROM afpo INTO itab_afpo WHERE charg = t_ab_charg-charg.
APPEND itab_afpo.
CLEAR itab_afpo.
ENDSELECT.
ENDLOOP.
CLEAR t_caufv.
REFRESH t_caufv.
*Get all the orders with the same batch number.
LOOP AT itab_afpo.
SELECT aufnr werks objnr gamng rsnum plnbez
INTO CORRESPONDING FIELDS OF
t_caufv FROM caufv WHERE aufnr = itab_afpo-aufnr.
APPEND t_caufv.
ENDSELECT.
ENDLOOP.
CLEAR t_caufv.
SORT t_caufv BY aufnr.
delete adjacent duplicates from t_caufv comparing all fields.
ENDIF.
SELECT aufnr posnr wemng amein charg INTO TABLE t_afpo
FROM afpo FOR ALL ENTRIES IN t_caufv
WHERE aufnr = t_caufv-aufnr.
d_returncode = sy-subrc.
IF d_returncode NE 0.
STOP.
ENDIF.
SORT t_afpo BY aufnr.
ENDFORM. " Z_SELECT_PROD_ORDERS
*& Form Z_SELECT_MAT_DESC
text
--> p1 text
<-- p2 text
FORM z_select_mat_desc.
Get the Description of all materials
SELECT matnr maktx INTO TABLE t_makt FROM makt
FOR ALL ENTRIES IN t_caufv
WHERE matnr = t_caufv-plnbez
AND spras = sy-langu.
ENDFORM. " Z_SELECT_MAT_DESC
*& Form Z_PROCESS_DATA
text
--> p1 text
<-- p2 text
FORM z_process_data.
Process the data from all production orders and prepare the output
table for display appropriately
DATA: d_mbgbtr TYPE p DECIMALS 3,
loop_cnt TYPE i.
REFRESH t_outputtab.
LOOP AT t_caufv.
CLEAR t_outputtab.
MOVE-CORRESPONDING t_caufv TO t_outputtab.
CLEAR t_makt.
READ TABLE t_makt WITH KEY matnr = t_caufv-plnbez.
IF sy-subrc EQ 0.
MOVE t_makt-maktx TO t_outputtab-maktx.
ENDIF.
CLEAR t_afpo.
READ TABLE t_afpo WITH KEY aufnr = t_caufv-aufnr.
IF sy-subrc EQ 0.
MOVE: t_afpo-wemng TO t_outputtab-wemng,
t_afpo-amein TO t_outputtab-amein,
t_afpo-charg TO t_outputtab-charg.
ENDIF.
IF t_outputtab-gamng NE 0.
COMPUTE t_outputtab-yield =
( t_outputtab-wemng / t_outputtab-gamng ) * 100.
ENDIF.
APPEND t_outputtab.
ENDLOOP.
SORT t_production_costs BY objnr kstar.
LOOP AT t_production_costs.
AT NEW objnr.
CLEAR: d_mbgbtr, d_tabix, t_outputtab.
READ TABLE t_outputtab WITH KEY objnr = t_production_costs-objnr.
MOVE sy-tabix TO d_tabix.
" Add up the Raw Material and Manufacturing Conversion
" Costs from the previous stage production order
CLEAR loop_cnt .
LOOP AT t_suborders WHERE aufnr = t_outputtab-aufnr.
commented by anand bothra on 20/11/2003
ADD 1 TO loop_cnt.
IF loop_cnt > 1.
EXIT.
ENDIF.
LOOP AT t_production_costs1 WHERE objnr = t_suborders-objnr.
CASE t_production_costs1-kstar.
WHEN '0005000000' OR '0005010000'. " Raw Material Cost
BEGIN OF deletion VIP110703
ADD t_production_costs1-wkgbtr TO t_outputtab-totalrmcost.
END OF deletion VIP110703
ADD t_production_costs1-wkgbtr TO prev_totmatqty.
WHEN '0000500100'. " Manufacturing Conversion Cost
ADD t_production_costs1-wkgbtr TO prev_tot_mfgconv_cst.
BEGIN OF deletion VIP110703
ADD t_production_costs1-wkgbtr TO t_outputtab-mfgconvcost.
END OF deletion VIP110703
ENDCASE.
ENDLOOP.
BEGIN OF INSERTION VIP110703
READ TABLE t_production_costs INTO wa_production_costs
WITH KEY objnr = t_production_costs-objnr
matnr = wa_prev_outputtab-plnbez.
IF sy-subrc = 0.
IF ( wa_production_costs-mbgbtr NE
wa_prev_outputtab-wemng ) .
prev_totmatqty = ( prev_totmatqty /
wa_prev_outputtab-wemng ) *
wa_production_costs-mbgbtr.
prev_tot_mfgconv_cst = ( prev_tot_mfgconv_cst /
wa_prev_outputtab-wemng ) *
wa_production_costs-mbgbtr.
ENDIF.
ENDIF.
LOOP AT t_suborders_propcost
WHERE prevaufnr = wa_prev_outputtab-aufnr.
t_suborders_propcost-proprmcost = prev_totmatqty.
t_suborders_propcost-prop_mfg_convcost = prev_tot_mfgconv_cst
MODIFY t_suborders_propcost.
ENDLOOP.
clear: prev_totmatqty,
prev_tot_mfgconv_cst.
END OF INSERTION VIP110703
BEGIN OF INSERTION VIP111003
CLEAR: wa_prev_outputtab,
wa_production_costs.
READ TABLE t_outputtab INTO wa_prev_outputtab
WITH KEY aufnr = t_suborders-prevaufnr.
ratio = 1.
IF sy-subrc = 0.
READ TABLE t_production_costs INTO wa_production_costs
WITH KEY objnr = t_outputtab-objnr
matnr = wa_prev_outputtab-plnbez.
IF sy-subrc = 0.
IF ( wa_production_costs-mbgbtr NE
wa_prev_outputtab-wemng ) .
ratio = wa_production_costs-mbgbtr /
wa_prev_outputtab-wemng.
prev_totmatqty = ( prev_totmatqty /
wa_prev_outputtab-wemng ) *
wa_production_costs-mbgbtr.
prev_tot_mfgconv_cst = ( prev_tot_mfgconv_cst /
wa_prev_outputtab-wemng ) *
wa_production_costs-mbgbtr.
ENDIF.
ENDIF.
ENDIF.
LOOP AT t_suborders_propcost
WHERE prevaufnr = wa_prev_outputtab-aufnr
AND aufnr = t_outputtab-aufnr.
t_suborders_propcost-proprmcost = prev_totmatqty.
t_suborders_propcost-prop_mfg_convcost = prev_tot_mfgconv_cst.
MODIFY t_suborders_propcost.
ENDLOOP.
*Commented by Anand Bothra on 20/11/2003.
CLEAR: prev_totmatqty,
prev_tot_mfgconv_cst.
BEGIN OF INSERTION VIP111003
ENDLOOP.
ENDAT.
AT END OF kstar.
SUM.
CASE t_production_costs-kstar.
WHEN '0000500200'. " Packing Conversion Costs
t_outputtab-pkgconvcost = t_production_costs-wkgbtr.
WHEN '0005000500'. " Semi-Finished Cost/Quantity
MOVE t_production_costs-mbgbtr TO d_mbgbtr.
WHEN '0005050000' OR '0005050001' OR '0005050002'.
" Packing Mat Costs
ADD t_production_costs-wkgbtr TO t_outputtab-totalpmcost.
WHEN '0005000000' OR '0005010000'.
ADD t_production_costs-wkgbtr TO t_outputtab-totalrmcost.
WHEN '0000500100'. " Manufacturing Conversion Cost
ADD t_production_costs-wkgbtr TO t_outputtab-mfgconvcost.
ENDCASE.
ENDAT.
AT END OF objnr.
MOVE d_waers TO t_outputtab-waers.
Calculations for the Production Order
" Determine the RM Cost/Unit and Mfg Conv Cost/Unit
CLEAR t_afpo1.
READ TABLE t_afpo1 WITH KEY aufnr = t_outputtab-aufnr.
IF ( ( sy-subrc EQ 0 ) AND ( t_afpo1-wemng NE 0 ) ).
BEGIN OF insertion VIP110703
tmp_aufnr = t_production_costs-objnr+2(12).
LOOP AT t_suborders_propcost
WHERE aufnr = tmp_aufnr .
ADD t_suborders_propcost-proprmcost TO t_outputtab-totalrmcost
ADD t_suborders_propcost-prop_mfg_convcost TO
t_outputtab-mfgconvcost.
ENDLOOP.
END OF insertion VIP110703
BEGIN OF insertion VIP111003
CLEAR: t_suborders_propcost , tmp_aufnr.
READ TABLE t_suborders_propcost
WITH KEY aufnr = t_outputtab-aufnr.
IF sy-subrc = 0.
t_suborders_propcost-proprmcost =
t_suborders_propcost-proprmcost * ratio.
ADD t_suborders_propcost-proprmcost
TO t_outputtab-totalrmcost.
t_suborders_propcost-prop_mfg_convcost =
t_suborders_propcost-prop_mfg_convcost * ratio.
ADD t_suborders_propcost-prop_mfg_convcost
TO t_outputtab-mfgconvcost.
tmp_aufnr = t_suborders_propcost-prevaufnr.
bln_suborder = 'T'.
WHILE bln_suborder = 'T'.
CLEAR: t_suborders_propcost .
READ TABLE t_suborders_propcost
WITH KEY aufnr = tmp_aufnr.
IF sy-subrc = 0.
t_suborders_propcost-proprmcost =
t_suborders_propcost-proprmcost * ratio.
ADD t_suborders_propcost-proprmcost
TO t_outputtab-totalrmcost.
t_suborders_propcost-prop_mfg_convcost =
t_suborders_propcost-prop_mfg_convcost * ratio.
ADD t_suborders_propcost-prop_mfg_convcost
TO t_outputtab-mfgconvcost.
tmp_aufnr = t_suborders_propcost-prevaufnr.
ELSE.
bln_suborder = 'F'.
CLEAR tmp_aufnr.
ENDIF.
ENDWHILE.
ENDIF.
END OF insertion VIP111003
END OF deletion VIP110703
t_outputtab-mfgconvcost = ( t_outputtab-mfgconvcost /
t_afpo1-wemng ) * d_mbgbtr.
t_outputtab-totalrmcost = ( t_outputtab-totalrmcost /
t_afpo1-wemng ) * d_mbgbtr.
END OF deletion VIP110703
ENDIF.
IF t_outputtab-wemng NE 0.
t_outputtab-rmperunit = t_outputtab-totalrmcost /
t_outputtab-wemng.
" PM Cost Per Unit = Total PM Cost / Quantity Delivered
t_outputtab-pmperunit = t_outputtab-totalpmcost
/ t_outputtab-wemng.
" Conv Cost Cost Per Unit = (Manu Conv Cost + Pack Conv Cost)
" / Qty Delv
t_outputtab-ccperunit = ( t_outputtab-mfgconvcost
+ t_outputtab-pkgconvcost )
/ t_outputtab-wemng.
ENDIF.
" Total Cost Per Unit = (RM Cost per unit + PM Cost per Unit
" + Conv Cost per unit)
t_outputtab-totperunit = t_outputtab-rmperunit
+ t_outputtab-pmperunit
+ t_outputtab-ccperunit.
Update the calculated values in the internal table
CHECK d_tabix GT 0.
MODIFY t_outputtab INDEX d_tabix
TRANSPORTING totalrmcost totalpmcost
mfgconvcost pkgconvcost
rmperunit pmperunit
ccperunit totperunit waers.
BEGIN OF DELETION VIP110703
MOVE t_outputtab TO wa_prev_outputtab.
END OF DELETION VIP110703
ENDAT.
ENDLOOP.
ENDFORM. " Z_PROCESS_DATA
*& Form Z_DISPLAY_LIST
text
--> p1 text
<-- p2 text
FORM z_display_list.
Display the Report
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = d_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
is_layout = wa_listlayout
it_fieldcat = t_fieldcatalog
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = t_sortsequence
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = ' '
it_events = t_listevents
IT_EVENT_EXIT =
is_print = wa_print_info
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = t_outputtab
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.
SET PF-STATUS 'Z_AB_STANDARD'.
ENDFORM. " Z_DISPLAY_LIST
*& Form Z_FILL_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM z_fill_fieldcatalog USING p_rownum LIKE sy-curow
p_colnum LIKE sy-cucol
p_fieldname TYPE slis_fieldname
p_tabname TYPE slis_tabname
p_reffield TYPE dd03p-fieldname
p_reftable TYPE dd03p-tabname
p_qfield TYPE slis_fieldname
p_qtab TYPE slis_tabname
p_sum
p_stext
p_mtext
p_ltext
p_datatype
p_outputlen.
Prepare the fields for ALV list output
CLEAR wa_fieldcatalog.
wa_fieldcatalog-row_pos = p_rownum.
wa_fieldcatalog-col_pos = p_colnum.
wa_fieldcatalog-fieldname = p_fieldname.
wa_fieldcatalog-tabname = p_tabname.
wa_fieldcatalog-ref_fieldname = p_reffield.
wa_fieldcatalog-ref_tabname = p_reftable.
wa_fieldcatalog-qfieldname = p_qfield.
wa_fieldcatalog-qtabname = p_qtab.
wa_fieldcatalog-do_sum = p_sum.
wa_fieldcatalog-seltext_s = p_stext.
wa_fieldcatalog-seltext_m = p_mtext.
wa_fieldcatalog-seltext_l = p_ltext.
wa_fieldcatalog-datatype = p_datatype.
wa_fieldcatalog-outputlen = p_outputlen.
APPEND wa_fieldcatalog TO t_fieldcatalog.
ENDFORM. " Z_FILL_FIELDCATALOG
*& Form Z_PREPARE_FIELDCAT
text
--> p1 text
<-- p2 text
FORM z_prepare_fieldcat.
Append all the display fields into the field catalog internal table
First Row
PERFORM z_fill_fieldcatalog USING 1 1 'PLNBEZ' 'T_OUTPUTTAB'
space 'AFKO' space space
space space space space space
0.
PERFORM z_fill_fieldcatalog USING 1 2 'MAKTX' 'T_OUTPUTTAB'
space 'MAKT' space space
space space space space space
0.
PERFORM z_fill_fieldcatalog USING 1 3 'CHARG' 'T_OUTPUTTAB'
space 'AFPO' space space
space space space space space
0.
Second Row
PERFORM z_fill_fieldcatalog USING 2 1 'AUFNR' 'T_OUTPUTTAB'
space 'AFKO' space space
space space space space space
0.
PERFORM z_fill_fieldcatalog USING 2 2 'GAMNG' 'T_OUTPUTTAB'
space 'CAUFV' 'AMEIN' space
'X' space space space space
0.
PERFORM z_fill_fieldcatalog USING 2 3 'WEMNG' 'T_OUTPUTTAB'
space 'AFPO' 'AMEIN' space
'X' space space space space
0.
PERFORM z_fill_fieldcatalog USING 2 4 'AMEIN' 'T_OUTPUTTAB'
space 'AFPO' space space
space space space space space
0.
PERFORM z_fill_fieldcatalog USING 2 5 'YIELD' 'T_OUTPUTTAB'
space space space space
space text-010 text-010 text-010
'QUAN' 17.
Third Row
PERFORM z_fill_fieldcatalog USING 3 1 'TOTALRMCOST' 'T_OUTPUTTAB'
space space space space
'X' text-011 text-011 text-011
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 3 2 'TOTALPMCOST' 'T_OUTPUTTAB'
space space space space
'X' text-012 text-012 text-012
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 3 3 'MFGCONVCOST' 'T_OUTPUTTAB'
space space space space
'X' text-013 text-013 text-013
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 3 4 'PKGCONVCOST' 'T_OUTPUTTAB'
space space space space
'X' text-014 text-014 text-014
'CURR' 21.
Fourth Row
PERFORM z_fill_fieldcatalog USING 4 1 'RMPERUNIT' 'T_OUTPUTTAB'
space space space space
space text-015 text-015 text-015
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 4 2 'PMPERUNIT' 'T_OUTPUTTAB'
space space space space
space text-016 text-016 text-016
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 4 3 'CCPERUNIT' 'T_OUTPUTTAB'
space space space space
space text-017 text-017 text-017
'CURR' 21.
PERFORM z_fill_fieldcatalog USING 4 4 'TOTPERUNIT' 'T_OUTPUTTAB'
space space space space
space text-018 text-018 text-018
'CURR' 21.
ENDFORM. " Z_PREPARE_FIELDCAT
*& Form Z_GET_ALV_EVENTS
text
--> p1 text
<-- p2 text
FORM z_get_alv_events.
Returns table of possible events for a list type
REFRESH t_listevents.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
et_events = t_listevents
EXCEPTIONS
list_type_wrong = 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.
ELSE.
CLEAR: wa_listevents, d_tabix.
READ TABLE t_listevents WITH KEY name = slis_ev_top_of_page
INTO wa_listevents.
d_tabix = sy-tabix.Hi Sai,
You can try using MB51, use filter movement type 261. Add a filter for the posting date coverage.
Then proceed. Click on the icon DETAIL LIST.
Then click on the SUBTOTAL, add MATERIAL as a Criteria. The click the column AMOUNT IN LC.
You should see the total issuances to per material.
I hope this helps.
Heinrick Palad -
Raw material not using for production
Dears
I have a raw material which will be a line item for different FERT
But some particular FERT i don't want to this raw material is use for costing and planning and consumption
Please tell me how we can map this
I try in BOM Item status we can select not relevent for costing as well as in material master can be select asP D ,But the problem is that in some FERT i will use this raw material for costing as well as planing ,consumption etc...
Any hints please...
Abu FathimaBulk material is normally included in the BOM for information purpose. It normally has not impact on planning, costing, consumption. Materials like grease, washers etc are used as bulk. For what you asked in your first post, bulk material concept suits the best.
You need to remember that if you set bulk material indicator in BOM (it is set in BOM only if in certain fert materials you don't want that component material to be planned costed and consumed) or material master ( for all Ferts), it will not get copied to component overview of production (meaning, you cannot see it in production order, but you can see it in BOM).
But you can make it appear in production order by changing the setting Excl. Bulk Material in BOM explosion in OPPQ and/or OPPR. In this case when you create production order it will appear in the component overview and it will also appear in the order reservation but... movement allowed field will be blank , meaning you cannot post good consumption for the bulk material even if it appears in component overview. So it is not visible in MD04 or MD05.
Another thing to note is there is a third place you can set bulk indicator, you can set any material as bulk in component overview in CO02, it will not be planned, costed or consumed.
You do not control those things with item catagory in BOM
For R&D, the normal procedure is creating an Engineering BOM (Usage 2). But if you want to use production BOM's for R&D also, you need to go to OS20 and for BOM Usage 1 (for Prodution), change + to .(period) and now go to CS02 and uncheck production relevant for the items you want to not to be considered for production (planning and consumption) and uncheck costing. Then check Engineering/Design Relevant. This should fulfill your need and also looks politically correct because you're just not bulking it out.
Edited by: Jeevan Sagar on Feb 24, 2012 12:54 AM
Edited by: Jeevan Sagar on Feb 24, 2012 12:59 AM -
Hi Friends,
I am kind of new to mm ,
I am trying to create contract in ME31K,
the material i have put as raw material, since it is a raw material it should not ask me for the account assignment, why is it asking, when i have given a cost center, it is successfully created,
My question is How come for a raw material it is taking cost center , instead of taking GL account directly from valuation class.
Thanks.Hi
User material (material type) if you have not maitained quantity or value updation means it will not post to stock account so, that is reason it is posting to cost center
If you once maintain using OMS2 then you won't get this problem
Raju -
Hi
Experts
I am having problem in Production order. Raw material shortage
We create Production order manually no MRP.
Process is
(Raw material in KG converted to EA)
Cutting Order(EA), Forging Order(EA), Heat treatment order(EA), Machining order (Finish) (EA)all codes are different.
We have one raw material which is used in 5 different Products
Is there any code to find where it is used
Thanks & Regards
PertDear Mr Kumar
Both the Orders are diff
1) Cutting order material is in Kg cut in to pieces say 100 kg rod conveted to 500 pieces
then we create Production order for Forging this 500 pieces
2) but our sap MMBE system shows Forging semifinish stock is of 900 pieces (physsically not present)
3) Our store people say they issued material for the new order ie current which we have shortage of raw material.
4) My issue is solved when i get back this Forging semifinish stock of 900 pieces revert to store
but my problem is i am not able to trace out the production order of which this 900 pieces are?
if i revert both forging and cutting order then automatically sap system shows the raw material
So how to do it?
Thanks & Regards
Pert -
Raw Material and Finished Goods Items
Dear Users,
I need to write a query which gives me the Raw Material Item and the Finished Goods Items.
Which table contains this kind of data. Raw Material Item is Processed and a Finished Goods Item is produced, so i need all raw materials items which went into the resulting Finished Good.
Our Company is not using BOM module, rather it is using OPM. So the query should use OPM tables.
Thanks
SandeepHi
You can get the related details for Ingredients/Production and even By products in the form Formula and Table name called FM_FORM_MST
Navigation--> OPM Prouduct Development/Formula
Regards
Raj
Sierra -
Raw Material Item and Finished Goods Items
I need to write a query which gives me the Raw Material Item and the Finished Goods Items.
Which table contains this kind of data. Raw Material Item is Processed and a Finished Goods Item is produced, so i need all raw materials items which went into the resulting Finished Good.I figured out the answer to my own question. The BOM_INVENTORY_COMPONENTS table has information about the components (raw parts), and the BOM_BILL_OF_MATERIALS table has information about the assemblies (finished goods). The two tables join via the BILL_SEQUENCE_ID column. Here's an example query:
select ic.component_item_id raw_item_id, ci.segment1 raw_item_number,
ci.description raw_item_desc, bom.assembly_item_id finished_item_id,
bi.segment1 finished_item_number, bi.description finished_item_desc
from bom_inventory_components ic,
bom_bill_of_materials bom,
mtl_system_items bi,
mtl_system_items ci
where ic.component_item_id in (select inventory_item_id from mtl_system_items i
where organization_id = 82
and segment1 in ('800800000', '800800001',
'800800005', '800800006',
'800800009', '800800020',
'800800021', '800800022'))
and (ic.disable_date is null or ic.disable_date > sysdate)
and ic.bill_sequence_id = bom.bill_sequence_id
and bom.assembly_item_id = bi.inventory_item_id
and bom.organization_id = bi.organization_id
and ic.component_item_id = ci.inventory_item_id
and bom.organization_id = ci.organization_id
order by raw_item_number, finished_item_number; -
Reg. Process cost and raw material cost added
Dear Friends
Please consider our below scenario
PO is created and stock is maintained in unrestricted (Raw material)
and then Production order is created for Cut pcs and Raw material is issued to production order through 261 mvt type
next Cut pcs is received against the production order through 101 Mvt type. Now operation cost is not added with the Raw material cost, only the Raw material cost is represents in MIGO-> FOOTER - QUANTITY->Quantity in LC field. What to do to calculate the process cost too.
When we receive the cut pcs what we attached as component to the cutpcs's cost is calculated, the charge for Cutting is not calculated. we want both cutpcs charge(10.00 per pc)+component cost(raw mat. 180.00 per 1 kg)
Cut pcs 10 pcs * 10 Rs = 100 Rs
Raw mat 10 kg * 180 Rs = 1800 Rs
the total cost is 1900 Rs should come in that field
Thanks
Rajakumar.KPlease give solution
Thanks
Rajakumar.K -
Reg. WIP Charges not added with Raw material cost
Dear Sir
In BOM Header material SEMIFINISHED(CUTPCS) is attached and component material FABRIC -Raw material is attached,and then in MIGO using 261 Mvt type we are issuing fabric against production order,next using 101 Mvt type receiving CUTPCS now the cutting charge is not added with FABRIC only FABRIC cost is coming during Goods receipt. this is our serious problem.
Please help me.
Thanks
Rajakumar.KNot answered
Maybe you are looking for
-
User wants report with Vendor Line Item detail
Greetings Experts, we have users who want a report similar to FBl1N, but instead displaying the line level detail. For Example: User wants to see information for Vendor X. Wants the output not to be the 31 & 21 posting keys, but rather all the 40 an
-
Why can't I print my pdfs out of the InDesign Trial Version CS4?
HELP !! I can't print out the Pdfs I made with i the Adobe InDesign CS4 Version. Can't even save the document as eps. and a printer spooler file it won't do either due "to unknown error". Is there something wrong with the trial version? Printing di
-
Backing up computer with Time Machine
! was trying to do a backup for my Mac OS 10.6.8 so I can upgrade to OS 10.7. I was using Time Machine. After 12 hours, it still hadn't finished, so I canceled it. I have thousands of documents and pictures. Could it just be slow, or do I have to do
-
Video game trade in not showing up in pending points
Last week I traded in Call of Duty Ghosts and NBA 2k14 for the xbox 360 they asked for my information and told me to confirm on the debit card machine yet I have not seen it show up in my pending points and transactions on my Best Buy points page. Is
-
Music not playing-protected files?
Music I have purchased from the iTunes store is not playing on my iTunes or my iPod. I checked, it's in the appropriate folder, but while all the working songs are mp3's and mp4's the non-playing music are m4p, MPEG-4 Audio File (Protected). Is there