fix libero views

* correct cast('en_US' as varchar) to cast('en_US' as varchar2(6))
* make script sqlplus compatible
* never include "DROP VIEW " in your ddlutils scripts
This commit is contained in:
teo_sarca 2009-05-22 11:28:08 +00:00
parent 10ae72406c
commit 52638a5a4f
24 changed files with 68 additions and 56 deletions

View File

@ -1,8 +1,7 @@
DROP VIEW DD_ORDER_HEADER_V;
CREATE OR REPLACE VIEW DD_ORDER_HEADER_V CREATE OR REPLACE VIEW DD_ORDER_HEADER_V
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.DD_Order_ID,o.C_Order_ID, o.IsSOTrx, o.DocumentNo, o.DocStatus, o.C_DocType_ID, o.DD_Order_ID,o.C_Order_ID, o.IsSOTrx, o.DocumentNo, o.DocStatus, o.C_DocType_ID,
o.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS, o.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
@ -35,7 +34,3 @@ FROM DD_Order o
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.SalesRep_ID=u.AD_User_ID) LEFT OUTER JOIN AD_User u ON (o.SalesRep_ID=u.AD_User_ID)
LEFT OUTER JOIN C_BPartner ubp ON (u.C_BPartner_ID=ubp.C_BPartner_ID); LEFT OUTER JOIN C_BPartner ubp ON (u.C_BPartner_ID=ubp.C_BPartner_ID);

View File

@ -1,4 +1,3 @@
DROP VIEW DD_ORDER_HEADER_VT;
CREATE OR REPLACE VIEW DD_ORDER_HEADER_VT CREATE OR REPLACE VIEW DD_ORDER_HEADER_VT
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,

View File

@ -1,4 +1,3 @@
DROP VIEW M_Movement_Candidate_v;
CREATE OR REPLACE VIEW M_Movement_Candidate_v AS CREATE OR REPLACE VIEW M_Movement_Candidate_v AS
SELECT SELECT
o.AD_Client_ID, o.AD_Org_ID, o.C_BPartner_ID, o.DD_Order_ID, o.AD_Client_ID, o.AD_Org_ID, o.C_BPartner_ID, o.DD_Order_ID,

View File

@ -1,8 +1,7 @@
DROP VIEW PP_Order_BOMLine_v;
CREATE OR REPLACE VIEW PP_Order_BOMLine_v CREATE OR REPLACE VIEW PP_Order_BOMLine_v
AS AS
SELECT obl.AD_Client_ID, obl.AD_Org_ID, obl.IsActive, obl.Created, obl.CreatedBy, obl.Updated, obl.UpdatedBy, SELECT obl.AD_Client_ID, obl.AD_Org_ID, obl.IsActive, obl.Created, obl.CreatedBy, obl.Updated, obl.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
obl.Description , feature , obl.M_Product_ID, obl.backflushgroup ,obl.C_UOM_ID, obl.componentType, obl.datedelivered, obl.forecast, obl.help , obl.Description , feature , obl.M_Product_ID, obl.backflushgroup ,obl.C_UOM_ID, obl.componentType, obl.datedelivered, obl.forecast, obl.help ,
obl.iscritical, obl.issuemethod , obl.leadtimeoffset, obl.line, obl.m_attributesetinstance_id , obl.m_changenotice_id, obl.m_locator_id , obl.m_warehouse_id, obl.iscritical, obl.issuemethod , obl.leadtimeoffset, obl.line, obl.m_attributesetinstance_id , obl.m_changenotice_id, obl.m_locator_id , obl.m_warehouse_id,
obl.pp_order_bom_ID,obl.pp_order_bomLine_id,obl.pp_order_id, obl.qtydelivered, obl.qtypost, obl.qtyreject, obl.qtyscrap, obl.scrap , obl.validfrom, obl.validto , obl.assay, obl.pp_order_bom_ID,obl.pp_order_bomLine_id,obl.pp_order_id, obl.qtydelivered, obl.qtypost, obl.qtyreject, obl.qtyscrap, obl.scrap , obl.validfrom, obl.validto , obl.assay,

View File

@ -1,4 +1,3 @@
DROP VIEW PP_Order_BOMLine_vt;
CREATE OR REPLACE VIEW PP_Order_BOMLine_vt CREATE OR REPLACE VIEW PP_Order_BOMLine_vt
AS AS
SELECT SELECT

View File

