/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BCM_table.sql **/
 EXEC p_AlterColumn 'T_BCM_ANALYSOLUCOLUMNDIM', 'FMENBERID', 'VARCHAR(2000)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_ANALYSOLUPAGEDIM', 'FMENBERID', 'VARCHAR(2000)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_BCM_ANALYSOLUROWDIM', 'FMENBERID', 'VARCHAR(2000)', 'NOT NULL', '1111', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJUSTCHECK') 
 CREATE TABLE T_BCM_ADJUSTCHECK (
FID BIGINT DEFAULT 0 NOT NULL,
FBALANCE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FDIFFER DECIMAL(19,6) DEFAULT 0 NOT NULL,
FOLAPBALANCE DECIMAL(19,6) DEFAULT 0 NOT NULL,
FPAGEID VARCHAR(255) DEFAULT ' ' NOT NULL,
FUSERDEFINEKEYS VARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ADJUSTCHECKENTRY') 
 CREATE TABLE T_BCM_ADJUSTCHECKENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FCHANGETYPE VARCHAR(50) DEFAULT ' ' NOT NULL,
FDEBIT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FCREDIT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FGROUPNUM VARCHAR(50) DEFAULT ' ' NOT NULL,
FDSEQ VARCHAR(10) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMYCOMPANY VARCHAR(50) DEFAULT ' ' NOT NULL,
FENTITY VARCHAR(50) DEFAULT ' ' NOT NULL,
FOLAPENTITY VARCHAR(50) DEFAULT ' ' NOT NULL,
FPROCESS VARCHAR(50) DEFAULT ' ' NOT NULL,
FAUDITTRAIL VARCHAR(50) DEFAULT ' ' NOT NULL,
FDATASORT VARCHAR(50) DEFAULT ' ' NOT NULL,
FCURRENCY VARCHAR(50) DEFAULT ' ' NOT NULL,
FMULTIGAAP VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE1 VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE2 VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE3 VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE4 VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE5 VARCHAR(50) DEFAULT ' ' NOT NULL,
FUSERDEFINE6 VARCHAR(50) DEFAULT ' ' NOT NULL,
FQUERYFIELD VARCHAR(50) DEFAULT ' ' NOT NULL,
FINTERNALCOMPANY VARCHAR(50) DEFAULT ' ' NOT NULL
);



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