diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
index 18435b3..d4526da 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolEntityToEntitlementPoolEntityDto.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
 import org.openecomp.sdcrests.mapping.MappingBase;
 import org.openecomp.sdcrests.vendorlicense.types.EntitlementPoolEntityDto;
@@ -47,8 +46,6 @@
     target.setStartDate(source.getStartDate());
     target.setExpiryDate(source.getExpiryDate());
     target.setVersionUUID(source.getVersionUuId());
-    if (ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
+    target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
   }
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
index bed7e69..69cd285 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapEntitlementPoolRequestDtoToEntitlementPoolEntity.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
 import org.openecomp.sdc.vendorlicense.dao.types.MultiChoiceOrOther;
 import org.openecomp.sdcrests.mapping.MappingBase;
@@ -31,9 +30,7 @@
   @Override
   public void doMapping(EntitlementPoolRequestDto source, EntitlementPoolEntity target) {
     target.setName(source.getName());
-    if (ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
+    target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
     target.setDescription(source.getDescription());
     target.setThresholdValue(source.getThresholdValue());
     target.setThresholdUnit(source.getThresholdUnits());
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupDescriptorDtoToFeatureGroupEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupDescriptorDtoToFeatureGroupEntity.java
index 2325887..5dbf087 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupDescriptorDtoToFeatureGroupEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupDescriptorDtoToFeatureGroupEntity.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
 import org.openecomp.sdcrests.mapping.MappingBase;
 import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupDescriptorDto;
@@ -32,8 +31,5 @@
     target.setName(source.getName());
     target.setDescription(source.getDescription());
     target.setPartNumber(source.getPartNumber());
-    if (!ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
   }
 }
\ No newline at end of file
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupEntityToFeatureGroupDescriptorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupEntityToFeatureGroupDescriptorDto.java
index e103b27..70f5666 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupEntityToFeatureGroupDescriptorDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapFeatureGroupEntityToFeatureGroupDescriptorDto.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
 import org.openecomp.sdcrests.mapping.MappingBase;
 import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupDescriptorDto;
@@ -32,8 +31,5 @@
     target.setName(source.getName());
     target.setDescription(source.getDescription());
     target.setPartNumber(source.getPartNumber());
-    if (!ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
   }
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
index a7d4b5b..c543cf4 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
 import org.openecomp.sdcrests.mapping.MappingBase;
 import org.openecomp.sdcrests.vendorlicense.types.LicenseKeyGroupEntityDto;
@@ -43,8 +42,6 @@
     target.setThresholdValue(source.getThresholdValue());
     target.setIncrements(source.getIncrements());
     target.setVersionUUID(source.getVersionUuId());
-    if (ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
+    target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
   }
 }
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
index 0eeda4a..87eea4b 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/mapping/MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.mapping;
 
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
 import org.openecomp.sdc.vendorlicense.dao.types.MultiChoiceOrOther;
 import org.openecomp.sdcrests.mapping.MappingBase;