@ -1,8 +1,7 @@
DROP VIEW PP_Order_BOM_Header_v;
CREATE OR REPLACE VIEW PP_Order_BOM_Header_v CREATE OR REPLACE VIEW PP_Order_BOM_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID, o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID, o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,

View File

@ -1,4 +1,3 @@
DROP VIEW PP_Order_BOM_Header_vt;
CREATE OR REPLACE VIEW PP_Order_BOM_Header_vt CREATE OR REPLACE VIEW PP_Order_BOM_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,

View File

@ -1,8 +1,7 @@
DROP VIEW PP_Order_Header_v;
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID, o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID, o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,

View File

@ -1,4 +1,3 @@
DROP VIEW PP_Order_Header_v;
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,

View File

@ -1,9 +1,8 @@
DROP VIEW PP_Order_Node_v;
CREATE OR REPLACE VIEW PP_Order_Node_v CREATE OR REPLACE VIEW PP_Order_Node_v
AS AS
SELECT SELECT
onode.AD_Client_ID, onode.AD_Org_ID, onode.IsActive, onode.Created, onode.CreatedBy, onode.Updated, onode.UpdatedBy, onode.AD_Client_ID, onode.AD_Org_ID, onode.IsActive, onode.Created, onode.CreatedBy, onode.Updated, onode.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
name, c_bpartner_id, cost, datefinish, datefinishschedule, datestart, datestartschedule , name, c_bpartner_id, cost, datefinish, datefinishschedule, datestart, datestartschedule ,
description, docaction, docstatus,duration, durationreal, durationrequiered, help, ismilestone, description, docaction, docstatus,duration, durationreal, durationrequiered, help, ismilestone,
issubcontracting, movingtime, overlapunits, issubcontracting, movingtime, overlapunits,

View File

@ -1,4 +1,3 @@
DROP VIEW PP_Order_Node_vt;
CREATE OR REPLACE VIEW PP_Order_Node_vt CREATE OR REPLACE VIEW PP_Order_Node_vt
AS AS
SELECT SELECT

View File

@ -1,8 +1,7 @@
DROP VIEW PP_Order_Workflow_Header_v;
CREATE OR REPLACE VIEW PP_Order_Workflow_Header_v CREATE OR REPLACE VIEW PP_Order_Workflow_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.PP_Order_ID,
--o.DocumentNo, --o.DocumentNo,
o.DocStatus, o.DocStatus,

View File

@ -1,4 +1,3 @@
DROP VIEW PP_Order_Workflow_Header_vt;
CREATE OR REPLACE VIEW PP_Order_Workflow_Header_vt CREATE OR REPLACE VIEW PP_Order_Workflow_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,

View File

@ -8,7 +8,7 @@ SELECT
componenttype, componenttype,
bl.created , bl.created ,
bl.createdby, bl.createdby,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
blt.description, blt.description,
forecast, forecast,
blt.help , blt.help ,

View File

@ -1,8 +1,7 @@
DROP VIEW PP_Product_BOM_Header_v;
CREATE OR REPLACE VIEW PP_Product_BOM_Header_v CREATE OR REPLACE VIEW PP_Product_BOM_Header_v
AS AS
SELECT b.AD_Client_ID, b.AD_Org_ID, b.IsActive, b.Created, b.CreatedBy, b.Updated, b.UpdatedBy, SELECT b.AD_Client_ID, b.AD_Org_ID, b.IsActive, b.Created, b.CreatedBy, b.Updated, b.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
b.DocumentNo,b.name,b.help, b.DocumentNo,b.name,b.help,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
b.Description,processing, validfrom, validto, bomtype, bomuse, m_changenotice_id, b.Description,processing, validfrom, validto, bomtype, bomuse, m_changenotice_id,

View File

@ -1,4 +1,3 @@
--DROP VIEW RV_DD_ORDERDETAIL;
CREATE OR REPLACE VIEW RV_DD_ORDERDETAIL AS CREATE OR REPLACE VIEW RV_DD_ORDERDETAIL AS
SELECT l.AD_Client_ID, l.AD_Org_ID, SELECT l.AD_Client_ID, l.AD_Org_ID,
l.IsActive, l.Created, l.CreatedBy, l.Updated, l.UpdatedBy,o.DD_Order_ID, l.IsActive, l.Created, l.CreatedBy, l.Updated, l.UpdatedBy,o.DD_Order_ID,

View File

