Problem of Raw Material & Finished product
Dear Experts,
My problem is related to Item Data Master when i am trying to select in Excisable Category Material Type Finished Goods,Raw Material & Capital Goods then opposite result i get. When i select Raw Material Category then i get result Finished Goods.Acutally i select item & Item Group same.
Regards
Amol
Amol,
Click on the link to get to the Support Page.
https://websmp203.sap-ag.de/support
Use Report a Product Error link
Suda
Similar Messages
-
Packaging material assginement for Raw and finished products
Hi all
What are the steps or pre requistes required that are needed to pack a material
for ex . I have a raw material x i want to pack this using cartoons .
how can i do this in SAP .
thanks ,
ksr.Hi ,
What is the exact requirement ...what is the business process ...
You can pack a material and create handling units using HU02. You just need a packaging material .
Regards,
Vishal -
Problem in Raw Material Purchase
Hi,
I have some issues.. I need some advice on that.
one of the raw material used in production is Grain (eg: Rice). Which is purchased in tons from different supplier. these incoming grain are put into quality inspection.
1 - but the order quantity is very large in number. going into several hundred tons. for this there is only one purchase order. but supplier supplies materials in different vehicles eg: trucks, trailers etc and in different dates. how can i map this scenario in SAP QM so that inspection lot is created for every incoming vehicle rather than every purchase order..
2 - grains are supplied in the bags in trucks. to conduct quality checks, samples are taken from these bags but not from all the supplied bags. samples are taken from only the accessible bags. i.e. from the bags at the end of the truck / trailer.
vendor may have put very good quality grains at the end of the truck, as he knows all bags are not accessible, specially the inside ones may contain very bad quality grains. what can i suggest to control this?
3 - it always takes time to conduct quality tests, supplier cannot wait till all test finishes. as soon as goods are received there will be unloading of the grains and these directly go into production. after the test results there may be rejections in quality. Again to control these what can i suggest to the client.
Please give me your advice on these
Thanks and Regards,
PavanHi
1 - but the order quantity is very large in number. going into several hundred tons. for this there is only one purchase order. but supplier supplies materials in different vehicles eg: trucks, trailers etc and in different dates. how can i map this scenario in SAP QM so that inspection lot is created for every incoming vehicle rather than every purchase order..
Suppose that the PO was cerated for 1000 tonns.Now You don't want Lot to be created as per Purchase order.Then
1.Create a material master for material,maintain QM view for the same.
2.Activate 01 inspection type.In Inspection type maintain " InspecLot Control" as "Per material document."
Against PO you have created ,you can create multiple GR's & every time lot will be created.
2 - grains are supplied in the bags in trucks. to conduct quality checks, samples are taken from these bags but not from all the supplied bags. samples are taken from only the accessible bags. i.e. from the bags at the end of the truck / trailer.
vendor may have put very good quality grains at the end of the truck, as he knows all bags are not accessible, specially the inside ones may contain very bad quality grains. what can i suggest to control this?
This will be only possible by Random sampling.Here SAP really can not help you as far system or discipline of vendor is concern.only control is by increasing the scope of sample collection.
3 - it always takes time to conduct quality tests, supplier cannot wait till all test finishes. as soon as goods are received there will be unloading of the grains and these directly go into production. after the test results there may be rejections in quality. Again to control these what can i suggest to the client.
1.one method can be say vendor has supplied 100 tonns.You have consumed 20 tonns while you found rejection.What you can do is keep the 80 tonns aside.
When Next GR will be made against his next delivery you can do Return Delivery of 80 Tonns for Fresh lot & do physical return delivery of old 80 tonns.
2.Next could be just Quarentine the lot which is rejected & send back to vendor (122 mvt) or ask for replacement.This can be done without GR for replaced material.(may be returnable challan)
You may find other ways also
I hope this will help
Sujit -
Return of raw material on production order
Dear Experts
Is there is any way to return raw material issued in production order back after issuing itHi,
Here is the solution for you( Hopefully)..
If you proceed in 262 movement it ll reverse all the materials against the order.
For that ,You have to reverse " to reservation". befor that change the production order BOm with the actual consumed QTY.
In production order the reservation number will be 12356.
For that particular material you ll have the reservation number be 12356-12( this you can get from double clicking the line item number of the material).
In MB1A , Give the reservation number (both the nubers 12356 and 12) And find it solved..
hope this clarifies..
karthick
Edited by: karthick PP on Mar 23, 2009 7:58 AM -
Raw Material V/S Finish Product
Hi Experts,
Bellow i am giving the my scenario, kindly check it
I am creating 100 FG
For that FG i issue 100kg Raw Material
After Production i got 100Nos. FG
But in KG i got only 80 Kg., Because 15 Kg. is Rejection And 5 Kg. is Process Loss.
I have problem with process loss , where and how can i track this process loss .
Thanks
UtkarshDear Utkarsh,
Because 15 Kg. is Rejection And 5 Kg. is Process Loss
1) Can you let us know, in confirmation screen how ur giving rejection & process loss
2) based on above experts can give some inputs
3) more if ur going with rework, scrap or by-product process
4) you can track in COOIS against Prd order
Regards
Madhu -
Raw material -scrap-against production order
Hi all,
I withdrawn 10 qty of raw material for production order using mvt type :261. Due to some wrong machine Operation 2 qties of the Raw material is become unusable(scrap).
I want to return this 2 qty of raw material to warehouse.
what is the movement type can i use?
Please advise me in this....Hi Kumar,
Please make your question clearer.
Have you made a confirmation against a PrdORd? I mean:
1. confirmed 10 pcs of FGs
2. withdrawn 10 pcs of raw materials
3. Later you recognized that 2 pcs of FGs were not good because of the wrong quality of raw material.
In this case you can cancel your confirmation in CO13 (and do it again only for 8 pcs of FGs and scrap the 2 pcs of wrong raw materials) or you can ask for 2 pcs of raw materials from WH and produce the missing 2 pcs of FGs (physically). In this case you can scrap (MB1A 551) the latter 2 pcs of raw materials.
Other option is that after getting 2 pcs of raw material and producing the 2 pcs of finished goods you book an excess consumption in MB1A + MVT 261 + PrdOrd reference. It based on your concept...(in which way you want to handle the scrap).
BR
Csaba -
Raw mat and procured finish product cost
we need to run cost run for both raw material and product, we want have the following scenario:
first mark the raw mat. cost run, then our finished product will get the future price of raw mat and base on BOM to update the future price of finished product.
after we mark finished product, we then release raw mat standard price and subsequently release finished product.
is any solution we can define costing variant for above scenario?
we have another scenario, we need to run costing run for finished good A, but this product A 's BOM contain only one procured finished product B, B doesn't have BOM and purchase info record, how can we change product B 's price, so finally finished product A 's standard price will be updated upon costing run?Hi ,
In Costing Variant .. we have a Tab for valuation variant . In the valuation variant type , we have seperate valuations for raw Materials , activities, subcontracting etc .
Cost Estimate with Quanity Structure will refer to the Costing Variant and compute costs .. Hence , maintain Costing Variant and Valuation Variant properly..
This will solve both your issues..
Kindly revert back for any further questions..
Regards
Sarada -
Hi,
We have Production order with settlement rule as follow:
Sender:production Order
reciever : material (Finish product)
Type:Full
and also we assign this Finish product to network and during month posting GI of following material to related network,when I make settle in current period according to settlement rule I expected that production cost transferred to material price but after settle only balance of order was zero and material price did not change,
I have a doubt why material price did not change and how actual price of Finish product will transfer to network that I assign this material ,
with tracking project actual cost via CJI3 ,finish product price is standard price of previous period and because of at the first period we considering standard price of finish product as 1 $ therefore all unit price of finish product in project is 1 and I dont have actual cost of project .
The worst side of my problem is that because of business problem I could not settle production orders for 3 month and during following periods all GI posting with unit price 1 $ and we dont have actual price in network,
How I can revaluate all GI of previous periods to have real cost of project up to know?
It would be my pleasure if you help me as soon as possible,
Regards,
AzamHi
1. GI revaluation is ruled out w/o Material Ledger in place, as said above.... However, I wont recommend Price Control V for SFG/FG either
2. In a similar scenario, what I have seen a possble workaround is this
a. The scenario was project driven MTO... .i.e. Production order was tagged to WBS element.. This scenario is called Production Lot scenario in SAP
b. Each time you create a Production order, you create a project 1st and then create the Prod order...
c. The Price control of the material was kept as V
d. No partial GR was done from Prod order as a matter of policy to avoid unfav situations
e. After GR, the prod order was settled so that any variance would be inventorized.... Even if not settled, and the stock is consumed, the variance will be booked on the WBS element... It wont tamper the entire FG valuation
However, this workaround might not help you because you wish to revaluate the GI, which is not possible w/o ML
br, Ajay M -
Report for issuance of raw material
Hi!!!!
Kindly suggest me the t-code where i can look for the issuance of raw material against production orders on a month basis or quarterly basis.
ThanksHi,
COOIS:
maybe you should apply the settings written by me in my previous message since you can see the consumption of components in this report. Paste the movement type field in the layout and you will see 261.
MB51
you can paste the field ('Order') in the layout that contains the PrdOrd no.
MB53
Run the report > pusch 'consumption' button. That's all.
You should examine these reports and try to use them. You can get the information from COOIS ( components and from MB51.
BR
Csaba
Edited by: Csaba Szommer on Jul 23, 2008 9:45 AM -
Raw material - Returned to vendor
Hai,
I was purchase a raw material from vendor, I have put the GRPO for the corresponding material.
This item has the following tick in the Item Master Data: 1) Inventory Item
2) Purchase Item and 3)Quality required.
After purchasing this I have checked quality and then only I can able to Issue a raw material into production.
In quality checking We found this material has some crack. because of this reason I want to return a material to vendor.
What are the documents I want prepare except Goods Return.
My colleague are said to prepare the Sales Invoice for the respective Item. First I was create the vendor as Customer.
But in Item Master data there is no tick in the following check box i) sales Item.
Because of this Issue I can't choose the respective item in Sales Invoice.
Can any one give me the solution for this.
Regards
Pushpa DamodaranHai,
Is there any other option to return a material to vendor( to reduce stock in the corresponding warehouse)
and also I want to know Now I can tick in this Item as sales Item
Regards,
Pushpa Damodaran
Edited by: Pushpa Damodaran on Mar 2, 2012 11:02 AM
Edited by: Pushpa Damodaran on Mar 2, 2012 11:04 AM -
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 -
How to Control Finished Product Price based on Raw Material
Hi Experts,
Our client manufactures Steel Products where basic Raw Material is Steel.
Customer will give annual contract/Sales Order on the rate prevailing on the contract date. But there is clause that if Steel prices increase / decrease by 5% then correspondingly Finished product price will change by 3%.
How can this be mapped in SAP where by based on Raw Material price, Finished product can vary?
RegardsHi Ajay,
Please go through this link. you will get an idea
Price list change according to raw material cost
Thanks
Dasaradha -
Raw material & its finished product link
Dear All,
How to get the raw material and its corresponding finished product link from SAP.Can you please provide the T code (if it is there) otherwise please provide the logic.
Thanks in advance
Regards,
Rubin Luke.Hi
You can verify any material at plant level from SAP standard table MARC using SE16N Tcode.
else use MM03 display material - before entering the material press F4 and choose plant material selection and enter your plant you can see all the materials for that plant. then you can choose your required material
then using the transaction CS15 - material where used list
youu can find the FG materials for which thise material is used as component.
in CS15 enter the material, flag Direct and flag Material BOM
Hope this helps
BR
SK -
Single raw material with output of 2 finish product
All,
In our scenario, we have the pressing machine which have the dye to create the right and left bumper of the car in a single stock . if we give the single raw material , the ouput will be two finish products 1. right bumper and 2. left bumper.
while confirming the order, how we can get two fert?Create Left Bumper And Right bumper as FERT, Maintain a co product Indicator for Both and maintain Joint production details in MRP 2view ( ex 50 % for Left bumper and 5o % for right bumper ) the cost will proportioned accordingly
IN BOM
Create a BOM for Left Bumper
and maintain component as raw material with qty
and Right bumper as 1- and maoinatin co product indictor in item detail
ANd save
WHile doing GR in MB31 System will propose Both Left and Right bumper with 101 movement type.
Regards,
Sundaresan -
Production order link to raw Material
Hi
Experts
We have manual Production order system (NO MRP)
System works like this
Work order (Manually given to Production) Part name Material Qty and Dispatch date.
Finish Material A
This contains semi finish material X, Y, Z
X contains Raw material and Scrap Generated
Y contains X and Scrap
Z Contains Y and Scrap
Finish A Contains Z material
Then Production people create the sub semi finish Production order of X before he checks raw material from store and accordingly by calculating he create Production order of X then Production order of Y and Z and then Create Production Order Of Finish Material.
Our problem is that as we create manually Production order the material issued from store we are not able to link with the production order.
As this material is issued to this production order. How to map this?
The other issue is regarding consumables we also want to map this to Production order. Like Coolant used and inserts used on work center how to map?
Please guide me.
Thanks & Regards
PertHi,
If you are creating production orders with CO08 (With reference to sales order ) then RM tracking can easily be done.
Just need to give sales order number in COOIS report or in table AFPO it will give you all the production orders and RM can be traced till FG.
But if you have MTS then the calculation must be assumption basis .
If the same RM used in same SFG with different production orders then that might be impossible to trace without batch and sales order.
Now you want to trace tool then use PRT
You need to create material as PRT .
Assign that PRT in routing with Usage formula .
So PRT will be copied on production order with routing . When ever you will confirm the operation the usage value of PRT will be updated.
Regards,
Vishal
Maybe you are looking for
-
ITunes wont start Error report.
A while back, I had to do a system restore. I reinstalled both quicktime and iTunes, but whenever I open iTunes, one of those "iTunes has encountered an error," messages appears. I have tried everything, including reinstalling several times. I have a
-
hi experts, I want to apply bw7 support package 17 to 18. it shows same error "Perform Adjustment, Import phase 'RUN_SPAU_? when I try to Adjusted the error object in SPAU. it shows Namespace /*****/ does not exist? how do i resolve this issu
-
TPETIME and long running transactions
Tuxedo version and patch: Tuxedo Version 8.1, 32-bit, Patch Level 328 Issue: One of the services we have is exhibiting very high response times (as gathered from the stderr log using -r option). In some instances the reported response time has reache
-
Rescue & Recovery issues trying to transfer files
I have an annoying issue. My lappy woke up this morning with the CI.DLL error and I get the error screen saying that this was deleted and I'm unable boot. Tried booting in safe and still did not work. So I went into rescue & recovery to restore an
-
before that i installed a plug-in to chage the facebook desing