@@ -31,9 +30,7 @@
   @Override
   public void doMapping(LicenseKeyGroupRequestDto source, LicenseKeyGroupEntity target) {
     target.setName(source.getName());
-    if (ToggleableFeature.MRN.isActive()) {
-      target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
-    }
+    target.setManufacturerReferenceNumber(source.getManufacturerReferenceNumber());
     target.setDescription(source.getDescription());
     target.setType(source.getType());
     target.setOperationalScope(new MapMultiChoiceOrOtherDtoToMultiChoiceOrOther()
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
index 292b4a0..076ae45 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/EntitlementPoolsImpl.java
@@ -20,9 +20,6 @@
 
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
-import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -40,7 +37,6 @@
 import javax.inject.Named;
 import javax.ws.rs.core.Response;
 import java.util.Collection;
-import java.util.Objects;
 
 @Named
 @Service("entitlementPools")
@@ -80,12 +76,6 @@
    */
   public Response createEntitlementPool(EntitlementPoolRequestDto request, String vlmId,
                                         String versionId, String user) {
-    if (ToggleableFeature.MRN.isActive()) {
-      if (Objects.isNull(request.getManufacturerReferenceNumber())) {
-        throw new CoreException((new ErrorCode.ErrorCodeBuilder().withMessage("Field does not conform to "
-            + "predefined criteria : manufacturerReferenceNumber : is mandatory and should not be empty").build()));
-      }
-    }
     EntitlementPoolEntity entitlementPoolEntity =
         new MapEntitlementPoolRequestDtoToEntitlementPoolEntity()
             .applyMapping(request, EntitlementPoolEntity.class);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
index 65b2695..8b62dc1 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java
@@ -21,9 +21,6 @@
 package org.openecomp.sdcrests.vendorlicense.rest.services;
 
 import org.openecomp.core.utilities.CommonMethods;
-import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManager;
 import org.openecomp.sdc.vendorlicense.VendorLicenseManagerFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
@@ -46,7 +43,6 @@
 import javax.ws.rs.core.Response;
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.Objects;
 
 @Named
 @Service("featureGroups")
@@ -79,15 +75,6 @@
   @Override
   public Response createFeatureGroup(FeatureGroupRequestDto request, String vlmId, String versionId,
                                      String user) {
-    //Below if block is introduced to have feature toggleable. This if block needs to remove when
-    // we remove toggle.
-    if (!ToggleableFeature.MRN.isActive()) {
-      if (Objects.isNull(request.getManufacturerReferenceNumber())) {
-        throw new CoreException((new ErrorCode.ErrorCodeBuilder().withMessage("Field does not " +
-            "conform to predefined criteria : manufacturerReferenceNumber : is mandatory and should not be empty").build()));
-      }
-    }
-
     FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity()
         .applyMapping(request, FeatureGroupEntity.class);
     featureGroupEntity.setVendorLicenseModelId(vlmId);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
index 8fa34b8..6bc4f94 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/EntitlementPoolRequestDto.java
@@ -22,6 +22,7 @@
 
 import io.swagger.annotations.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.hibernate.validator.constraints.NotBlank;
 import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
 import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
 
@@ -37,6 +38,7 @@
   @Size(max = 120)
   private String name;
 
+  @NotBlank(message = "is mandatory and should not be empty")
   @Size(max = 100)
   private String manufacturerReferenceNumber;
 
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
index 4270ffe..919fdb2 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-types/src/main/java/org/openecomp/sdcrests/vendorlicense/types/FeatureGroupDescriptorDto.java
@@ -34,10 +34,6 @@
   @NotNull
   private String partNumber;
 
-
-  @Size(max = 100)
-  private String manufacturerReferenceNumber;
-
   public String getName() {
     return name;
   }
@@ -62,11 +58,4 @@
     this.partNumber = partNumber;
   }
 
-  public String getManufacturerReferenceNumber() {
-    return manufacturerReferenceNumber;
-  }
-
-  public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
-    this.manufacturerReferenceNumber = manufacturerReferenceNumber;
-  }
 }
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
index d1ff538..3a635de 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java
@@ -16,10 +16,8 @@
 
 package org.openecomp.sdc.vendorlicense.impl;
 
-import org.apache.commons.collections.CollectionUtils;
 import org.openecomp.core.dao.UniqueValueDao;
 import org.openecomp.core.util.UniqueValueUtil;
-import org.openecomp.core.utilities.CommonMethods;
 import org.openecomp.sdc.common.errors.CoreException;
 import org.openecomp.sdc.common.errors.ErrorCode;
 import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
@@ -35,7 +33,6 @@
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.Collection;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
 
@@ -213,61 +210,6 @@
     featureGroupDao.updateFeatureGroup(featureGroup, addedEntitlementPools, removedEntitlementPools,
         addedLicenseKeyGroups, removedLicenseKeyGroups);
 
-    updateEpLkgOnMrnChange(featureGroup, addedLicenseKeyGroups, addedEntitlementPools, retrieved);
-  }
-
-  /**
-   * If MRN is updated in feature group then update all linked EPs and Lkgs with new versionUuId
-   * @param featureGroup - Feature Group entity which is requested for update
-   * @param addedLicenseKeyGroups - LicenseKeyGroups added with Feature Group
-   * @param addedEntitlementPools - EntitlementPools added with Feature Group
-   * @param retrieved - Feature Group entity fetched from database
-   */
-  private void updateEpLkgOnMrnChange(FeatureGroupEntity featureGroup,
-                                      Set<String> addedLicenseKeyGroups,
-                                      Set<String> addedEntitlementPools,
-                                      FeatureGroupEntity retrieved) {
-    if (Objects.nonNull(retrieved.getManufacturerReferenceNumber())
-        && !retrieved.getManufacturerReferenceNumber().equals(featureGroup
-        .getManufacturerReferenceNumber())) {
-      if (CollectionUtils.isEmpty(addedEntitlementPools)) {
-        updateEntitlementPool(featureGroup, retrieved.getEntitlementPoolIds());
-      } else {
-        updateEntitlementPool(featureGroup, addedEntitlementPools);
-      }
-
-      if (CollectionUtils.isEmpty(addedLicenseKeyGroups)) {
-        updateLicenseKeyGroup(featureGroup, retrieved.getLicenseKeyGroupIds());
-      } else {
-        updateLicenseKeyGroup(featureGroup, addedLicenseKeyGroups);
-      }
-    }
-  }
-
-  private void updateEntitlementPool(FeatureGroupEntity featureGroup,
-                                     Set<String> entitlementPoolIds) {
-    for (String epId: entitlementPoolIds) {
-      final EntitlementPoolEntity entitlementPoolEntity = entitlementPoolDao
-          .get(new EntitlementPoolEntity(featureGroup.getVendorLicenseModelId(), featureGroup
-              .getVersion(), epId));
-      if (Objects.nonNull(entitlementPoolEntity)) {
-        entitlementPoolEntity.setVersionUuId(CommonMethods.nextUuId());
-        entitlementPoolDao.update(entitlementPoolEntity);
-      }
-    }
-  }
-
-  private void updateLicenseKeyGroup(FeatureGroupEntity featureGroup,
-                                     Set<String> licenseKeyGroupIds) {
-    for (String lkgId: licenseKeyGroupIds) {
-      final LicenseKeyGroupEntity licenseKeyGroupEntity = licenseKeyGroupDao
-          .get(new LicenseKeyGroupEntity(featureGroup.getVendorLicenseModelId(),
-              featureGroup.getVersion(), lkgId));
-      if (Objects.nonNull(licenseKeyGroupEntity)) {
-        licenseKeyGroupEntity.setVersionUuId(CommonMethods.nextUuId());
-        licenseKeyGroupDao.update(licenseKeyGroupEntity);
-      }
-    }
   }
 
   @Override
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/test/java/org/openecomp/sdc/vendorlicense/impl/FeatureGroupTest.java b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/test/java/org/openecomp/sdc/vendorlicense/impl/FeatureGroupTest.java
index d4f66c6..b7636bb 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/test/java/org/openecomp/sdc/vendorlicense/impl/FeatureGroupTest.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/test/java/org/openecomp/sdc/vendorlicense/impl/FeatureGroupTest.java
@@ -255,7 +255,6 @@
 
         existingFG.setEntitlementPoolIds(new HashSet<String>());
         existingFG.setLicenseKeyGroupIds(new HashSet<String>());