@ -1,4 +1,3 @@
--DROP VIEW rv_pp_mrp;
CREATE OR REPLACE VIEW rv_pp_mrp AS CREATE OR REPLACE VIEW rv_pp_mrp AS
SELECT SELECT
mrp.ad_client_id, mrp.ad_client_id,

View File

@ -1,4 +1,3 @@
-- DROP VIEW rv_pp_operation_activity;
CREATE OR REPLACE VIEW rv_pp_operation_activity AS CREATE OR REPLACE VIEW rv_pp_operation_activity AS
SELECT n.ad_client_id, SELECT n.ad_client_id,
n.ad_org_id, n.ad_org_id,

View File

@ -1,4 +1,3 @@
-- DROP VIEW rv_pp_order;
CREATE OR REPLACE VIEW rv_pp_order AS CREATE OR REPLACE VIEW rv_pp_order AS
SELECT SELECT
o.ad_client_id, o.ad_client_id,

View File

@ -1,4 +1,3 @@
-- DROP VIEW rv_pp_order_bomline;
CREATE OR REPLACE VIEW rv_pp_order_bomline AS CREATE OR REPLACE VIEW rv_pp_order_bomline AS
SELECT SELECT
obl.ad_client_id, obl.ad_client_id,

View File

@ -1,5 +1,3 @@
-- DROP VIEW rv_pp_order_receipt_issue;
CREATE OR REPLACE VIEW rv_pp_order_receipt_issue AS CREATE OR REPLACE VIEW rv_pp_order_receipt_issue AS
SELECT obl.pp_order_bomline_id, SELECT obl.pp_order_bomline_id,
obl.iscritical, obl.iscritical,

View File

@ -1,4 +1,3 @@
-- DROP VIEW rv_pp_order_storage;
CREATE OR REPLACE VIEW rv_pp_order_storage AS CREATE OR REPLACE VIEW rv_pp_order_storage AS
SELECT SELECT
obl.ad_client_id, obl.ad_client_id,

View File

@ -1,4 +1,3 @@
--DROP VIEW rv_pp_order_transactions;
CREATE OR REPLACE VIEW rv_pp_order_transactions AS CREATE OR REPLACE VIEW rv_pp_order_transactions AS
SELECT DISTINCT SELECT DISTINCT
o.ad_client_id, o.ad_client_id,

View File

