 EXEC P_ALTERPK 'PK_T_MSPLAN_ADJUSTSUG_ENTITY', 'T_MSPLAN_ADJUSTSUG_ENTITY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSPLAN_ADJUSTSUG_REL', 'T_MSPLAN_ADJUSTSUG_REL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSPLAN_ADJUSTSUG_REL_L', 'T_MSPLAN_ADJUSTSUG_REL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSPLAN_ADJUSTSUG_SUBEN', 'T_MSPLAN_ADJUSTSUG_SUBEN', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_ADJUSTSUG_SUBEN') CREATE INDEX IDX_MSPLAN_ADJUSTSUG_SUBEN ON T_MSPLAN_ADJUSTSUG_SUBEN ( FENTRYID ,FSEQ );
