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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PLS_DETAIL') CREATE INDEX IDX_MRP_PLS_DETAIL ON T_MRP_PLS_DETAIL ( FPLSOPERATIONNO );


 EXEC P_ALTERPK 'PK_T_MRP_PLS_DETAIL_ENTRY', 'T_MRP_PLS_DETAIL_ENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PLS_DETAIL_ENTRY') CREATE INDEX IDX_MRP_PLS_DETAIL_ENTRY ON T_MRP_PLS_DETAIL_ENTRY ( FID ,FSOURCEORDERBILLNO );


 EXEC P_ALTERPK 'PK_T_MRP_PLS_RESULT', 'T_MRP_PLS_RESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PLS_RESULT') CREATE INDEX IDX_MRP_PLS_RESULT ON T_MRP_PLS_RESULT ( FPLSSCHEMEID ,FPLSOPERATIONNO ,FSOURCEORDERBILLNO );



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