Integration with Other Applications > Introduction to Windchill ESI > Integrating Windchill ESI with SAP > Windchill ESI Features > Co-Produce Objects
  
Co-Produce Objects
In manufacturing plants, same materials can be used to produce different components required to build a product. This material can be a raw-material or a semi-finished part. Parts that are produced in a single production process can be put together as a co-produce object.
ERP Connector lets you publish co-produce objects that are created or changed within Windchill MPMLink to a distribution target. For more information, see Publishing Co-produce Objects.
Windchill ESI passes co-produce objects to the EAI software components. Information related to a co-produce object is published in the following element types in the ESI response.
AddedCoupling
AddedCouplingMember
ChangedCoupling
ChangedCouplingMember
UnchangedCoupling
UnchangedCouplingMember
DeletedCoupling
DeletedCouplingMember
Let us consider an example where ER1 is the primary co-produce object, and ER2 and ER3 are the secondary co-produce objects.
co-produce objects
The following table lists the use of different element tags in the ESI response message:
Scenario
Element Type for ER1
Element Type for ER2, and ER3 in ESI Response
New primary and secondary co-produce objects
AddedCoupling
AddedCouplingMember
Updated primary and secondary co-produce objects
ChangedCoupling
ChangedCouplingMember
Existing primary and secondary co-produce objects
UnchangedCoupling
UnchangedCouplingMember
Deleted primary and secondary co-produce objects
DeletedCoupling
DeletedCouplingMember
When you publish ER1, ER2, and ER3 to SAP, ER1 is persisted as the BOM header, ER2 and ER3 as the BOM components for ER1. By default, in SAP:
The Co-product flag is selected for ER1, ER2 and ER3
The quantity set to 1- for ER2 and ER3 BOM components.
The following sample ESI response message shows the use of AddedCoupling element types for ER1 and ER2.
<AddedCoupling NAME="AddedCoupling" TYPE="Unknown" STATUS="0">
<Coupling>
<ObjectID>OR:wt.mpm.coupling.Coupling2:188859:479269001-1601465286181-638582764-236-71-192-10@systemname.abc.com</ObjectID>
<Class>com.ptc.windchill.esi.Coupling</Class>
<CouplingName></CouplingName>
<CouplingDescription></CouplingDescription>
<CouplingContext></CouplingContext>
<PrimaryPartObjectID>OR:wt.part.WTPart:188812:479269001-1601465286181-638582764-236-71-192-10@systemname.abc.com</PrimaryPartObjectID>
<PrimaryPartName>ER1</PrimaryPartName>
<PrimaryPartNumber>0000000144</PrimaryPartNumber>
<PrimaryPartVersion>A</PrimaryPartVersion>
<PrimaryPartView>Design</PrimaryPartView>
<PrimaryPartUsage></PrimaryPartUsage>
<PrimaryPartAlternate></PrimaryPartAlternate>
<TargetID>SAP_P15:1100</TargetID>
</Coupling>
</AddedCoupling>
<ChangedCoupling NAME="ChangedCoupling" TYPE="Unknown" STATUS="0">
</ChangedCoupling>
<UnchangedCoupling NAME="UnchangedCoupling" TYPE="Unknown" STATUS="0">
</UnchangedCoupling>
<DeletedCouplingMember NAME="DeletedCouplingMember" TYPE="Unknown" STATUS="0">
</DeletedCouplingMember>
<AddedCouplingMember NAME="AddedCouplingMember" TYPE="Unknown" STATUS="0">
<CouplingMember>
<ObjectID>OR:wt.mpm.coupling.CouplingMember:188860:479269001-1601465286181-638582764-236-71-192-10@systemname.abc.com</ObjectID>
<Class>com.ptc.windchill.esi.CouplingMember</Class>
<PartObjectID>OR:wt.part.WTPart:188819:479269001-1601465286181-638582764-236-71-192-10@systemname.abc.com</PartObjectID>
<PartName>ER2</PartName>
<PartNumber>0000000145</PartNumber>
<RawMaterialObjectID></RawMaterialObjectID>
<RawMaterialName></RawMaterialName>
<RawMaterialNumber></RawMaterialNumber>
<Quantity></Quantity>
<Unit></Unit>
<CouplingObjectID>OR:wt.mpm.coupling.Coupling2:188859:479269001-1601465286181-638582764-236-71-192-10@systemname.abc.com</CouplingObjectID>
<TargetID>SAP_P15:1100</TargetID>
</CouplingMember>
The following attributes are sent to the distribution target when you publish a primary co-produce object:
1. Object ID
2. Class
3. Coupling Name
4. Coupling Description
5. Coupling Context
6. Primary Part Object ID
7. Primary Part Name
8. Primary Part Number
9. Primary Part Version
10. Primary Part View
11. Primary Part Usage
12. Primary Part Alternate
13. Target ID
The following attributes are sent to the distribution target when you publish a secondary co-produce object:
1. Object ID
2. Class
3. Part Object ID
4. Part Name
5. Part Number
6. Raw Material Object ID
7. Raw Material Name
8. Raw Material Number
9. Quantity
10. Unit
11. Coupling Object ID
12. Target ID
* 
When you publish a part revision that is set as a primary part of a co-produce object by using change notice, or as a promotable object in a promotion request, the related co-produce objects are also published based on the setting of the distribution target.