/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_LGMDDATA') 
 CREATE TABLE T_BCM_LGMDDATA (
FID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(38,10) DEFAULT 0 NOT NULL,
FCOMPANYCODE VARCHAR(100) DEFAULT ' ' NOT NULL,
FYEAR VARCHAR(100) DEFAULT ' ' NOT NULL,
FPERIOD VARCHAR(100) DEFAULT ' ' NOT NULL,
FCURRENCY VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEC1 VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEC2 VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEC3 VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEC4 VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEICP VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEACCOUNT VARCHAR(100) DEFAULT ' ' NOT NULL,
FMOVITEMCODE VARCHAR(100) DEFAULT ' ' NOT NULL,
FLOCATION VARCHAR(100) DEFAULT ' ' NOT NULL,
FRULENAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FDATAVIEW VARCHAR(100) DEFAULT ' ' NOT NULL,
FSSID BIGINT DEFAULT 0 NOT NULL,
FSOID VARCHAR(100) DEFAULT ' ' NOT NULL,
FSRCYEARPERIOD VARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DSLGADJDATA') 
 CREATE TABLE T_BCM_DSLGADJDATA (
FID BIGINT DEFAULT 0 NOT NULL,
FDIMENSION VARCHAR(50) DEFAULT ' ' NOT NULL,
FNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FPARENT VARCHAR(200) DEFAULT ' ' NOT NULL,
FACCOUNTCATEGORY VARCHAR(50) DEFAULT ' ' NOT NULL,
FNOSHARE VARCHAR(50) DEFAULT ' ' NOT NULL,
FISACCOUNTOFFSET VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGEAGG VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEFINED1NUMBER VARCHAR(200) DEFAULT ' ' NOT NULL,
FDEFINED1NAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FDEFINED1PARENT VARCHAR(200) DEFAULT ' ' NOT NULL,
FDEFINED1NOSHARE VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_DSLGADJDATA_L') 
 CREATE TABLE T_BCM_DSLGADJDATA_L (
FPKID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDEFINED1NAME NVARCHAR(200) DEFAULT ' ' NOT NULL
);



/**End D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
