IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_PROINTERACT') 
 CREATE TABLE T_FMM_PROINTERACT (
    FID                BIGINT              DEFAULT 0          NOT NULL,   
	FNUMBER            NVARCHAR(30)        DEFAULT ' '        NOT NULL,  
	FNAME              NVARCHAR(50)        DEFAULT ' '        NOT NULL,   
	FSTATUS            NVARCHAR(1)         DEFAULT ' '        NOT NULL,   
	FENABLE            NVARCHAR(1)         DEFAULT ' '        NOT NULL,   
	FCTRLSTRATEGY      NVARCHAR(5)         DEFAULT ' '        NOT NULL,   
	FORGID             BIGINT              DEFAULT 0          NOT NULL,   
	FUSEORG            BIGINT              DEFAULT 0          NOT NULL,   
	FMASTERID          BIGINT              DEFAULT 0          NOT NULL,   
	FSOURCEDATAID      BIGINT              DEFAULT 0          NOT NULL,   
	FBITINDEX          BIGINT              DEFAULT 0          NOT NULL,   
	FCREATEORGID       BIGINT              DEFAULT 0          NOT NULL,   
	FSOURCEBITINDEX    BIGINT              DEFAULT 0          NOT NULL,  
	FCREATORID         BIGINT              DEFAULT 0          NOT NULL,   
	FMODIFIERID        BIGINT              DEFAULT 0          NOT NULL,   
	FAUDITORID         BIGINT              DEFAULT 0          NOT NULL,   
	FCREATETIME        DATETIME,                                  
	FMODIFYTIME        DATETIME,                                  
	FAUDITTIME         DATETIME,                                  
	FARCHIVEOBJ        NVARCHAR(1)         DEFAULT ' '        NOT NULL,   
	FDIRECTORY         NVARCHAR(50)        DEFAULT ' '        NOT NULL,   
	FREMARK            NVARCHAR(255)       DEFAULT ' '        NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FMM_PAYSTATEGY') 
 CREATE TABLE T_FMM_PAYSTATEGY (
	  FID               BIGINT          DEFAULT 0        NOT NULL,
	  FENTRYID          BIGINT          DEFAULT 0        NOT NULL,
	  FSEQ              INT             DEFAULT 0        NOT NULL,
	  FBUSINESSOBJID    NVARCHAR(50)    DEFAULT ' '      NOT NULL,
	  FARCHIVEFILTER    NVARCHAR(1000)  DEFAULT ' '      NOT NULL,
	  FFILTERSTORGE     NCLOB           DEFAULT ' '      NOT NULL,
	  FREMARK           NVARCHAR(255)   DEFAULT ' '      NOT NULL
);
