 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_INV', 'T_MRP_RPT_SCHEME_INV', 'FENTRYID', '1';


 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_LOCATION', 'T_MRP_RPT_SCHEME_LOCATION', 'FPKID', '1';


 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_PLAN', 'T_MRP_RPT_SCHEME_PLAN', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_SOURCE', 'T_MRP_RPT_SCHEME_SOURCE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_STORE', 'T_MRP_RPT_SCHEME_STORE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_RPT_SCHEME_STORE') CREATE INDEX IDX_MRP_RPT_SCHEME_STORE ON T_MRP_RPT_SCHEME_STORE ( FENTRYID );


 EXEC P_ALTERPK 'PK_T_MRP_RPT_SCHEME_TIME', 'T_MRP_RPT_SCHEME_TIME', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_MRP_RPTSCHEME', 'T_MRP_RPTSCHEME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_MRP_RPTSCHEME_L', 'T_MRP_RPTSCHEME_L', 'FPKID', '1';

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