ALTER TABLE AD_CLIENT ADD (CONSTRAINT ADReplicationStrategy_ADClient FOREIGN KEY (AD_ReplicationStrategy_ID) REFERENCES AD_REPLICATIONSTRATEGY);

ALTER TABLE AD_REPLICATIONDOCUMENT ADD (CONSTRAINT ADTable_ADReplicationDocument FOREIGN KEY (AD_Table_ID) REFERENCES AD_TABLE);

ALTER TABLE AD_REPLICATIONDOCUMENT ADD (CONSTRAINT CDocType_ADReplicationDocument FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);

ALTER TABLE AD_REPLICATIONSTRATEGY ADD (CONSTRAINT EXPProcessor_ADReplicationStra FOREIGN KEY (EXP_Processor_ID) REFERENCES EXP_PROCESSOR);

ALTER TABLE AD_WF_NODE ADD (CONSTRAINT CBPartner_ADWFNode FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE AD_WF_NODE ADD (CONSTRAINT SResource_ADWFNode FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE AD_WORKFLOW ADD (CONSTRAINT SResource_ADWorkflow FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE C_BPARTNER ADD (CONSTRAINT CTaxGroup_CBPartner FOREIGN KEY (C_TaxGroup_ID) REFERENCES C_TAXGROUP);

ALTER TABLE C_CASHLINE ADD (CONSTRAINT CPayment_CCashLine FOREIGN KEY (C_Payment_ID) REFERENCES C_PAYMENT);

ALTER TABLE C_INVOICE ADD (CONSTRAINT Reversal_CInvoice FOREIGN KEY (Reversal_ID) REFERENCES C_INVOICE);

ALTER TABLE C_ORDER ADD (CONSTRAINT LinkOrder_COrder FOREIGN KEY (Link_Order_ID) REFERENCES C_ORDER);

ALTER TABLE C_ORDERLINE ADD (CONSTRAINT LinkOrderLine_COrderLine FOREIGN KEY (Link_OrderLine_ID) REFERENCES C_ORDERLINE);

ALTER TABLE C_PAYMENT ADD (CONSTRAINT Reversal_CPayment FOREIGN KEY (Reversal_ID) REFERENCES C_PAYMENT);

ALTER TABLE C_POS ADD (CONSTRAINT CBankAccount_CPOS FOREIGN KEY (C_BankAccount_ID) REFERENCES C_BANKACCOUNT);

ALTER TABLE C_TAX ADD (CONSTRAINT ADRule_CTax FOREIGN KEY (AD_Rule_ID) REFERENCES AD_RULE);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT ADOrgType_CTaxDefinition FOREIGN KEY (AD_OrgType_ID) REFERENCES AD_ORGTYPE);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CBPartner_CTaxDefinition FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CBPGroup_CTaxDefinition FOREIGN KEY (C_BP_Group_ID) REFERENCES C_BP_GROUP);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CTax_CTaxDefinition FOREIGN KEY (C_Tax_ID) REFERENCES C_TAX);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CTaxBase_CTaxDefinition FOREIGN KEY (C_TaxBase_ID) REFERENCES C_TAXBASE);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CTaxCategory_CTaxDefinition FOREIGN KEY (C_TaxCategory_ID) REFERENCES C_TAXCATEGORY);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CTaxGroup_CTaxDefinition FOREIGN KEY (C_TaxGroup_ID) REFERENCES C_TAXGROUP);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT CTaxType_CTaxDefinition FOREIGN KEY (C_TaxType_ID) REFERENCES C_TAXTYPE);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT MProduct_CTaxDefinition FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE C_TAXDEFINITION ADD (CONSTRAINT MProductCategory_CTaxDefinitio FOREIGN KEY (M_Product_Category_ID) REFERENCES M_PRODUCT_CATEGORY);

ALTER TABLE DD_NETWORKDISTRIBUTION ADD (CONSTRAINT MChangeNotice_DDNetworkDistrib FOREIGN KEY (M_ChangeNotice_ID) REFERENCES M_CHANGENOTICE);

ALTER TABLE DD_NETWORKDISTRIBUTIONLINE ADD (CONSTRAINT DDNetworkDistribution_DDNetwor FOREIGN KEY (DD_NetworkDistribution_ID) REFERENCES DD_NETWORKDISTRIBUTION);

