try {
List <GenericValue> productStoreShipmentMethods = delegator.findByAnd("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId));
for (GenericValue productStoreShipmentMethod :productStoreShipmentMethods) {
if ("UPS".equals(productStoreShipmentMethod.get("partyId"))) {
Map<String,Object> thisUpsRateCodeMap = FastMap.newInstance();
carrierShipmentMethod = delegator.findOne("CarrierShipmentMethod", false, UtilMisc.toMap("shipmentMethodTypeId",
productStoreShipmentMethod.getString("shipmentMethodTypeId"), "partyId", productStoreShipmentMethod.getString("partyId"), "roleTypeId", productStoreShipmentMethod.getString("roleTypeId")));
String serviceCode = carrierShipmentMethod.getString("carrierServiceCode");
for (String thisServiceCode : upsRateCodeMap.keySet()) {
if (serviceCode.equals(thisServiceCode)) {
BigDecimal newRate = upsRateCodeMap.get(serviceCode);