'Delivered quantity' in production order header
Dears :
when display production order by CO03. There is a field named with 'Delivered' .
Is there any best way to get this value ?
hi
select from table- AFRU field- GMNGA by aufnr.
then add all the gmnga selected entries.
regards
Usman
Similar Messages
-
Table for field "delivered" in production order header general tab
Hallo everyone,
I am looking for the field "Delivered" in the production order header on tab General. Can anyone tell me in which table it is stored?
Thanks and regards,
JessicaHi,
Field "ELIKZ" ("Delivery Completed" Indicator) is available in Table "AUFM" (Goods movements for order).
Here You can co-relate this with field "AUFNR" (Order Number) -
Negative quantity in deliver field in production order - CO02
Hi All,
I am doing production confirmation and goods receipt for production order through back ground using standard BAPI.While doing GR for production order in background the following error occured.
System is throughing dump - Arithmatical logical conversion problem.when we analysed through ST22 we came to know that negative quantity appearing in field of delivered in production order.
Screen name.............. "SAPLCOKO1"
Screen number............ 0120
Screen field............. "CAUFVD-GWEMG"
As per standard, delivered field in production order is always in display mode only. So there will not be any chance for user to change the delivered field.
Pls guide me how to overcome the above issue and what is exact root cause for the above problem.
System is throwing error in change mode ( Co02) and display mode ( CO03 ) for the respective production order number
Thanks
P.SrinivasanHi,
This inconsistency can be solved with the following correction report. If you want to try by yourself, then implement it manually in transaction SE38 and execute in test mode first to check if the inconsistency is found. And obviously, in a TEST system first.
If you are NOT confident about it, I recommend you to submit a support message for SAP for further investigation since this is a database inconsistency.
Regards,
Marcelo
<pre>
*& Report ZPCON_076B *
*& This report checks goods receipt quantity (WEMNG) and value (WEWRT) *
*& of an order item for consistency with the corresponding material *
*& documents. In UPDATE mode, the quantity and the value calculated *
*& from the material documents will be written to database table AFPO. *
REPORT zpcon_076b LINE-SIZE 90.
INCLUDE lcokotyp.
TABLES: afpo.
SELECTION-SCREEN COMMENT /1(80) text1. "#EC NEEDED
SELECTION-SCREEN COMMENT /1(80) text2. "#EC NEEDED
SELECTION-SCREEN COMMENT /1(80) text3. "#EC NEEDED
SELECTION-SCREEN COMMENT /1(80) text4. "#EC NEEDED
SELECTION-SCREEN COMMENT /1(80) text5. "#EC NEEDED
SELECTION-SCREEN ULINE.
SELECTION-SCREEN COMMENT /1(80) texta. "#EC NEEDED
SELECT-OPTIONS r_aufnr FOR afpo-aufnr.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN BEGIN OF BLOCK block WITH FRAME TITLE title."#EC NEEDED
SELECTION-SCREEN COMMENT /1(72) texty. "#EC NEEDED
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME.
PARAMETERS: testmode RADIOBUTTON GROUP mode DEFAULT 'X'.
PARAMETERS: update RADIOBUTTON GROUP mode.
SELECTION-SCREEN END OF BLOCK block2.
SELECTION-SCREEN COMMENT /1(72) textz. "#EC NEEDED
SELECTION-SCREEN END OF BLOCK block.
DATA: BEGIN OF ls_afpo.
INCLUDE STRUCTURE afpo.
DATA: END OF ls_afpo.
DATA lt_afpo LIKE ls_afpo OCCURS 0.
DATA: BEGIN OF ls_mseg.
INCLUDE STRUCTURE mseg.
DATA: END OF ls_mseg.
DATA ls_mseg2 LIKE ls_mseg.
DATA lt_mseg LIKE ls_mseg OCCURS 0.
DATA ls_mkpf TYPE mkpf.
DATA l_initial_ltrmi TYPE co_ltrmi VALUE IS INITIAL.
DATA l_orders TYPE sytabix.
DATA l_entries TYPE sytabix.
DATA l_sum_wemng TYPE wemng.
DATA l_sum_wewrt TYPE wewrt.
DATA l_error TYPE xfeld.
INITIALIZATION.
text1 = 'This report checks goods receipt quantity (WEMNG) and'.
text2 = 'value (WEWRT) of an order item for consistency with the '.
text3 = 'corresponding material documents. In UPDATE mode, the'.
text4 = 'quantity and the value calculated from the material'.
text5 = 'documents will be written to database table AFPO.'.
texta = 'Please specify order numbers of orders to be processed.'.
texty = 'If TESTMODE is set, no database update will occur.'.
textz = 'Set radio button UPDATE for updating the database entries.'.
title = 'Mode'.
AT SELECTION-SCREEN.
orders specified?
IF r_aufnr IS INITIAL.
MESSAGE e889(co) WITH 'Please specify order numbers'.
ENDIF.
START-OF-SELECTION.
select order items
SELECT *
FROM afpo
INTO TABLE lt_afpo
WHERE aufnr IN r_aufnr
AND ( dauty = auftragstyp-fert
OR dauty = auftragstyp-netw
OR dauty = auftragstyp-inst
OR dauty = auftragstyp-rma
OR dauty = auftragstyp-bord ).
DESCRIBE TABLE lt_afpo LINES l_orders.
check order items
LOOP AT lt_afpo INTO ls_afpo.
REFRESH lt_mseg.
CLEAR l_sum_wemng.
CLEAR l_sum_wewrt.
CLEAR l_error.
SELECT *
FROM mseg
INTO TABLE lt_mseg
WHERE matnr = ls_afpo-matnr
AND werks = ls_afpo-pwerk
AND aufnr = ls_afpo-aufnr
AND aufps = ls_afpo-posnr
AND kzbew = 'F'
%_HINTS ORACLE 'rule'.
IF NOT sy-subrc IS INITIAL.
no goods movements --> nothing to do.
DELETE lt_afpo.
CONTINUE.
ENDIF.
LOOP AT lt_mseg INTO ls_mseg.
IF ls_mseg-shkzg ='S'.
inward movement
IF NOT ls_mseg-dmbtr IS INITIAL.
l_sum_wewrt = l_sum_wewrt + ls_mseg-dmbtr.
ENDIF.
IF NOT ls_mseg-bstmg IS INITIAL.
l_sum_wemng = l_sum_wemng + ls_mseg-bstmg.
ELSE.
IF ls_mseg-erfme = ls_afpo-amein.
l_sum_wemng = l_sum_wemng + ls_mseg-erfmg.
ELSE.
IF ls_mseg-meins = ls_afpo-amein.
l_sum_wemng = l_sum_wemng + ls_mseg-menge.
ELSE.
WRITE: 'ERROR - Order', ls_afpo-aufnr COLOR 6.
DELETE lt_afpo.
l_error = 'X'.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ls_mseg2 = ls_mseg.
ELSE.
outward movement
IF NOT ls_mseg-dmbtr IS INITIAL.
IF ls_mseg-dmbtr NE ls_mseg-bualt AND
NOT ls_mseg-bualt IS INITIAL.
l_sum_wewrt = l_sum_wewrt - ls_mseg-bualt.
ELSE.
l_sum_wewrt = l_sum_wewrt - ls_mseg-dmbtr.
ENDIF.
ENDIF.
IF NOT ls_mseg-bstmg IS INITIAL.
l_sum_wemng = l_sum_wemng - ls_mseg-bstmg.
ELSE.
IF ls_mseg-erfme = ls_afpo-amein.
l_sum_wemng = l_sum_wemng - ls_mseg-erfmg.
ELSE.
IF ls_mseg-meins = ls_afpo-amein.
l_sum_wemng = l_sum_wemng - ls_mseg-menge.
ELSE.
WRITE: 'ERROR - Order', ls_afpo-aufnr COLOR 6.
DELETE lt_afpo.
l_error = 'X'.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP. "AT lt_mseg
only continue if no error in the calculation occurred
CHECK l_error IS INITIAL.
IF ls_afpo-wemng = l_sum_wemng AND
ls_afpo-wewrt = l_sum_wewrt.
values are correct, no update necessary
DELETE lt_afpo.
CONTINUE.
ENDIF.
FORMAT: COLOR 1.
WRITE: / 'Order', ls_afpo-aufnr, 'material', ls_afpo-matnr.
FORMAT: COLOR OFF.
WRITE: /3 'Order item data : quantity',
ls_afpo-wemng UNIT ls_afpo-amein, ls_afpo-amein, 'value',
ls_afpo-wewrt CURRENCY ls_mseg-waers, ls_mseg-waers.
WRITE: /3 'Material documents: quantity',
l_sum_wemng UNIT ls_afpo-amein, ls_afpo-amein, 'value',
l_sum_wewrt CURRENCY ls_mseg-waers, ls_mseg-waers.
FORMAT: COLOR 2.
WRITE: /3 'Material doc. BWART', 30 'stock qty UoM',
52 'entry qty UoM', 77 'value Curr'.
FORMAT: COLOR OFF.
LOOP AT lt_mseg INTO ls_mseg.
WRITE: /3 ls_mseg-mblnr, ls_mseg-zeile, ls_mseg-bwart,
ls_mseg-menge UNIT ls_mseg-meins, ls_mseg-meins,
ls_mseg-bstmg UNIT ls_mseg-bstme, ls_mseg-bstme,
ls_mseg-dmbtr CURRENCY ls_mseg-waers, ls_mseg-waers.
ENDLOOP.
IF NOT update IS INITIAL.
set delivery date
IF l_sum_wemng IS INITIAL.
initial delivery quantity --> initial delivery date
UPDATE afpo SET ltrmi = l_initial_ltrmi
WHERE aufnr = ls_afpo-aufnr
AND posnr = ls_afpo-posnr.
ELSE.
read posting date from last valid goods receipt
SELECT SINGLE * FROM mkpf
INTO ls_mkpf
WHERE mblnr = ls_mseg2-mblnr
AND mjahr = ls_mseg2-mjahr.
IF sy-subrc IS INITIAL.
UPDATE afpo SET ltrmi = ls_mkpf-budat
WHERE aufnr = ls_afpo-aufnr
AND posnr = ls_afpo-posnr.
ELSE.
leave LTRMI untouched
ENDIF.
ENDIF.
set quantity and value
UPDATE afpo SET wemng = l_sum_wemng
wewrt = l_sum_wewrt
WHERE aufnr = ls_afpo-aufnr
AND posnr = ls_afpo-posnr.
FORMAT: COLOR COL_POSITIVE.
WRITE: /3 'Order item data corrected from material documents.'.
FORMAT: COLOR OFF.
ENDIF.
ULINE.
ENDLOOP. "AT lt_afpo
WRITE: / 'Number of checked order items :', l_orders.
DESCRIBE TABLE lt_afpo LINES l_entries.
WRITE: / 'Number of inconsistent order items:', l_entries.
IF NOT update IS INITIAL AND
NOT l_entries IS INITIAL.
WRITE: / 'Inconsistencies were corrected from material documents.'
COLOR COL_POSITIVE.
ENDIF.
ULINE.
</pre>
Edited by: Wilian Segatto on Jan 25, 2011 12:27 PM -
Make Scrap portion field in production order header as display only
Hi Experts,
We have a requirement to make scrap field(CAUFVD-GASMG) in production order header as display field only. We do not want users to enter any values here to denote the quantity scrapped in production orders. I am not aware of any configuration to make this field as display only. Please let me know which user exit or BADI available for this purpose. We do not want to use any screen variants and transaction variants and would like to restrict this at order type or plant level.
Thanks
RijilHello Rijil,
If not with variants than check with enhancement.
PPCO0006 Enhancement to specify defaults for fields in order head
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0018 Check for changes to production order header
Regards, -
User Exit: Saving data in Production Order Header Long Text
Hi PP Gurus,
Can any one let me know which user exit can be used to save some data in the Long Text of Production Order Header.
We try PPCO0007, it works well on ECC, but my client's system version is 4.7, it does not work.
In 4.7 version, is there any other User Exit or BADI can be used to comply with this requirement?
It's quite common requirement, hope someone can help me. Thanks.
Best regards,
Sun QiangHi All,
Thank for your reply.
After saving the text using 'SAVE_TEXT' function module and commiting it you need to update the 'ltext' field in AUFK table.
SELECT SINGLE * INTO wa_aufk FROM aufk WHERE aufnr EQ '000012345678'.
wa_aufk-ltext = 'D'.
MODIFY aufk FROM wa_aufk.
It works in Enhancement PPCO0007.
This call can be closed. Thanks.
BR
Qiang -
Production Order header Long text
Hi ,
I need to get the long text in the Production Order Header.
I am aware that I would need to use READ_TEXT FM.
What are the parameters that I need to put in?
ID
LANGUAGE
NAME
OBJECT
Thanks!Hi Donna,
This is the answer:
ID KOPF
LANGUAGE EN
NAME 035000010000121
OBJECT AUFK
For name you have to concatenate client number + production order number.
From my example above 035 (client number) + 000010000121 (production order number) .
Hope it helps,
Victor. -
Batch determination in the production order header
Hi,
I'm trying to determine the batch for the production order header (AFPO-CHARG). I've set up the search strategy, added the procedure to the relevant plant/order type combination in OPL8 and created the batch search strategy to default the batch, however, when I create the order the batch does not default. Am I missing anything obvious?
Thanks in advance!Hi
Batch Search strtaegy is used to get the batch numbers of the components in the production order or get the batches in the delivery of the sales order.
These batches can be selected based on the selection criteria and the sort rules.
I do not completely understand what you mean by batch at heaser level.
If you mean to say the batch number for the header material then you can not search that batch since it has to be created first.
Hope this helps.
Cheers -
Default of fixed batch number for production order header????
Hi Experts,
In SAP, when create a production order, in the production order Header view, in the "Good Receipt" Tab, there is a field "Batch" , which means "Assigns a material that is manufactured in batches or production lots to a specific batch ".
For some special reasons, we want for some certain materials,when create production order every time,the "Batch" field will be a fixed values.
For example,for material "AB1" ,"CD2",when create production order every time,the "Batch" field will be "2345" automatically,do not need input manually.But for all the other materials, the "Batch" field would be null ,no value.
How can I do this? How can assign fixed batch number values to some certain materials in production order?
If there needs some ABAP development,which user exit do I need??
Thanks for any reply!Hi V.SURESH
Thanks very much!
I know what you mean. Default batch number in the production order eans, there is no use of using batch management.
In fact, my purpose is just want to deactivate the batch management for some certain materials.
So for some certain materials,when create production order every time,the "Batch" field will be a fixed values.
How can I do this? How can assign fixed batch number values to some certain materials in production order?
If there needs some ABAP development,which user exit do I need?? -
Production Order Header - Committed Quantity
Hi Team,
I have created the production order with quantity 2. In order to produce the 2 header item, i need to 2 components (BOM item). But currently i have only 1 quantity of BOM item in stock. With this condition, i am performing the ATP check in my production order. Since i have only one BOM item in stock, i can able to produce only one header item. So after executing ATP check in my production order, i am expecting the below field to be updated as "ONE" (refer the screen shot). But it is not getting updated. Why? When this field will be updated?
ThanksI have tried testing this in various ways on my system but I cannot get the committed quantity to 0 unless there is 0 available. The quantity is always updated for me.
Can you do the following?
Set a breakpoint here:
Function AVAILABILITY_CHECK_CONTROLLER
CALL FUNCTION 'AVAILABILITY_CHECK' <<<<<<<< Breakpoint here
EXPORTING
P_SCHEDSH = P_SCHEDSH
P_SCHEDTR = P_SCHEDTR
When your breakpoint is hit during the availability check, hit "F6" and then check the values in table P_MDVEX. If possible, post the results back here; ensure that you have included the MNG01 and MNG01 fields.
This internal table holds the result of the availability check. By looking at this, we might be able to narrow down if this is an availability or PP issue. -
Find the table name for Delivery quantity in production order
Hi,
Pls can you tell me what is table name for delivered quantity field in General tab for that production order number.
With Regards,
P.Arunkumar.Hi
You can find it GR qty via following 2 Tables.
Table AFPO Order item
Field WEMNG - Gr Qty
Or
Table AUFM
Field SHKZG (Debit Credit Indicator ) Select Debit Indicator - S
Field KZBEW Movement type ind.- Selct F Goods movement for production order.
Regards,
Dhaval -
Production Order Header Status
Hi
I am having a production order with 4 operations. when i am confirming the first operation as partial confirmation because i am just confirming only partial quantity, the whole production order status is set to PCNF. Even though i am finally confirming the same operation finally and confirming all the other operations also finally, the order status is not changing to CNF. it is still in the PCNF . how do i get it to CNF status? because the PCNF status for the order will create other problems.
The operation statuses for the same order give correct statuses as PCNF or CNF or milestone. The problem is only with order header status.
Can someone please solve this issue. Points assured
Regards
ChandraHi,
In tcode OPK4 - Define confirmation parameter select your plant & order type.
In 2nd tab page, select Confirmation type - Automatic final confirmation.
So when doing opn confirmation if the qty is equal or more than order qty, system automatically set to Final confirmation.
If the confirmation qty is less than order qty, system automatically set to partial confirmation.
Regards,
Dharma -
Production Order header Qty change without changing the line qty
Dear Experts,
This is one of the requirement from my client. He has to change header planned qty without changing line planned qty in the production order. They are doing this to avoid the wip variance account posting. Can we achieve this through SDK? If so how?
Regards,
Gokul K.Hi Gokul,
You can over write the planned quantity by the base quantity in each line.
Here is my sample fro you:
If (Not pVal.Before_Action) And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE) And (pVal.ItemChanged) And (pVal.FormTypeEx = "65211") And (pVal.ItemUID = "12") Then
With CType(SBO_Application.Forms.Item(FormUID).Items.Item("37").Specific, SAPbouiCOM.Matrix)
For ii As Integer = 1 To .RowCount - 1
.Columns.Item("14").Cells.Item(ii).Specific.value = .Columns.Item("2").Cells.Item(ii).Specific.value
Next
End With
End If
regards,
Csaba -
Change quantity in production order
Dear Expert,
I've done production order for multiplication last year with expected quantity 22.000 kg. This year we received from subcontractor 50.000 kg. Would you be so kind and advice the best way to updated this? It's allow to go to CO02 and change quantity from 22000 to 50000? I afraid because in component overview the component will change according to new qty but has to be the same. The GI 261 on this component was done last year
Thanks in advance,
doti_781Hi,
If you do not want the quantity to be changed, then tick the check box of Fixed Qty for each component, this will ensure that the qty will not increase or decrease when the header qty is changed.
Hope it clarifies your query.
Regards,
Vivek -
Change Alternative Item Quantity in Production Order BOM
Hi Gurus,
I woould like to ask how can I make the Alternative item quantity to become editable. As of now, the system will calculate the percentage in the BOM and default it in the Production order.
Now I have a requirement that in the Production order Change, the user can change the quantity of the Alternative Item based on the situation with out changing the BOM. Just change in the production order. What settings do i need to change?
Thanks,
RaymondHi,
Can you let us know why you want the user to make the changes manually ?
Not in front of the system at the moment, but just do an Av. Check to see if you're able to get the switch if the stock situation has changed for the alternative items.
Based on what i know, the field will not be editable & there is no specific setting to make it editable.
Regards,
Vivek -
Committed Quantity in Production Order
when we do the availability check in production order Transaction co02 we get a screen which shows Reqmts Quantity and Committed Quantity. I just need to know in which Table these quantities are getting stored
Not sure you asking about, but give a try to look at OITW table...
Maybe you are looking for
-
Can't open iPhoto after Yosemite upgrade MacBook Pro
THe wheel just spins and eventually I have to force quit. I tried resetting the Pram. It's a 2011 15". Need to get into my photos! I know I can access them in Pictures but I'd like to use iPhoto.
-
OK, so I currently have a 186GB(as read by the computer, not manufacturer) External HD serving as my time machine backup of my 122GB(also as read by comp.) internal HD. I will be upgrading to a 640GB(manufacturer reading) external disk and giving awa
-
How can I get a thunderbolt disply to work with a MacPro desktop???
-
Urgent: Invalid account group
Hi All, For mapping a new scenario we have created a new document type YNB (copied from NB).But when I try to create a PO using this document type I get an error as "Invalid Account Group". The error is NOT there if I change the document type and use
-
Super Talent 8 GB USB Pico drive not being recognized on my iMac.
Hello, I recently bought a Super Talent 8 GB usb drive. I tried inserting it into my iMac (previous generation, in between the first and latest version) and it doesn't show up on the desktop. The packaging says it is Mac compatible and USB 1.1 and 2.