ALTER TABLE DD_NETWORKDISTRIBUTIONLINE ADD (CONSTRAINT MShipper_DDNetworkDistribution FOREIGN KEY (M_Shipper_ID) REFERENCES M_SHIPPER);

ALTER TABLE DD_NETWORKDISTRIBUTIONLINE ADD (CONSTRAINT MWarehouse_DDNetworkDistributi FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE DD_NETWORKDISTRIBUTIONLINE ADD (CONSTRAINT MWarehouseSource_DDNetworkDist FOREIGN KEY (M_WarehouseSource_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT ADOrgTrx_DDOrder FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG);

ALTER TABLE DD_ORDER ADD (CONSTRAINT ADUser_DDOrder FOREIGN KEY (AD_User_ID) REFERENCES AD_USER);

ALTER TABLE DD_ORDER ADD (CONSTRAINT SalesRep_DDOrder FOREIGN KEY (SalesRep_ID) REFERENCES AD_USER);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CActivity_DDOrder FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CBPartner_DDOrder FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CBPartnerLocation_DDOrder FOREIGN KEY (C_BPartner_Location_ID) REFERENCES C_BPARTNER_LOCATION);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CCampaign_DDOrder FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CCharge_DDOrder FOREIGN KEY (C_Charge_ID) REFERENCES C_CHARGE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CDocType_DDOrder FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT User1_DDOrder FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT User2_DDOrder FOREIGN KEY (User2_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CInvoice_DDOrder FOREIGN KEY (C_Invoice_ID) REFERENCES C_INVOICE);

ALTER TABLE DD_ORDER ADD (CONSTRAINT COrder_DDOrder FOREIGN KEY (C_Order_ID) REFERENCES C_ORDER);

ALTER TABLE DD_ORDER ADD (CONSTRAINT CProject_DDOrder FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);

ALTER TABLE DD_ORDER ADD (CONSTRAINT MShipper_DDOrder FOREIGN KEY (M_Shipper_ID) REFERENCES M_SHIPPER);

ALTER TABLE DD_ORDER ADD (CONSTRAINT MWarehouse_DDOrder FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT ADOrgTrx_DDOrderLine FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT CActivity_DDOrderLine FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT CCampaign_DDOrderLine FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT CCharge_DDOrderLine FOREIGN KEY (C_Charge_ID) REFERENCES C_CHARGE);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT User1_DDOrderLine FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT User2_DDOrderLine FOREIGN KEY (User2_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT CProject_DDOrderLine FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT CUOM_DDOrderLine FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT DDOrder_DDOrderLine FOREIGN KEY (DD_Order_ID) REFERENCES DD_ORDER);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT MLocator_DDOrderLine FOREIGN KEY (M_Locator_ID) REFERENCES M_LOCATOR);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT MLocatorTo_DDOrderLine FOREIGN KEY (M_LocatorTo_ID) REFERENCES M_LOCATOR);

