/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_MRP_PROSCHEDULE_ORDER') 
 CREATE TABLE T_MRP_PROSCHEDULE_ORDER (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FMATERIELID BIGINT DEFAULT 0 NOT NULL,
FATTRIBUTE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(200) DEFAULT ' ' NOT NULL,
FORDERNUM DECIMAL(23,10) DEFAULT 0 NOT NULL,
FUNIT BIGINT DEFAULT 0 NOT NULL,
FPRODUCTYIELDRATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FPRODUCTYIELDNUM DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBOM BIGINT DEFAULT 0 NOT NULL,
FBOMDATETIME DATETIME,
FECNVERSION BIGINT DEFAULT 0 NOT NULL,
FPLANNER BIGINT DEFAULT 0 NOT NULL,
FPLANPREPAREDATE DATETIME,
FPLANSTARTDATE DATETIME,
FPLANFINISHDATE DATETIME,
FAVAILABLEDATE DATETIME,
FSOURCEENTITY NVARCHAR(36) DEFAULT ' ' NOT NULL,
FPLANORDERBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FPRODUCTIONORGID BIGINT DEFAULT 0 NOT NULL
);



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