CREATE COLUMN TABLE "SBODEMODE"."OBIN" ("AbsEntry" INTEGER CS_INT NOT NULL , "BinCode" NVARCHAR(228) NOT NULL , "WhsCode" NVARCHAR(8), "SysBin" NVARCHAR(1) DEFAULT 'N', "SL1Abs" INTEGER CS_INT, "SL1Code" NVARCHAR(50), "SL2Abs" INTEGER CS_INT, "SL2Code" NVARCHAR(50), "SL3Abs" INTEGER CS_INT, "SL3Code" NVARCHAR(50), "SL4Abs" INTEGER CS_INT, "SL4Code" NVARCHAR(50), "Attr1Abs" INTEGER CS_INT, "Attr1Val" NVARCHAR(20), "Attr2Abs" INTEGER CS_INT, "Attr2Val" NVARCHAR(20), "Attr3Abs" INTEGER CS_INT, "Attr3Val" NVARCHAR(20), "Attr4Abs" INTEGER CS_INT, "Attr4Val" NVARCHAR(20), "Attr5Abs" INTEGER CS_INT, "Attr5Val" NVARCHAR(20), "Attr6Abs" INTEGER CS_INT, "Attr6Val" NVARCHAR(20), "Attr7Abs" INTEGER CS_INT, "Attr7Val" NVARCHAR(20), "Attr8Abs" INTEGER CS_INT, "Attr8Val" NVARCHAR(20), "Attr9Abs" INTEGER CS_INT, "Attr9Val" NVARCHAR(20), "Attr10Abs" INTEGER CS_INT, "Attr10Val" NVARCHAR(20), "Disabled" NVARCHAR(1) DEFAULT 'N', "Descr" NVARCHAR(50), "BarCode" NVARCHAR(100), "AltSortCod" NVARCHAR(50), "ItmRtrictT" SMALLINT CS_INT DEFAULT 0, "SpcItmCode" NVARCHAR(50), "SpcItmGrpC" SMALLINT CS_INT, "SngBatch" NVARCHAR(1) DEFAULT 'N', "RtrictType" SMALLINT CS_INT DEFAULT 0, "RtrictResn" NVARCHAR(254), "RtrictDate" LONGDATE CS_LONGDATE, "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "Transfered" NVARCHAR(1) DEFAULT 'N', "Instance" SMALLINT CS_INT DEFAULT 0, "LogInstanc" INTEGER CS_INT DEFAULT 0, "CreateDate" LONGDATE CS_LONGDATE, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "Deleted" NVARCHAR(1) DEFAULT 'N', "MinLevel" DECIMAL(21,6) CS_FIXED, "MaxLevel" DECIMAL(21,6) CS_FIXED, "ReceiveBin" NVARCHAR(1) DEFAULT 'N', "NoAutoAllc" NVARCHAR(1) DEFAULT 'N', "MaxWeight1" DECIMAL(21,6) CS_FIXED, "Wght1Unit" SMALLINT CS_INT, "MaxWeight2" DECIMAL(21,6) CS_FIXED, "Wght2Unit" SMALLINT CS_INT, "UoMRtrict" SMALLINT CS_INT DEFAULT 0, "SpcUoMCode" INTEGER CS_INT, "SpcUGPCode" INTEGER CS_INT, "SngUoMCode" INTEGER CS_INT, PRIMARY KEY ("AbsEntry")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMODE"."OBIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$WhsCode$SysBin$','WhsCode','SysBin'));
ALTER TABLE "SBODEMODE"."OBIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$WhsCode$SL1Code$SL2Code$SL3Code$SL4Code$','WhsCode','SL1Code','SL2Code','SL3Code','SL4Code'));
CREATE UNIQUE INDEX "OBIN_BIN_CODE" ON "SBODEMODE"."OBIN" ( "BinCode" ASC );
CREATE INDEX "OBIN_WHS_CODE" ON "SBODEMODE"."OBIN" ( "WhsCode" ASC, "SysBin" ASC );
CREATE INDEX "OBIN_BUSINESS_K" ON "SBODEMODE"."OBIN" ( "WhsCode" ASC, "SL1Code" ASC, "SL2Code" ASC, "SL3Code" ASC, "SL4Code" ASC )