ALTER TABLE DD_ORDERLINE ADD (CONSTRAINT MProduct_DDOrderLine FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE EXP_FORMAT ADD (CONSTRAINT ADTable_EXPFormat FOREIGN KEY (AD_Table_ID) REFERENCES AD_TABLE);

ALTER TABLE EXP_FORMATLINE ADD (CONSTRAINT ADColumn_EXPFormatLine FOREIGN KEY (AD_Column_ID) REFERENCES AD_COLUMN);

ALTER TABLE EXP_FORMATLINE ADD (CONSTRAINT EXPEmbeddedFormat_EXPFormatLin FOREIGN KEY (EXP_EmbeddedFormat_ID) REFERENCES EXP_FORMAT);

ALTER TABLE EXP_FORMATLINE ADD (CONSTRAINT EXPFormat_EXPFormatLine FOREIGN KEY (EXP_Format_ID) REFERENCES EXP_FORMAT);

ALTER TABLE EXP_PROCESSOR ADD (CONSTRAINT EXPProcessorType_EXPProcessor FOREIGN KEY (EXP_Processor_Type_ID) REFERENCES EXP_PROCESSOR_TYPE);

ALTER TABLE EXP_PROCESSORPARAMETER ADD (CONSTRAINT EXPProcessor_EXPProcessorParam FOREIGN KEY (EXP_Processor_ID) REFERENCES EXP_PROCESSOR);

ALTER TABLE GL_JOURNAL ADD (CONSTRAINT Reversal_GLJournal FOREIGN KEY (Reversal_ID) REFERENCES GL_JOURNAL);

ALTER TABLE GL_JOURNALBATCH ADD (CONSTRAINT Reversal_GLJournalBatch FOREIGN KEY (Reversal_ID) REFERENCES GL_JOURNALBATCH);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT ADRule_HRAttribute FOREIGN KEY (AD_Rule_ID) REFERENCES AD_RULE);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT CBPartner_HRAttribute FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT HRConcept_HRAttribute FOREIGN KEY (HR_Concept_ID) REFERENCES HR_CONCEPT);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT HRDepartment_HRAttribute FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT HREmployee_HRAttribute FOREIGN KEY (HR_Employee_ID) REFERENCES HR_EMPLOYEE);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT HRJob_HRAttribute FOREIGN KEY (HR_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_ATTRIBUTE ADD (CONSTRAINT HRPayroll_HRAttribute FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_CONCEPT ADD (CONSTRAINT HRConceptCategory_HRConcept FOREIGN KEY (HR_Concept_Category_ID) REFERENCES HR_CONCEPT_CATEGORY);

ALTER TABLE HR_CONCEPT ADD (CONSTRAINT HRDepartment_HRConcept FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_CONCEPT ADD (CONSTRAINT HRJob_HRConcept FOREIGN KEY (HR_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_CONCEPT ADD (CONSTRAINT HRPayroll_HRConcept FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_CONCEPT_ACCT ADD (CONSTRAINT CAcctSchema_HRConceptAcct FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);

ALTER TABLE HR_CONCEPT_ACCT ADD (CONSTRAINT CBPGroup_HRConceptAcct FOREIGN KEY (C_BP_Group_ID) REFERENCES C_BP_GROUP);

ALTER TABLE HR_CONCEPT_ACCT ADD (CONSTRAINT User1_HRConceptAcct FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE HR_CONCEPT_ACCT ADD (CONSTRAINT HRConcept_HRConceptAcct FOREIGN KEY (HR_Concept_ID) REFERENCES HR_CONCEPT);

ALTER TABLE HR_CONTRACT ADD (CONSTRAINT CBPartner_HRContract FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE HR_CONTRACT ADD (CONSTRAINT CCampaign_HRContract FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);

ALTER TABLE HR_CONTRACT ADD (CONSTRAINT CProject_HRContract FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);

ALTER TABLE HR_EMPLOYEE ADD (CONSTRAINT CActivity_HREmployee FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE HR_EMPLOYEE ADD (CONSTRAINT CBPartner_HREmployee FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE HR_EMPLOYEE ADD (CONSTRAINT HRDepartment_HREmployee FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_EMPLOYEE ADD (CONSTRAINT HRJob_HREmployee FOREIGN KEY (HR_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_EMPLOYEE ADD (CONSTRAINT HRPayroll_HREmployee FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_JOB ADD (CONSTRAINT Supervisor_HRJob FOREIGN KEY (Supervisor_ID) REFERENCES AD_USER);

ALTER TABLE HR_JOB ADD (CONSTRAINT HRDepartment_HRJob FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_JOB ADD (CONSTRAINT NextJob_HRJob FOREIGN KEY (Next_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_LIST ADD (CONSTRAINT HRDepartment_HRList FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_LIST ADD (CONSTRAINT HREmployee_HRList FOREIGN KEY (HR_Employee_ID) REFERENCES HR_EMPLOYEE);

ALTER TABLE HR_LIST ADD (CONSTRAINT HRListType_HRList FOREIGN KEY (HR_ListType_ID) REFERENCES HR_LISTTYPE);

ALTER TABLE HR_LIST ADD (CONSTRAINT HRPayroll_HRList FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_LISTLINE ADD (CONSTRAINT HRListVersion_HRListLine FOREIGN KEY (HR_ListVersion_ID) REFERENCES HR_LISTVERSION);

ALTER TABLE HR_LISTVERSION ADD (CONSTRAINT HRListBase_HRListVersion FOREIGN KEY (HR_ListBase_ID) REFERENCES HR_LIST);

ALTER TABLE HR_LISTVERSION ADD (CONSTRAINT HRList_HRListVersion FOREIGN KEY (HR_List_ID) REFERENCES HR_LIST);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT ADRule_HRMovement FOREIGN KEY (AD_Rule_ID) REFERENCES AD_RULE);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT CActivity_HRMovement FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT CBPartner_HRMovement FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT HRConcept_HRMovement FOREIGN KEY (HR_Concept_ID) REFERENCES HR_CONCEPT);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT HRConceptCategory_HRMovement FOREIGN KEY (HR_Concept_Category_ID) REFERENCES HR_CONCEPT_CATEGORY);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT HRDepartment_HRMovement FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT HRJob_HRMovement FOREIGN KEY (HR_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_MOVEMENT ADD (CONSTRAINT HRProcess_HRMovement FOREIGN KEY (HR_Process_ID) REFERENCES HR_PROCESS);

ALTER TABLE HR_PAYROLL ADD (CONSTRAINT ADPrintFormat_HRPayroll FOREIGN KEY (AD_PrintFormat_ID) REFERENCES AD_PRINTFORMAT);

ALTER TABLE HR_PAYROLL ADD (CONSTRAINT CCharge_HRPayroll FOREIGN KEY (C_Charge_ID) REFERENCES C_CHARGE);

ALTER TABLE HR_PAYROLL ADD (CONSTRAINT HRContract_HRPayroll FOREIGN KEY (HR_Contract_ID) REFERENCES HR_CONTRACT);

ALTER TABLE HR_PAYROLLCONCEPT ADD (CONSTRAINT ADRule_HRPayrollConcept FOREIGN KEY (AD_Rule_ID) REFERENCES AD_RULE);

ALTER TABLE HR_PAYROLLCONCEPT ADD (CONSTRAINT HRConcept_HRPayrollConcept FOREIGN KEY (HR_Concept_ID) REFERENCES HR_CONCEPT);

ALTER TABLE HR_PAYROLLCONCEPT ADD (CONSTRAINT HRPayroll_HRPayrollConcept FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_PERIOD ADD (CONSTRAINT CPeriod_HRPeriod FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);

ALTER TABLE HR_PERIOD ADD (CONSTRAINT CYear_HRPeriod FOREIGN KEY (C_Year_ID) REFERENCES C_YEAR);

ALTER TABLE HR_PERIOD ADD (CONSTRAINT HRPayroll_HRPeriod FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_PERIOD ADD (CONSTRAINT HRYear_HRPeriod FOREIGN KEY (HR_Year_ID) REFERENCES HR_YEAR);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT ADPrintFormat_HRProcess FOREIGN KEY (AD_PrintFormat_ID) REFERENCES AD_PRINTFORMAT);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT ADWorkflow_HRProcess FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT CBPartner_HRProcess FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT CCharge_HRProcess FOREIGN KEY (C_Charge_ID) REFERENCES C_CHARGE);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT CDocType_HRProcess FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT CDocTypeTarget_HRProcess FOREIGN KEY (C_DocTypeTarget_ID) REFERENCES C_DOCTYPE);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT CPaySelection_HRProcess FOREIGN KEY (C_PaySelection_ID) REFERENCES C_PAYSELECTION);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT HRDepartment_HRProcess FOREIGN KEY (HR_Department_ID) REFERENCES HR_DEPARTMENT);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT HREmployee_HRProcess FOREIGN KEY (HR_Employee_ID) REFERENCES HR_EMPLOYEE);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT HRJob_HRProcess FOREIGN KEY (HR_Job_ID) REFERENCES HR_JOB);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT HRPayroll_HRProcess FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT HRPeriod_HRProcess FOREIGN KEY (HR_Period_ID) REFERENCES HR_PERIOD);

ALTER TABLE HR_PROCESS ADD (CONSTRAINT Reversal_HRProcess FOREIGN KEY (Reversal_ID) REFERENCES HR_PROCESS);

ALTER TABLE HR_YEAR ADD (CONSTRAINT CYear_HRYear FOREIGN KEY (C_Year_ID) REFERENCES C_YEAR);

ALTER TABLE HR_YEAR ADD (CONSTRAINT HRPayroll_HRYear FOREIGN KEY (HR_Payroll_ID) REFERENCES HR_PAYROLL);

ALTER TABLE IMP_PROCESSOR ADD (CONSTRAINT IMPProcessorType_IMPProcessor FOREIGN KEY (IMP_Processor_Type_ID) REFERENCES IMP_PROCESSOR_TYPE);

ALTER TABLE IMP_PROCESSORLOG ADD (CONSTRAINT IMPProcessor_IMPProcessorLog FOREIGN KEY (IMP_Processor_ID) REFERENCES IMP_PROCESSOR);

ALTER TABLE IMP_PROCESSORPARAMETER ADD (CONSTRAINT IMPProcessor_IMPProcessorParam FOREIGN KEY (IMP_Processor_ID) REFERENCES IMP_PROCESSOR);

ALTER TABLE M_FORECASTLINE ADD (CONSTRAINT MWarehouse_MForecastLine FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE M_INOUT ADD (CONSTRAINT Reversal_MInOut FOREIGN KEY (Reversal_ID) REFERENCES M_INOUT);

ALTER TABLE M_INVENTORY ADD (CONSTRAINT Reversal_MInventory FOREIGN KEY (Reversal_ID) REFERENCES M_INVENTORY);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT ADUser_MMovement FOREIGN KEY (AD_User_ID) REFERENCES AD_USER);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT SalesRep_MMovement FOREIGN KEY (SalesRep_ID) REFERENCES AD_USER);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT CBPartner_MMovement FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT CCharge_MMovement FOREIGN KEY (C_Charge_ID) REFERENCES C_CHARGE);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT DDOrder_MMovement FOREIGN KEY (DD_Order_ID) REFERENCES DD_ORDER);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT Reversal_MMovement FOREIGN KEY (Reversal_ID) REFERENCES M_MOVEMENT);

ALTER TABLE M_MOVEMENT ADD (CONSTRAINT MShipper_MMovement FOREIGN KEY (M_Shipper_ID) REFERENCES M_SHIPPER);

ALTER TABLE M_MOVEMENTLINE ADD (CONSTRAINT DDOrderLine_MMovementLine FOREIGN KEY (DD_OrderLine_ID) REFERENCES DD_ORDERLINE);

ALTER TABLE M_TRANSACTION ADD (CONSTRAINT PPOrder_MTransaction FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE M_TRANSACTION ADD (CONSTRAINT PPOrderBOMLine_MTransaction FOREIGN KEY (PP_Order_BOMLine_ID) REFERENCES PP_ORDER_BOMLINE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT ADOrgTrx_PPCostCollector FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT ADUser_PPCostCollector FOREIGN KEY (AD_User_ID) REFERENCES AD_USER);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT User1_PPCostCollector FOREIGN KEY (User1_ID) REFERENCES AD_USER);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT User2_PPCostCollector FOREIGN KEY (User2_ID) REFERENCES AD_USER);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CActivity_PPCostCollector FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CCampaign_PPCostCollector FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CDocType_PPCostCollector FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CDocTypeTarget_PPCostCollector FOREIGN KEY (C_DocTypeTarget_ID) REFERENCES C_DOCTYPE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CProject_PPCostCollector FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT CUOM_PPCostCollector FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT MProduct_PPCostCollector FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT MWarehouse_PPCostCollector FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT Reversal_PPCostCollector FOREIGN KEY (Reversal_ID) REFERENCES PP_COST_COLLECTOR);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT PPOrder_PPCostCollector FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT PPOrderBOMLine_PPCostCollector FOREIGN KEY (PP_Order_BOMLine_ID) REFERENCES PP_ORDER_BOMLINE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT PPOrderNode_PPCostCollector FOREIGN KEY (PP_Order_Node_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT PPOrderWorkflow_PPCostCollecto FOREIGN KEY (PP_Order_Workflow_ID) REFERENCES PP_ORDER_WORKFLOW);

ALTER TABLE PP_COST_COLLECTOR ADD (CONSTRAINT SResource_PPCostCollector FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_MRP ADD (CONSTRAINT Planner_PPMRP FOREIGN KEY (Planner_ID) REFERENCES AD_USER);

ALTER TABLE PP_MRP ADD (CONSTRAINT CBPartner_PPMRP FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE PP_MRP ADD (CONSTRAINT COrder_PPMRP FOREIGN KEY (C_Order_ID) REFERENCES C_ORDER);

ALTER TABLE PP_MRP ADD (CONSTRAINT COrderLine_PPMRP FOREIGN KEY (C_OrderLine_ID) REFERENCES C_ORDERLINE);

ALTER TABLE PP_MRP ADD (CONSTRAINT MForecast_PPMRP FOREIGN KEY (M_Forecast_ID) REFERENCES M_FORECAST);

ALTER TABLE PP_MRP ADD (CONSTRAINT MForecastLine_PPMRP FOREIGN KEY (M_ForecastLine_ID) REFERENCES M_FORECASTLINE);

ALTER TABLE PP_MRP ADD (CONSTRAINT MProduct_PPMRP FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_MRP ADD (CONSTRAINT MRequisition_PPMRP FOREIGN KEY (M_Requisition_ID) REFERENCES M_REQUISITION);

ALTER TABLE PP_MRP ADD (CONSTRAINT MRequisitionLine_PPMRP FOREIGN KEY (M_RequisitionLine_ID) REFERENCES M_REQUISITIONLINE);

ALTER TABLE PP_MRP ADD (CONSTRAINT MWarehouse_PPMRP FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE PP_MRP ADD (CONSTRAINT PPOrder_PPMRP FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_MRP ADD (CONSTRAINT PPOrderBOMLine_PPMRP FOREIGN KEY (PP_Order_BOMLine_ID) REFERENCES PP_ORDER_BOMLINE);

ALTER TABLE PP_MRP ADD (CONSTRAINT SResource_PPMRP FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT ADOrgTrx_PPOrder FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG);

ALTER TABLE PP_ORDER ADD (CONSTRAINT Planner_PPOrder FOREIGN KEY (Planner_ID) REFERENCES AD_USER);

ALTER TABLE PP_ORDER ADD (CONSTRAINT ADWorkflow_PPOrder FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CActivity_PPOrder FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CCampaign_PPOrder FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CDocType_PPOrder FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CDocTypeTarget_PPOrder FOREIGN KEY (C_DocTypeTarget_ID) REFERENCES C_DOCTYPE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT User1_PPOrder FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT User2_PPOrder FOREIGN KEY (User2_ID) REFERENCES C_ELEMENTVALUE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT COrderLine_PPOrder FOREIGN KEY (C_OrderLine_ID) REFERENCES C_ORDERLINE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CProject_PPOrder FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);

ALTER TABLE PP_ORDER ADD (CONSTRAINT CUOM_PPOrder FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_ORDER ADD (CONSTRAINT MProduct_PPOrder FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_ORDER ADD (CONSTRAINT MWarehouse_PPOrder FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE PP_ORDER ADD (CONSTRAINT PPProductBOM_PPOrder FOREIGN KEY (PP_Product_BOM_ID) REFERENCES PP_PRODUCT_BOM);

ALTER TABLE PP_ORDER ADD (CONSTRAINT SResource_PPOrder FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_ORDER_BOM ADD (CONSTRAINT CUOM_PPOrderBOM FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_ORDER_BOM ADD (CONSTRAINT MChangeNotice_PPOrderBOM FOREIGN KEY (M_ChangeNotice_ID) REFERENCES M_CHANGENOTICE);

ALTER TABLE PP_ORDER_BOM ADD (CONSTRAINT MProduct_PPOrderBOM FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_ORDER_BOM ADD (CONSTRAINT PPOrder_PPOrderBOM FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT CUOM_PPOrderBOMLine FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT MChangeNotice_PPOrderBOMLine FOREIGN KEY (M_ChangeNotice_ID) REFERENCES M_CHANGENOTICE);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT MProduct_PPOrderBOMLine FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT MWarehouse_PPOrderBOMLine FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT PPOrder_PPOrderBOMLine FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_BOMLINE ADD (CONSTRAINT PPOrderBOM_PPOrderBOMLine FOREIGN KEY (PP_Order_BOM_ID) REFERENCES PP_ORDER_BOM);

ALTER TABLE PP_ORDER_BOMLINEMA ADD (CONSTRAINT PPOrderBOMLine_PPOrderBOMLineM FOREIGN KEY (PP_Order_BOMLine_ID) REFERENCES PP_ORDER_BOMLINE);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT ADWorkflow_PPOrderCost FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT CAcctSchema_PPOrderCost FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT MCostElement_PPOrderCost FOREIGN KEY (M_CostElement_ID) REFERENCES M_COSTELEMENT);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT MCostType_PPOrderCost FOREIGN KEY (M_CostType_ID) REFERENCES M_COSTTYPE);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT MProduct_PPOrderCost FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_ORDER_COST ADD (CONSTRAINT PPOrder_PPOrderCost FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADColumn_PPOrderNode FOREIGN KEY (AD_Column_ID) REFERENCES AD_COLUMN);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT EntityT_PPOrderNode FOREIGN KEY (EntityType) REFERENCES AD_ENTITYTYPE);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADForm_PPOrderNode FOREIGN KEY (AD_Form_ID) REFERENCES AD_FORM);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADImage_PPOrderNode FOREIGN KEY (AD_Image_ID) REFERENCES AD_IMAGE);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADProcess_PPOrderNode FOREIGN KEY (AD_Process_ID) REFERENCES AD_PROCESS);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADTask_PPOrderNode FOREIGN KEY (AD_Task_ID) REFERENCES AD_TASK);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADWFBlock_PPOrderNode FOREIGN KEY (AD_WF_Block_ID) REFERENCES AD_WF_BLOCK);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADWFNode_PPOrderNode FOREIGN KEY (AD_WF_Node_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADWFResponsible_PPOrderNode FOREIGN KEY (AD_WF_Responsible_ID) REFERENCES AD_WF_RESPONSIBLE);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADWindow_PPOrderNode FOREIGN KEY (AD_Window_ID) REFERENCES AD_WINDOW);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT ADWorkflow_PPOrderNode FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT Workflow_PPOrderNode FOREIGN KEY (Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT CBPartner_PPOrderNode FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT PPOrder_PPOrderNode FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT PPOrderWorkflow_PPOrderNode FOREIGN KEY (PP_Order_Workflow_ID) REFERENCES PP_ORDER_WORKFLOW);

ALTER TABLE PP_ORDER_NODE ADD (CONSTRAINT SResource_PPOrderNode FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_ORDER_NODE_ASSET ADD (CONSTRAINT AAsset_PPOrderNodeAsset FOREIGN KEY (A_Asset_ID) REFERENCES A_ASSET);

ALTER TABLE PP_ORDER_NODE_ASSET ADD (CONSTRAINT PPOrder_PPOrderNodeAsset FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_NODE_ASSET ADD (CONSTRAINT PPOrderNode_PPOrderNodeAsset FOREIGN KEY (PP_Order_Node_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_ORDER_NODE_ASSET ADD (CONSTRAINT PPOrderWorkflow_PPOrderNodeAss FOREIGN KEY (PP_Order_Workflow_ID) REFERENCES PP_ORDER_WORKFLOW);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT EntityT_PPOrderNodeNext FOREIGN KEY (EntityType) REFERENCES AD_ENTITYTYPE);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT ADWFNext_PPOrderNodeNext FOREIGN KEY (AD_WF_Next_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT ADWFNode_PPOrderNodeNext FOREIGN KEY (AD_WF_Node_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT PPOrder_PPOrderNodeNext FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT PPOrderNext_PPOrderNodeNext FOREIGN KEY (PP_Order_Next_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_ORDER_NODENEXT ADD (CONSTRAINT PPOrderNode_PPOrderNodeNext FOREIGN KEY (PP_Order_Node_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_ORDER_NODE_PRODUCT ADD (CONSTRAINT MProduct_PPOrderNodeProduct FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_ORDER_NODE_PRODUCT ADD (CONSTRAINT PPOrder_PPOrderNodeProduct FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_NODE_PRODUCT ADD (CONSTRAINT PPOrderNode_PPOrderNodeProduct FOREIGN KEY (PP_Order_Node_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_ORDER_NODE_PRODUCT ADD (CONSTRAINT PPOrderWorkflow_PPOrderNodePro FOREIGN KEY (PP_Order_Workflow_ID) REFERENCES PP_ORDER_WORKFLOW);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT EntityT_PPOrderWorkflow FOREIGN KEY (EntityType) REFERENCES AD_ENTITYTYPE);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT ADTable_PPOrderWorkflow FOREIGN KEY (AD_Table_ID) REFERENCES AD_TABLE);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT ADWFNode_PPOrderWorkflow FOREIGN KEY (AD_WF_Node_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT ADWFResponsible_PPOrderWorkflo FOREIGN KEY (AD_WF_Responsible_ID) REFERENCES AD_WF_RESPONSIBLE);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT ADWorkflow_PPOrderWorkflow FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT ADWorkflowProcessor_PPOrderWor FOREIGN KEY (AD_WorkflowProcessor_ID) REFERENCES AD_WORKFLOWPROCESSOR);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT PPOrder_PPOrderWorkflow FOREIGN KEY (PP_Order_ID) REFERENCES PP_ORDER);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT PPOrderNode_PPOrderWorkflow FOREIGN KEY (PP_Order_Node_ID) REFERENCES PP_ORDER_NODE);

ALTER TABLE PP_ORDER_WORKFLOW ADD (CONSTRAINT SResource_PPOrderWorkflow FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_PRODUCT_BOM ADD (CONSTRAINT CUOM_PPProductBOM FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_PRODUCT_BOM ADD (CONSTRAINT MChangeNotice_PPProductBOM FOREIGN KEY (M_ChangeNotice_ID) REFERENCES M_CHANGENOTICE);

ALTER TABLE PP_PRODUCT_BOM ADD (CONSTRAINT MProduct_PPProductBOM FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_PRODUCT_BOMLINE ADD (CONSTRAINT CUOM_PPProductBOMLine FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);

ALTER TABLE PP_PRODUCT_BOMLINE ADD (CONSTRAINT MChangeNotice_PPProductBOMLine FOREIGN KEY (M_ChangeNotice_ID) REFERENCES M_CHANGENOTICE);

ALTER TABLE PP_PRODUCT_BOMLINE ADD (CONSTRAINT MProduct_PPProductBOMLine FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_PRODUCT_BOMLINE ADD (CONSTRAINT PPProductBOM_PPProductBOMLine FOREIGN KEY (PP_Product_BOM_ID) REFERENCES PP_PRODUCT_BOM);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT Planner_PPProductPlanning FOREIGN KEY (Planner_ID) REFERENCES AD_USER);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT ADWorkflow_PPProductPlanning FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT DDNetworkDistribution_PPProduc FOREIGN KEY (DD_NetworkDistribution_ID) REFERENCES DD_NETWORKDISTRIBUTION);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT MProduct_PPProductPlanning FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT MWarehouse_PPProductPlanning FOREIGN KEY (M_Warehouse_ID) REFERENCES M_WAREHOUSE);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT PPProductBOM_PPProductPlanning FOREIGN KEY (PP_Product_BOM_ID) REFERENCES PP_PRODUCT_BOM);

ALTER TABLE PP_PRODUCT_PLANNING ADD (CONSTRAINT SResource_PPProductPlanning FOREIGN KEY (S_Resource_ID) REFERENCES S_RESOURCE);

ALTER TABLE PP_WF_NODE_ASSET ADD (CONSTRAINT AAsset_PPWFNodeAsset FOREIGN KEY (A_Asset_ID) REFERENCES A_ASSET);

ALTER TABLE PP_WF_NODE_ASSET ADD (CONSTRAINT ADWFNode_PPWFNodeAsset FOREIGN KEY (AD_WF_Node_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_WF_NODE_PRODUCT ADD (CONSTRAINT EntityT_PPWFNodeProduct FOREIGN KEY (EntityType) REFERENCES AD_ENTITYTYPE);

ALTER TABLE PP_WF_NODE_PRODUCT ADD (CONSTRAINT ADWFNode_PPWFNodeProduct FOREIGN KEY (AD_WF_Node_ID) REFERENCES AD_WF_NODE);

ALTER TABLE PP_WF_NODE_PRODUCT ADD (CONSTRAINT MProduct_PPWFNodeProduct FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE QM_SPECIFICATION ADD (CONSTRAINT ADWorkflow_QMSpecification FOREIGN KEY (AD_Workflow_ID) REFERENCES AD_WORKFLOW);

ALTER TABLE QM_SPECIFICATION ADD (CONSTRAINT MAttributeSet_QMSpecification FOREIGN KEY (M_AttributeSet_ID) REFERENCES M_ATTRIBUTESET);

ALTER TABLE QM_SPECIFICATION ADD (CONSTRAINT MProduct_QMSpecification FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);

ALTER TABLE QM_SPECIFICATION ADD (CONSTRAINT PPProductBOM_QMSpecification FOREIGN KEY (PP_Product_BOM_ID) REFERENCES PP_PRODUCT_BOM);

ALTER TABLE QM_SPECIFICATIONLINE ADD (CONSTRAINT MAttribute_QMSpecificationLine FOREIGN KEY (M_Attribute_ID) REFERENCES M_ATTRIBUTE);

ALTER TABLE QM_SPECIFICATIONLINE ADD (CONSTRAINT QMSpecification_QMSpecificatio FOREIGN KEY (QM_Specification_ID) REFERENCES QM_SPECIFICATION);