-        existingFG.setManufacturerReferenceNumber("MRN");
 
         doReturn(existingFG).when(featureGroupDao).get(anyObject());
 
@@ -283,7 +282,6 @@
             anyObject(),anyObject(), anyObject());
 
         FeatureGroupEntity fg = new FeatureGroupEntity(vlm1_id, VERSION01, fg1_id);
-        fg.setManufacturerReferenceNumber("MRN_UPD");
 
         vendorLicenseManagerImpl.updateFeatureGroup(fg,addedLKGs,removedLKGs, addedEPs,
             removedEPs);
@@ -298,9 +296,6 @@
 
         verify(featureGroupDao)
             .updateFeatureGroup(fg,addedEPs,removedEPs, addedLKGs, removedLKGs);
-
-        verify(entitlementPoolDao, times(2)).update(anyObject());
-        verify(licenseKeyGroupDao,times(2)).update(anyObject());
     }
 
     @Test
@@ -311,7 +306,6 @@
         HashSet<String> lkgSet = new HashSet<String>(); lkgSet.add(lkg1_id);
         existingFG.setEntitlementPoolIds(epSet);
         existingFG.setLicenseKeyGroupIds(lkgSet);
-        existingFG.setManufacturerReferenceNumber("MRN");
 
         doReturn(existingFG).when(featureGroupDao).get(anyObject());
 
@@ -330,7 +324,6 @@
             anyObject(),anyObject(), anyObject());
 
         FeatureGroupEntity fg = new FeatureGroupEntity(vlm1_id, VERSION01, fg1_id);