@ -1,7 +1,7 @@
CREATE OR REPLACE VIEW PP_Order_BOM_Header_v CREATE OR REPLACE VIEW PP_Order_BOM_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID, o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID, o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
@ -21,7 +21,7 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
CREATE OR REPLACE VIEW PP_Order_BOM_Header_vt CREATE OR REPLACE VIEW PP_Order_BOM_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
@ -46,12 +46,11 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
CREATE OR REPLACE VIEW PP_Order_BOMLine_v CREATE OR REPLACE VIEW PP_Order_BOMLine_v
AS AS
SELECT obl.AD_Client_ID, obl.AD_Org_ID, obl.IsActive, obl.Created, obl.CreatedBy, obl.Updated, obl.UpdatedBy, SELECT obl.AD_Client_ID, obl.AD_Org_ID, obl.IsActive, obl.Created, obl.CreatedBy, obl.Updated, obl.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
obl.Description , feature , obl.M_Product_ID, obl.backflushgroup ,obl.C_UOM_ID, obl.componentType, obl.datedelivered, obl.forecast, obl.help , obl.Description , feature , obl.M_Product_ID, obl.backflushgroup ,obl.C_UOM_ID, obl.componentType, obl.datedelivered, obl.forecast, obl.help ,
obl.iscritical, obl.issuemethod , obl.leadtimeoffset, obl.line, obl.m_attributesetinstance_id , obl.m_changenotice_id, obl.m_locator_id , obl.m_warehouse_id, obl.iscritical, obl.issuemethod , obl.leadtimeoffset, obl.line, obl.m_attributesetinstance_id , obl.m_changenotice_id, obl.m_locator_id , obl.m_warehouse_id,
obl.pp_order_bom_ID,obl.pp_order_bomLine_id,obl.pp_order_id, obl.qtydelivered, obl.qtypost, obl.qtyreject, obl.qtyscrap, obl.scrap , obl.validfrom, obl.validto , obl.assay, obl.pp_order_bom_ID,obl.pp_order_bomLine_id,obl.pp_order_id, obl.qtydelivered, obl.qtypost, obl.qtyreject, obl.qtyscrap, obl.scrap , obl.validfrom, obl.validto , obl.assay,
@ -66,7 +65,7 @@ round(obl.qtybatch, 4) AS qtybatch,
CASE WHEN o.qtybatchs = 0 THEN 1 ELSE round(obl.qtyrequiered / o.qtybatchs, 4) END AS qtybatchsize CASE WHEN o.qtybatchs = 0 THEN 1 ELSE round(obl.qtyrequiered / o.qtybatchs, 4) END AS qtybatchsize
FROM PP_Order_BOMLine obl FROM PP_Order_BOMLine obl
INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID); INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID);
/
CREATE OR REPLACE VIEW PP_Order_BOMLine_vt CREATE OR REPLACE VIEW PP_Order_BOMLine_vt
AS AS
SELECT SELECT
@ -87,11 +86,11 @@ CASE WHEN o.qtybatchs = 0 THEN 1 ELSE round(obl.qtyrequiered / o.qtybatchs, 4) E
FROM PP_Order_BOMLine obl FROM PP_Order_BOMLine obl
INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID) INNER JOIN PP_Order o ON (o.PP_Order_ID=obl.PP_Order_ID)
LEFT JOIN PP_Order_BOMLine_Trl oblt ON (oblt.PP_Order_BOMLine_ID=obl.PP_Order_BOMLine_ID); LEFT JOIN PP_Order_BOMLine_Trl oblt ON (oblt.PP_Order_BOMLine_ID=obl.PP_Order_BOMLine_ID);
/
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID, o.PP_Order_ID, o.DocumentNo, o.DocStatus,o.C_DocType_ID,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID, oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID, o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
@ -107,8 +106,9 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
DROP VIEW PP_Order_Header_v; DROP VIEW PP_Order_Header_v;
/
CREATE OR REPLACE VIEW PP_Order_Header_v CREATE OR REPLACE VIEW PP_Order_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
@ -128,19 +128,19 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
CREATE OR REPLACE VIEW PP_Order_Node_v CREATE OR REPLACE VIEW PP_Order_Node_v
AS AS
SELECT SELECT
onode.AD_Client_ID, onode.AD_Org_ID, onode.IsActive, onode.Created, onode.CreatedBy, onode.Updated, onode.UpdatedBy, onode.AD_Client_ID, onode.AD_Org_ID, onode.IsActive, onode.Created, onode.CreatedBy, onode.Updated, onode.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
name, c_bpartner_id, cost, datefinish, datefinishschedule, datestart, datestartschedule , name, c_bpartner_id, cost, datefinish, datefinishschedule, datestart, datestartschedule ,
description, docaction, docstatus,duration, durationreal, durationrequiered, help, ismilestone, description, docaction, docstatus,duration, durationreal, durationrequiered, help, ismilestone,
issubcontracting, movingtime, overlapunits, issubcontracting, movingtime, overlapunits,
pp_order_id, pp_order_workflow_id, onode.pp_order_node_id,priority, qtydelivered, qtyrequiered , pp_order_id, pp_order_workflow_id, onode.pp_order_node_id,priority, qtydelivered, qtyrequiered ,
qtyscrap , queuingtime , s_resource_id , setuptime ,setuptimereal, unitscycles , validfrom , validto , value , waitingtime , workingtime , yield qtyscrap , queuingtime , s_resource_id , setuptime ,setuptimereal, unitscycles , validfrom , validto , value , waitingtime , workingtime , yield
FROM PP_Order_Node onode; FROM PP_Order_Node onode;
/
CREATE OR REPLACE VIEW PP_Order_Node_vt CREATE OR REPLACE VIEW PP_Order_Node_vt
AS AS
SELECT SELECT
@ -153,11 +153,11 @@ pp_order_id, pp_order_workflow_id,onode.pp_order_node_id, priority, qtydelivered
qtyscrap , queuingtime , s_resource_id , setuptime ,setuptimereal, unitscycles , validfrom , validto , value , waitingtime , workingtime , yield qtyscrap , queuingtime , s_resource_id , setuptime ,setuptimereal, unitscycles , validfrom , validto , value , waitingtime , workingtime , yield
FROM PP_Order_Node onode FROM PP_Order_Node onode
LEFT JOIN PP_Order_Node_Trl ont ON (ont.PP_Order_Node_ID=onode.PP_Order_Node_ID); LEFT JOIN PP_Order_Node_Trl ont ON (ont.PP_Order_Node_ID=onode.PP_Order_Node_ID);
/
CREATE OR REPLACE VIEW PP_Order_Workflow_Header_v CREATE OR REPLACE VIEW PP_Order_Workflow_Header_v
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
o.PP_Order_ID, o.PP_Order_ID,
--o.DocumentNo, --o.DocumentNo,
o.DocStatus, o.DocStatus,
@ -183,7 +183,7 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
CREATE OR REPLACE VIEW PP_Order_Workflow_Header_vt CREATE OR REPLACE VIEW PP_Order_Workflow_Header_vt
AS AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy, SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
@ -213,8 +213,9 @@ FROM PP_Order o
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID) INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID); LEFT OUTER JOIN AD_User u ON (o.Planner_ID=u.AD_User_ID);
/
DROP VIEW PP_Product_BOMLine_v; DROP VIEW PP_Product_BOMLine_v;
/
CREATE VIEW PP_Product_BOMLine_v AS CREATE VIEW PP_Product_BOMLine_v AS
SELECT SELECT
feature , feature ,
@ -225,7 +226,7 @@ SELECT
componenttype, componenttype,
bl.created , bl.created ,
bl.createdby, bl.createdby,
cast('en_US' as varchar) AS AD_Language, cast('en_US' as varchar2(6)) AS AD_Language,
blt.description, blt.description,
forecast, forecast,
blt.help , blt.help ,
@ -250,9 +251,10 @@ SELECT
validto validto
FROM PP_Product_BOMLine bl FROM PP_Product_BOMLine bl
INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID); INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID);
/
DROP VIEW PP_Product_BOMLine_vt; DROP VIEW PP_Product_BOMLine_vt;
CREATE VIEW PP_Product_BOMLine_vt AS /
CREATE VIEW PP_Product_BOMLine_vt AS
SELECT SELECT
feature , feature ,
bl.ad_org_id , bl.ad_org_id ,
@ -287,4 +289,41 @@ SELECT
validto validto
FROM PP_Product_BOMLine bl FROM PP_Product_BOMLine bl
INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID); INNER JOIN PP_Product_BOMLine_Trl blt ON (blt.PP_Product_BOMLine_ID=bl.PP_Product_BOMLine_ID);
/
CREATE OR REPLACE VIEW DD_ORDER_HEADER_V
AS
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
cast('en_US' as varchar2(6)) AS AD_Language,
o.DD_Order_ID,o.C_Order_ID, o.IsSOTrx, o.DocumentNo, o.DocStatus, o.C_DocType_ID,
o.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
dt.PrintName AS DocumentType, dt.DocumentNote AS DocumentTypeNote,
o.SalesRep_ID, COALESCE(ubp.Name, u.Name) AS SalesRep_Name,
o.DateOrdered, o.DatePromised,
bpg.Greeting AS BPGreeting,
bp.Name, bp.Name2,
bpcg.Greeting AS BPContactGreeting,
bpc.Title, bpc.Phone,
NULLIF (bpc.Name, bp.Name) AS ContactName,
bpl.C_Location_ID, l.Postal || l.Postal_Add AS Postal,
bp.ReferenceNo,
o.Description,
o.POReference,
o.C_Charge_ID, o.ChargeAmt,
o.Volume, o.Weight,
o.C_Campaign_ID, o.C_Project_ID, o.C_Activity_ID,
o.M_Shipper_ID, o.DeliveryRule, o.DeliveryViaRule, o.PriorityRule
FROM DD_Order o
INNER JOIN C_DocType dt ON (o.C_DocType_ID=dt.C_DocType_ID)
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
INNER JOIN C_BPartner bp ON (o.C_BPartner_ID=bp.C_BPartner_ID)
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID=bpg.C_Greeting_ID)
INNER JOIN C_BPartner_Location bpl ON (o.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID)
INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)
LEFT OUTER JOIN AD_User bpc ON (o.AD_User_ID=bpc.AD_User_ID)
LEFT OUTER JOIN C_Greeting bpcg ON (bpc.C_Greeting_ID=bpcg.C_Greeting_ID)
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
LEFT OUTER JOIN AD_User u ON (o.SalesRep_ID=u.AD_User_ID)
LEFT OUTER JOIN C_BPartner ubp ON (u.C_BPartner_ID=ubp.C_BPartner_ID);
/