--ABS-87222 / ABS-89423

---------------- PRODUCT --------------
ALTER TABLE PRODUCT DROP CONSTRAINT CHK_PRODUCT_MMP;

ALTER TABLE PRODUCT DROP COLUMN MMPDEFAULTPERCENTAGE;

ALTER TABLE PRODUCT ADD (MMPDEFAULTPERCENTAGE NUMBER DEFAULT 0 NOT NULL
												 CONSTRAINT CHK_PRODUCT_MMPDEFAULTPERCENT CHECK (MMPDEFAULTPERCENTAGE BETWEEN 0 AND 100));

COMMENT ON COLUMN PRODUCT.MMPDEFAULTPERCENTAGE
IS 'Material Maintenance Protection (MMP) default percentage. 0 default
Must be filled with a value between 0 and 100.0 
Only used for module BPMMPENHANCED';

-------------- PLPCBUDGETPROTECTION -------------
COMMENT ON COLUMN PLPCBUDGETPROTECTION.MMPSPECIFICPERCENTAGE
IS 'Material Maintenance Protection (MMP) specific percentage. Between 0.0 and 100.0, if empty (Null) then take the percentage defined on Customer or Product level if BPMMPENHANCED module.
If on customer level is defined 0.0 (no MMP) then must be set to Null';
ALTER TABLE PLPCBUDGETPROTECTION ADD CONSTRAINT CHK_PLPCBUDGPROT_MMPSPECIFICP CHECK ((MMPSPECIFICPERCENTAGE BETWEEN 0.0 AND 100.0) OR (MMPSPECIFICPERCENTAGE IS NULL));