-        fg.setManufacturerReferenceNumber("MRN_UPD");
 
         vendorLicenseManagerImpl.updateFeatureGroup(fg,addedLKGs,removedLKGs, addedEPs,
             removedEPs);
@@ -346,8 +339,6 @@
         verify(featureGroupDao)
             .updateFeatureGroup(fg,addedEPs,removedEPs, addedLKGs, removedLKGs);
 
-        verify(entitlementPoolDao, times(1)).update(anyObject());
-        verify(licenseKeyGroupDao,times(1)).update(anyObject());
     }
 
 
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
index 0d900d2..4f41928 100644
--- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
@@ -1,13 +1,11 @@
 package org.openecomp.sdc.common.togglz;
 
 import org.togglz.core.Feature;
-import org.togglz.core.annotation.Label;
 import org.togglz.core.context.FeatureContext;
 
 public enum ToggleableFeature implements Feature {
 
-  @Label(("MRN"))
-  MRN;
+  ;
 
   public boolean isActive() {
     return FeatureContext.getFeatureManager().isActive(this);
diff --git a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
index 237e4bf..4bb5bc8 100644
--- a/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
+++ b/openecomp-be/lib/openecomp-healing-lib/openecomp-sdc-healing-impl/src/main/java/org/openecomp/sdc/healing/healers/ManufacturerReferenceNumberHealer.java
@@ -32,7 +32,7 @@
 
 public class ManufacturerReferenceNumberHealer implements Healer {
 
-  private static final String manufacturerReferenceNumber = "MRN";
+  private static final String MANUFACTURER_REFERENCE_NUMBER = "MRN";
   private VendorLicenseFacade vendorLicenseFacade = VendorLicenseFacadeFactory.getInstance()
       .createInterface();
   private static final FeatureGroupDao featureGroupDao =
@@ -64,7 +64,7 @@
         entitlementPoolEntity.setManufacturerReferenceNumber(getMRN(itemId, version,
             referencingFeatureGroup));
       } else {
-        entitlementPoolEntity.setManufacturerReferenceNumber(manufacturerReferenceNumber);
+        entitlementPoolEntity.setManufacturerReferenceNumber(MANUFACTURER_REFERENCE_NUMBER);
       }
       vendorLicenseFacade.updateEntitlementPool(entitlementPoolEntity);
     }
@@ -80,7 +80,7 @@
         licenseKeyGroupEntity.setManufacturerReferenceNumber(getMRN(itemId, version,
             referencingFeatureGroup));
       } else {
-        licenseKeyGroupEntity.setManufacturerReferenceNumber(manufacturerReferenceNumber);
+        licenseKeyGroupEntity.setManufacturerReferenceNumber(MANUFACTURER_REFERENCE_NUMBER);
       }
       vendorLicenseFacade.updateLicenseKeyGroup(licenseKeyGroupEntity);
     }
@@ -99,7 +99,7 @@
         (itemId, version);
 
     for (FeatureGroupEntity featureGroupEntity : featureGroupEntities) {
-      featureGroupEntity.setManufacturerReferenceNumber("");
+      featureGroupEntity.setManufacturerReferenceNumber(null);
       featureGroupDao.update(featureGroupEntity);
     }
   }
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java
index f1b9026..13e41e2 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java
@@ -269,7 +269,6 @@
     info.setDescription(featureGroup.getDescription());
     info.addProperty(ElementPropertyName.elementType.name(), ElementType.FeatureGroup);
     info.addProperty("partNumber", featureGroup.getPartNumber());
-    info.addProperty("manufacturerReferenceNumber", featureGroup.getManufacturerReferenceNumber());
     featureGroupElement.setInfo(info);
 
     featureGroupElement.setRelations(new ArrayList<>());
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java
index 6770424..a0173fa 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/facade/impl/VendorLicenseFacadeImpl.java
@@ -26,7 +26,6 @@
 import org.openecomp.core.utilities.CommonMethods;
 import org.openecomp.sdc.common.errors.CoreException;
 import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.VendorLicenseConstants;
 import org.openecomp.sdc.vendorlicense.dao.*;
 import org.openecomp.sdc.vendorlicense.dao.types.*;
@@ -41,7 +40,6 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Objects;
 
 
 import static org.openecomp.sdc.vendorlicense.VendorLicenseConstants.VENDOR_LICENSE_MODEL_VERSIONABLE_TYPE;
