Method One: System Standard method
How do I find the change record of production order? Because there are a lot of users "cheat", obviously modify some of their own information, such as Qty or component, but it is not recognized, and also scold sap big problem, really will be angry, so want to record down.
HEHE, here I will extract a piece of SAP notes to show you how to complete this thing.
Note 390635-change documents for production and process order
Summary
Symptom
You cannot activate the creation of change documents for production orders and process orders.
customizing table t399x (Parameters dependent on order type) contains field Flg_doc If you cannot maintain it using the C Ustomizing transactions for production or process orders.
Other terms
Production Order, Process order
T399x-flg_doc
SPRO, BADI
Reason and Prerequisites
It isn't intended to use the SAP standard tool for the creation of change documents for production or process orders in T He SAP standard system. The indicator in table t399x are only interpreted by maintenance orders and networks.
The reason for this is the tool cannot determine dependencies of changes and thus would log too many changes that Wou LD has a negative effect on the runtime.
EXAMPLE:A production order contains operations and components
Case 1:you, the requirements quantity for a component manually.
The system creates a change document for the changed component.
Case 2:you, the planned quantity in the order header manually.
The change causes the quantites is changed automatically for all operations and components. The system would create
A change document for the changed header quantity,
Ten change documents for the automatically changed operation quantities (if defined) and
Thousand change documents for automatically changed component quantities.
Solution
Use the SAP enhancement PPCO0007 that's processed when you save order changes. You can find the SAP enhancement in customizing under the menu path ' shop floor Control ' or Production planning for Process Industries, Process Order, System modifications, enhancements for order maintenance, enhancement when Saving an Order (Header fields).
Here's can define additional logic to decide whether or not the system creates change documents.
For this, you can access either the SAP standard tool for creating change documents or your own tool.
The call of the "customer" exit takes place in function module Co_zv_order_post when you save. The current data of a order header is supplied via parameter header_imp. For collective orders the exit can is called several times-once for each order in the collective order.
Remember that a dialog box must is accessed and a message must not being issued from the exit.
You can use the attached source code as a template for accessing the creation of change documents.
can also see in the source code how the current and original data of the different order objects can is provided by ternal tables.
The example source code uses function module order_write_document that logs-for the ORDER change DOCUMENT object-the C Hanges for the tables transferred to the module.
It is appropriate to define a separate object for the change documents for orders, for example Zzorder. If required, you can use the ORDER standard object as a template.
The following tables of the order may has the to is taken into ac_countfor this type of change Document object:
Table Description Production Process Order
Afab Relationships X
AFFH Production Resource/tool X
AFFL work order sequence x x
Afft Process Instructions X
AFFV Process Instruction Values X
Afko Order Header Data PP