357: l_inventory_item_id := nvl(p_rescode_criteria_rec.inventory_item_id,0);
358: l_organization_id := nvl(p_rescode_criteria_rec.organization_id,0);
359: l_problem_code := nvl(p_rescode_criteria_rec.problem_code,' ');
360: l_resolution_code := p_resolution_code;
361: l_category_set_id := FND_PROFILE.value('CS_SR_DEFAULT_CATEGORY_SET');
362:
363:
364: /* Roopa - Begin - fix for bug 3335668 */
365: /* Changed the initialized value from 'null' to 0 or ' ' value */
386: END IF;
387: /* Roopa - End - fix for bug 3335668 */
388:
389: IF (l_inventory_item_id <> 0 and l_organization_id = 0) THEN
390: l_organization_id := FND_PROFILE.value('CS_INV_VALIDATION_ORG');
391: END IF;
392:
393: /* Validation Checks on the resolution code:
394: #1) Check if the resolution code exists in the unmapped resolution code list or
786: CLOSE c_sr_criteria_exists_csr;
787:
788: /* Validation check #5 */
789: IF(l_product_category_id <> 0 AND
790: FND_PROFILE.Value('CS_SR_DEFAULT_CATEGORY_SET') is not null) THEN
791: /* If the input category does not belong to the default category set, throw an exception */
792: l_product_category_set := FND_PROFILE.Value('CS_SR_DEFAULT_CATEGORY_SET');
793: OPEN c_sr_prod_cat_valid_csr;
794: FETCH c_sr_prod_cat_valid_csr into l_temp;
788: /* Validation check #5 */
789: IF(l_product_category_id <> 0 AND
790: FND_PROFILE.Value('CS_SR_DEFAULT_CATEGORY_SET') is not null) THEN
791: /* If the input category does not belong to the default category set, throw an exception */
792: l_product_category_set := FND_PROFILE.Value('CS_SR_DEFAULT_CATEGORY_SET');
793: OPEN c_sr_prod_cat_valid_csr;
794: FETCH c_sr_prod_cat_valid_csr into l_temp;
795: IF (c_sr_prod_cat_valid_csr%NOTFOUND) THEN
796: RAISE fnd_api.g_exc_unexpected_error;