@@ -79,11 +77,7 @@
     FeatureGroupEntity retrieved = featureGroupDao.get(featureGroup);
     VersioningUtil
         .validateEntityExistence(retrieved, featureGroup, VendorLicenseModelEntity.ENTITY_TYPE);
-    if (!ToggleableFeature.MRN.isActive()) { //Remove updateManufacturerNumberInFeatureGroup() while removing remove toggle
-      if (retrieved.getManufacturerReferenceNumber() == null) {
-        updateManufacturerNumberInFeatureGroup(retrieved);
-      }
-    }
+
     return retrieved;
   }
 
@@ -262,12 +256,7 @@
 
   @Override
   public Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version) {
-    Collection<FeatureGroupEntity> featureGroupEntities =
-        featureGroupDao.list(new FeatureGroupEntity(vlmId, version, null));
-    featureGroupEntities.stream()
-        .filter(fgEntity -> Objects.isNull(fgEntity.getManufacturerReferenceNumber()))
-        .forEach(this::updateManufacturerNumberInFeatureGroup);
-    return featureGroupEntities;
+    return featureGroupDao.list(new FeatureGroupEntity(vlmId, version, null));
   }
 
 
@@ -329,22 +318,6 @@
     limitDao.update(limit);
   }
 
-  private void updateManufacturerNumberInFeatureGroup(FeatureGroupEntity featureGroupEntity) {
-    if (CollectionUtils.isNotEmpty(featureGroupEntity.getEntitlementPoolIds())) {
-      Object[] entitlementPoolIdsList = featureGroupEntity.getEntitlementPoolIds().toArray();
-      if (entitlementPoolIdsList.length > 0) {
-        String entitlementPoolId = entitlementPoolIdsList[0].toString();
-        EntitlementPoolEntity entitlementPoolEntity =
-            new EntitlementPoolEntity(featureGroupEntity.getVendorLicenseModelId(),
-                featureGroupEntity.getVersion(), entitlementPoolId);
-        entitlementPoolEntity = entitlementPoolDao.get(entitlementPoolEntity);
-        featureGroupEntity.setManufacturerReferenceNumber(
-            entitlementPoolDao.getManufacturerReferenceNumber(entitlementPoolEntity));
-        featureGroupDao.update(featureGroupEntity);
-      }
-    }
-  }
-
   @Override
   public void validate(String vendorLicenseModelId, Version version) {
     Collection<String> allFeatureGroupEntities = new HashSet<>();
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java
index b9fd403..f0f8a6c 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/impl/VendorLicenseArtifactsServiceImpl.java
@@ -17,8 +17,8 @@
 package org.openecomp.sdc.vendorlicense.licenseartifacts.impl;
 
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
 import org.openecomp.core.utilities.file.FileContentHandler;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
 import org.openecomp.sdc.vendorlicense.HealingServiceFactory;
 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
@@ -65,63 +65,39 @@
       for (String featureGroupId : featureGroups) {
         FeatureGroupModel featureGroupModel = vendorLicenseFacade
             .getFeatureGroupModel(new FeatureGroupEntity(vlmId, vlmVersion, featureGroupId));
+        Set<EntitlementPoolEntity> entitlementPoolEntities =
+            featureGroupModel.getEntitlementPools();
+        String manufacturerReferenceNumber = featureGroupModel.getEntityManufacturerReferenceNumber();
+        for (EntitlementPoolEntity entitlementPoolEntity : entitlementPoolEntities) {
+          entitlementPoolEntity.setLimits(vendorLicenseFacade.listLimits(vlmId, vlmVersion,
+              entitlementPoolEntity.getId()));
+          if (Objects.nonNull(manufacturerReferenceNumber)  && !manufacturerReferenceNumber.trim().isEmpty()) {
+            entitlementPoolEntity.setManufacturerReferenceNumber(manufacturerReferenceNumber);
+          }
+        }
 
-        updateEntitlementPools(vlmId, vlmVersion, featureGroupModel);
-        updateLicenseKeyGroupEntities(vlmId, vlmVersion, featureGroupModel);
+        Set<LicenseKeyGroupEntity> licenseKeyGroupEntities =
+            featureGroupModel.getLicenseKeyGroups();
+        for (LicenseKeyGroupEntity licenseKeyGroupEntity : licenseKeyGroupEntities) {
+          licenseKeyGroupEntity.setLimits(vendorLicenseFacade.listLimits(vlmId, vlmVersion,
+              licenseKeyGroupEntity.getId()));
+          if (Objects.nonNull(manufacturerReferenceNumber)  && !manufacturerReferenceNumber.trim().isEmpty()) {
+            licenseKeyGroupEntity.setManufacturerReferenceNumber(manufacturerReferenceNumber);
+          }
+        }
 
+        featureGroupModel.setEntitlementPools(entitlementPoolEntities.stream().map(
+            entitlementPoolEntity -> (EntitlementPoolEntity) healingService
+                .heal(entitlementPoolEntity)).collect(Collectors.toSet()));
+        featureGroupModel.setLicenseKeyGroups(licenseKeyGroupEntities.stream().map(
+            licenseKeyGroupEntity -> (LicenseKeyGroupEntity) healingService
+                .heal(licenseKeyGroupEntity)).collect(Collectors.toSet()));
         artifact.getFeatureGroups().add(featureGroupModel);
       }
     }
     return artifact.toXml().getBytes();
   }
 
