/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_RPTADJUST' AND KSQL_COL_NAME ='FCATALOGID') 
 ALTER TABLE T_BCM_RPTADJUST ADD (FCATALOGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_MDDATA') 
 CREATE TABLE T_BCM_MDDATA (
FID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,15) DEFAULT 0 NOT NULL,
FENTITY VARCHAR(100) DEFAULT ' ' NOT NULL,
FFY VARCHAR(100) DEFAULT ' ' NOT NULL,
FPERIOD VARCHAR(100) DEFAULT ' ' NOT NULL,
FSCENARIO VARCHAR(100) DEFAULT ' ' NOT NULL,
FMULTIGAAP VARCHAR(100) DEFAULT ' ' NOT NULL,
FCURRENCY VARCHAR(100) DEFAULT ' ' NOT NULL,
FACCOUNT VARCHAR(100) DEFAULT ' ' NOT NULL,
FCHANGETYPE VARCHAR(100) DEFAULT ' ' NOT NULL,
FAUDITTRAIL VARCHAR(100) DEFAULT ' ' NOT NULL,
FPROCESS VARCHAR(100) DEFAULT ' ' NOT NULL,
FDATASORT VARCHAR(100) DEFAULT ' ' NOT NULL,
FINTERNALCOMPANY VARCHAR(100) DEFAULT ' ' NOT NULL,
FMYCOMPANY VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM1 VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM2 VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM3 VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM4 VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM5 VARCHAR(100) DEFAULT ' ' NOT NULL,
FDIM6 VARCHAR(100) DEFAULT ' ' NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
