/**Begin D:\PDM_UPGRADE\PDM1\BCM_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INTRADJSET') 
 CREATE TABLE T_BCM_INTRADJSET (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FPROCESSID BIGINT DEFAULT 0 NOT NULL,
FSCENARIOID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT '1' NOT NULL,
FBUSINESSTYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FJOURNALTYPE CHAR(1) DEFAULT '1' NOT NULL,
FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INTRADJSET_L') 
 CREATE TABLE T_BCM_INTRADJSET_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INTRADJSETENTRY') 
 CREATE TABLE T_BCM_INTRADJSETENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FACCOUNTID BIGINT DEFAULT 0 NOT NULL,
FAUDITTRAILID BIGINT DEFAULT 0 NOT NULL,
FDATASORTID BIGINT DEFAULT 0 NOT NULL,
FMULTIGAAPID BIGINT DEFAULT 0 NOT NULL,
FCHANGETYPEID BIGINT DEFAULT 0 NOT NULL,
FDIM1 BIGINT DEFAULT 0 NOT NULL,
FDIM2 BIGINT DEFAULT 0 NOT NULL,
FDIM3 BIGINT DEFAULT 0 NOT NULL,
FDIM4 BIGINT DEFAULT 0 NOT NULL,
FDIM5 BIGINT DEFAULT 0 NOT NULL,
FDIM6 BIGINT DEFAULT 0 NOT NULL,
FENTITY CHAR(1) DEFAULT '1' NOT NULL,
FMYCOMPANY CHAR(1) DEFAULT '1' NOT NULL,
FOPCOMPANY CHAR(1) DEFAULT '1' NOT NULL,
FCREDIT VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEBIT VARCHAR(50) DEFAULT ' ' NOT NULL
);


/**End D:\PDM_UPGRADE\PDM1\BCM_table.sql **/
