CREATE COLUMN TABLE "SBODEMOPT"."AWO1" ("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 NOT NULL , "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, "PPTaxExRe" NVARCHAR(2), "PlPaWght" DECIMAL(21,6) CS_FIXED, PRIMARY KEY ("DocEntry", "LineNum", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "AWO1_VISORDER" ON "SBODEMOPT"."AWO1" ( "DocEntry" ASC, "VisOrder" ASC, "LogInstanc" ASC );
CREATE INDEX "AWO1_ITEM_CODE" ON "SBODEMOPT"."AWO1" ( "ItemCode" ASC )