/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_constraint.sql **/
 EXEC P_ALTERPK 'PK_MSPLAN_INVDETAIL', 'T_MSPLAN_INVDETAIL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_INVDETAIL_LOG') CREATE INDEX IDX_MSPLAN_INVDETAIL_LOG ON T_MSPLAN_INVDETAIL ( FCACULATELOG );


 EXEC P_ALTERPK 'PK_MSPLAN_INVDETAILENTRY', 'T_MSPLAN_INVDETAILENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_INVDETAILENTRY_FID') CREATE INDEX IDX_MSPLAN_INVDETAILENTRY_FID ON T_MSPLAN_INVDETAILENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_INVDETAILENTRY_FSEQ') CREATE INDEX IDX_MSPLAN_INVDETAILENTRY_FSEQ ON T_MSPLAN_INVDETAILENTRY ( FSEQ );



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