To determine changes in production orders when sales orders have been changed, primary and secondary fields are compared. No comparison is executed when master data is changed. In this case, the objects affected are found directly using the change number.
Primary fields are used to identify the object. This means that two objects of the same object category, from the orders that were compared to one another, are recognized as matching objects and assigned to one another, if the values of their primary fields match (for example, MATNR for the material number of an order component).
Secondary fields are used in the second comparison step to check the equality of objects that were assigned using the primary fields. If the values of all secondary fields match, the objects assigned to one another are assessed as being identical in the comparison result.
If the values of all secondary fields do not match, the objects assigned to one another are assessed as being non-identical in the comparison result.
The possible comparison fields per object category are fields designed specially for the comparison of created structures in the Data Dictionary. These structures are called:
COMPHEAD for the order header
COMPSEQ for the order sequence
COMPOPER for the order operation and the sub-operation
COMPCOMP for the order component
COMPTOOL for the production resources/tools
These structures can be extended by using additional fields. To do this, the following append structures were created in the Data Dictionary, which you can activate using the enhancement COOCM002:
CI_COMPHEAD for the order header
CI_COMPSEQ for the order sequence
CI_COMPOPER for the order operation and the suboperation
CI_COMPCOMP for the order component
CI_COMPTOOL for the production resources/tools
The possible enhancement fields are fields from the following structures:
CAUFVDB for the order header
AFFLB for the order sequence
AFVGB for the order operation and the suboperation
RESBB for the order component
AFFHB for the production resources/tools
When including a comparison field you have to ensure that the first field contains the name of the field without the structure name. One of the OBJ constants has to be assigned to the second field.
In the include COMPFIELDEF you can see the standard default for the primary and secondary fields.
Customer Enhancement COOCM001
For the process of checking change steps, you can use this customer enhancement to define situations not covered by the standard as conflicts. To do this, use the function module EXIT_SAPLCOOCMB_001.
Customer Enhancement COOCM002
You can use this customer enhancement to define a customer-specific execution of the comparison. You can use the function module EXIT_SAPLCOOCM_001 to define comparison fields for the production order comparison per object category.
You can use the include COMPFIELDEF as an example when you create your own entries for the primary and secondary fields.
Caution
To use this customer enhancement, you need very detailed knowledge of the data structure of the production order.