-  private static void updateEntitlementPools(String vlmId, Version vlmVersion, FeatureGroupModel featureGroupModel) {
-
-    Set<EntitlementPoolEntity> entitlementPoolEntities =
-        featureGroupModel.getEntitlementPools();
-
-    for (EntitlementPoolEntity entitlementPoolEntity : entitlementPoolEntities) {
-      entitlementPoolEntity.setLimits(vendorLicenseFacade.listLimits(vlmId, vlmVersion,
-          entitlementPoolEntity.getId()));
-      String manuFacturerReferenceNumber = featureGroupModel.getEntityManufacturerReferenceNumber();
-      if (ToggleableFeature.MRN.isActive()) {
-        if (Objects.nonNull(manuFacturerReferenceNumber)
-            && !manuFacturerReferenceNumber.trim().isEmpty()) {
-          entitlementPoolEntity.setManufacturerReferenceNumber(manuFacturerReferenceNumber);
-        }
-      } else {
-        entitlementPoolEntity.setManufacturerReferenceNumber(manuFacturerReferenceNumber);
-      }
-    }
-    featureGroupModel.setEntitlementPools(entitlementPoolEntities.stream().map(
-        entitlementPoolEntity -> (EntitlementPoolEntity) healingService
-            .heal(entitlementPoolEntity)).collect(Collectors.toSet()));
-  }
-
-  private static void updateLicenseKeyGroupEntities(String vlmId, Version vlmVersion, FeatureGroupModel featureGroupModel) {
-
-    Set<LicenseKeyGroupEntity> licenseKeyGroupEntities =
-        featureGroupModel.getLicenseKeyGroups();
-    for (LicenseKeyGroupEntity licenseKeyGroupEntity : licenseKeyGroupEntities) {
-      licenseKeyGroupEntity.setLimits(vendorLicenseFacade.listLimits(vlmId, vlmVersion,
-          licenseKeyGroupEntity.getId()));
-      String manuFacturerReferenceNumber = featureGroupModel.getEntityManufacturerReferenceNumber();
-      if (ToggleableFeature.MRN.isActive()) {
-        if (Objects.nonNull(manuFacturerReferenceNumber)
-            && !manuFacturerReferenceNumber.trim().isEmpty()) {
-          licenseKeyGroupEntity.setManufacturerReferenceNumber(manuFacturerReferenceNumber);
-        }
-      } else {
-        licenseKeyGroupEntity.setManufacturerReferenceNumber(manuFacturerReferenceNumber);
-      }
-    }
-
-    featureGroupModel.setLicenseKeyGroups(licenseKeyGroupEntities.stream().map(
-        licenseKeyGroupEntity -> (LicenseKeyGroupEntity) healingService
-            .heal(licenseKeyGroupEntity)).collect(Collectors.toSet()));
-
-  }
-
   private static byte[] createVendorLicenseArtifact(String vlmId, String vendorName) {
     VendorLicenseArtifact vendorLicenseArtifact = new VendorLicenseArtifact();
     vendorLicenseArtifact.setVendorName(vendorName);
@@ -180,7 +156,7 @@
             .getManufacturerReferenceNumber() : null;
       }
     }
-    return manufactureReferenceNumber != null ? Optional.of(manufactureReferenceNumber) :
+    return StringUtils.isNotEmpty(manufactureReferenceNumber) ? Optional.of(manufactureReferenceNumber) :
         Optional.empty();
   }
 
