 
 EXEC P_ALTERPK 'PK_MRP_SUPDEM_RANGE', 'T_MRP_SUPDEM_RANGE', 'FID', '1';

 EXEC P_ALTERPK 'PK_MRP_SUPDEM_DEM', 'T_MRP_SUPDEM_DEM', 'FENTRYID', '1';

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

 EXEC P_ALTERPK 'PK_MRP_SUPDEM_SUP', 'T_MRP_SUPDEM_SUP', 'FENTRYID', '1';

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