--单据字段映射分路新增原单字段名称
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_billtranferentry' AND KSQL_COL_NAME ='fsourcefieldname') 
ALTER TABLE t_mrp_billtranferentry ADD (fsourcefieldname NVARCHAR(50) default ' ' NOT NULL );

--单据字段映射分路新增映射类型
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_billtranferentry' AND KSQL_COL_NAME ='fconverttype') 
ALTER TABLE t_mrp_billtranferentry ADD (fconverttype NVARCHAR(30) default ' ' NOT NULL );

--单据字段映射分路新增计算公式表达式
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_billtranferentry' AND KSQL_COL_NAME ='fcalculateexc') 
ALTER TABLE t_mrp_billtranferentry ADD (fcalculateexc NVARCHAR(255) default ' ' NOT NULL );

----单据字段映射分路新增计算公式大文本
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_billtranferentry' AND KSQL_COL_NAME ='fcalculateexc_tag') 
ALTER TABLE t_mrp_billtranferentry ADD (fcalculateexc_tag NCLOB default ' ' NOT NULL );

----单据字段映射分路新增计算公式译文
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_billtranferentry' AND KSQL_COL_NAME ='fcalculatetext') 
ALTER TABLE t_mrp_billtranferentry ADD (fcalculatetext NVARCHAR(50) default ' ' NOT NULL );