/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MRP_PARAMENTRY', 'T_MRP_PARAMENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PARAMENTRY') CREATE INDEX IDX_MRP_PARAMENTRY ON T_MRP_PARAMENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_MRP_PARAMSET', 'T_MRP_PARAMSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PARAMSET') CREATE INDEX IDX_MRP_PARAMSET ON T_MRP_PARAMSET ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_MRP_PARAMSET_L', 'T_MRP_PARAMSET_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PARAMSET_L') CREATE INDEX IDX_MRP_PARAMSET_L ON T_MRP_PARAMSET_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_MRP_WARNPERCENT', 'T_MRP_WARNPERCENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_WARNPERCENT') CREATE INDEX IDX_MRP_WARNPERCENT ON T_MRP_WARNPERCENT ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_MRP_WARNPERCENT_L', 'T_MRP_WARNPERCENT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_WARNPERCENT_L') CREATE INDEX IDX_MRP_WARNPERCENT_L ON T_MRP_WARNPERCENT_L ( FID ,FLOCALEID );



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