CREATE COLUMN TABLE "SBODEMOPT"."UWOR1" ("DocEntry" INTEGER CS_INT NOT NULL , "LineNum" INTEGER CS_INT NOT NULL , "ItemCode" NVARCHAR(50), "BaseQty" DECIMAL(21,6) CS_FIXED, "PlannedQty" DECIMAL(21,6) CS_FIXED, "IssuedQty" DECIMAL(21,6) CS_FIXED, "IssueType" NVARCHAR(1), "wareHouse" NVARCHAR(8), "VisOrder" INTEGER CS_INT NOT NULL , "WipActCode" NVARCHAR(15), "CompTotal" DECIMAL(21,6) CS_FIXED, "OcrCode" NVARCHAR(8), "OcrCode2" NVARCHAR(8), "OcrCode3" NVARCHAR(8), "OcrCode4" NVARCHAR(8), "OcrCode5" NVARCHAR(8), "LocCode" INTEGER CS_INT, "LogInstanc" INTEGER CS_INT DEFAULT 0, "Project" NVARCHAR(20), "UomEntry" INTEGER CS_INT DEFAULT 0, "UomCode" NVARCHAR(20), "ItemType" INTEGER CS_INT DEFAULT 4, "AdditQty" DECIMAL(21,6) CS_FIXED, "LineText" NCLOB MEMORY THRESHOLD 1000, "PickStatus" NVARCHAR(1) DEFAULT 'N', "PickQty" DECIMAL(21,6) CS_FIXED, "PickIdNo" INTEGER CS_INT, "ReleaseQty" DECIMAL(21,6) CS_FIXED, "ResAlloc" NVARCHAR(1), "StartDate" LONGDATE CS_LONGDATE, "EndDate" LONGDATE CS_LONGDATE, "StageId" INTEGER CS_INT, "BaseQtyNum" DECIMAL(21,6) CS_FIXED, "BaseQtyDen" DECIMAL(21,6) CS_FIXED, "ReqDays" DECIMAL(21,6) CS_FIXED DEFAULT 0, "RtCalcProp" DECIMAL(21,6) CS_FIXED DEFAULT 100, "Status" NVARCHAR(1) DEFAULT 'P', "ItemName" NVARCHAR(200), "AlwProcDoc" NVARCHAR(1) DEFAULT 'N', "PoDocType" INTEGER CS_INT, "PoDocNum" INTEGER CS_INT, "PoDocEntry" INTEGER CS_INT, "PoLineNum" INTEGER CS_INT, "PoQuantity" DECIMAL(21,6) CS_FIXED, PRIMARY KEY ("DocEntry", "LineNum")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMOPT"."UWOR1" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$ItemCode$wareHouse$','ItemCode','wareHouse'));
CREATE UNIQUE INDEX "UWOR1_VISORDER" ON "SBODEMOPT"."UWOR1" ( "DocEntry" ASC, "VisOrder" ASC );
CREATE INDEX "UWOR1_ITEM_WHS" ON "SBODEMOPT"."UWOR1" ( "ItemCode" ASC, "wareHouse" ASC )