<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS? Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS? BOD XML Schema (XSD) Definition.
        
        License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
? Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date                  By       Note
03 Jun 2011   NO      Added new noun based upon ProductionOrder (JIRA BOD-1569)
        *****     Update End     *****
 
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schema.infor.com/InforOAGIS/2"
        targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
        attributeFormDefault="unqualified">

        <xsd:include schemaLocation="../Components/Operational/ManufacturingComponents.xsd"/>

        <xsd:element name="PlannedProductionOrder" type="PlannedProductionOrderType">

                <xsd:annotation>
                        <xsd:documentation source="http://schema.infor.com/InforOAGIS/2">A planning concept in which planning data 
                                is handled in the form of orders.  In order planning, supply is planned in the form of planned orders.
                                LN takes into account the start and finish dates of individual planned orders.  For production planning, this 
                                method considers all material and capacity requirements, as recorded in an item's BOM and routing.
                                These planned orders can be firmed, confirmed and transferred into execution level orders (purchase, 
                                production and warehouse transfers).  Transferring the planned order means: execution order gets created 
                                and planned order gets deleted. Identifier of planned order and execution order do not match, they are 
                                separate entities.</xsd:documentation>
                </xsd:annotation>
                
        </xsd:element>
        
        <xsd:element name="PlannedProductionOrderHeader" type="PlannedProductionOrderHeaderType"/>
        <xsd:element name="PlannedProductionOrderDetail" type="PlannedProductionOrderDetailType"/>
        
        <xsd:complexType name="PlannedProductionOrderType">
                <xsd:sequence>
                        <xsd:element ref="PlannedProductionOrderHeader" minOccurs="0"/>
                        <xsd:element ref="PlannedProductionOrderDetail" minOccurs="0" maxOccurs="unbounded"/>
                  
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="PlannedProductionOrderHeaderType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledHeaderType">
                                <xsd:sequence>
                               
                                        <xsd:element ref="BOMReference" minOccurs="0">
                                                <xsd:annotation>
                                                        <xsd:documentation>Has been deprecated</xsd:documentation>
                                                </xsd:annotation>  
                                        </xsd:element>
                                        <xsd:element ref="Item" minOccurs="0" maxOccurs="unbounded" />
                                        <xsd:element ref="ItemInstance" minOccurs="0" maxOccurs="unbounded"/>
                                        
                                        <xsd:element ref="OriginalBillOfResourcesReference" minOccurs="0"/>
                                        <xsd:element ref="Site" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="Party" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="OriginationCountryCode" minOccurs="0"/>
                                        <xsd:element ref="DestinationCountryCode" minOccurs="0"/>
                                        <xsd:element ref="PriorityCode" minOccurs="0"/>
                                        <xsd:element ref="OrderQuantity" minOccurs="0"/>
                                        <xsd:element ref="RequiredQuantity" minOccurs="0"/>
                                        <xsd:element ref="DueQuantity" minOccurs="0"/>
                                        <xsd:element ref="ExecutionTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="ForecastedTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="RunTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="SetupTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="TearDownTimePeriod" minOccurs="0"/>
                                        <xsd:element ref="NeedDeliveryDate" minOccurs="0"/>
                                        <xsd:element ref="DueDateTime" minOccurs="0"/>
                                        <xsd:element ref="RequiredDateTime" minOccurs="0"/>
                                        <xsd:element ref="AvailableDateTime" minOccurs="0"/>
                                        <xsd:element ref="ReasonCode" minOccurs="0"/>
                                        <xsd:element ref="KanbanNumber" minOccurs="0"/>
                                        <xsd:element ref="SerializedLot" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="Distribution" minOccurs="0"/>
                                        <xsd:element ref="UserArea" minOccurs="0"/>
                                        <xsd:element ref="ReworkIndicator" minOccurs="0"/>
                                        <xsd:element ref="PlannerPersonReference" minOccurs="0"
                                                maxOccurs="unbounded"/>
                                        <xsd:element ref="ShopFloorPlannerPersonReference"
                                                minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="ForwardScheduleIndicator" minOccurs="0"/>
                                        <xsd:element ref="PlannedDueDate" minOccurs="0"/>
                                        <xsd:element ref="RequestedDeliveryDate" minOccurs="0"/>
                                        <xsd:element ref="Costing" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="ScrapQuantity" minOccurs="0"/>
                                        <xsd:element ref="Rejection" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="BackFlushedIndicator" minOccurs="0"/>
                                        <xsd:element ref="EarliestStartDateTime" minOccurs="0" />
                                </xsd:sequence>
                                <xsd:attribute name="type" type="StringType" use="optional"/>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>
        
        <xsd:complexType name="PlannedProductionOrderDetailType">
                <xsd:complexContent>
                        <xsd:extension base="StatusEnabledSequenceType">
                                <xsd:sequence>
                                        <xsd:element ref="OriginalBillOfResourcesReference" minOccurs="0" maxOccurs="1"/>
                                        <xsd:element ref="AlternateBillOfResourcesReference" minOccurs="0" maxOccurs="unbounded"/>
                                        <xsd:element ref="ParentBillOperationReference" minOccurs="0" maxOccurs="1" />
                                        <xsd:element ref="BillOfResources" minOccurs="0" maxOccurs="1"/>
                                        
                                </xsd:sequence>
                        </xsd:extension>
                </xsd:complexContent>
        </xsd:complexType>

        <xsd:element name="PlannedDueDate" type="DateTimeType"/>
        <xsd:element name="EarliestStartDateTime" type="DateTimeType"/>
        <xsd:element name="ForwardScheduleIndicator" type="IndicatorType" />
        <xsd:element name="ReworkIndicator" type="IndicatorType"/>
</xsd:schema>
