[Home] [Help]
46: * 20-MAY-2005 Susan Feinstein Bug 4165704 Inventory Convergence
47: * 18-OCT-2005 Susan Feinstein Bug 4640143 Added material detail id to gmd_wip_spec_vrs table
48: * 05-JAN-2006 Joe DiIorio Bug#4691545 Removed profile reference to
49: * NVL(fnd_profile.value('QC$EXACTSPECMATCH'),'N');
50: * and replaced with call to gmd_quality_config.
51: * Added FUNCTION GET_CONF_MATCH_VALUE as
52: * profile needs to be retrieved for each org that
53: * is passed.
54: * 18-Jan-2006 Saikiran Fixed bug# 4916871
193: l_spec_type GMD_SPECIFICATIONS.SPEC_TYPE%TYPE;
194: l_sampling_event_exist VARCHAR2(1);
195:
196: -- Bug 4165704: needed to fetch values from quality config table
197: quality_config GMD_QUALITY_CONFIG%ROWTYPE;
198: found BOOLEAN;
199: l_batch_status NUMBER; -- Bug # 4619570
200: l_sample_inv_trans_ind VARCHAR2(1); -- Bug # 4619570
201: L_LOT_OPTIONAL_ON_SAMPLE VARCHAR2(1) := 'N'; -- 5283854
1065: IS
1066:
1067: CURSOR get_match_ind IS
1068: SELECT exact_spec_match_ind
1069: FROM gmd_quality_config
1070: WHERE organization_id = p_org_id;
1071:
1072: l_exact_spec_match_ind gmd_quality_config.exact_spec_match_ind%TYPE;
1073:
1068: SELECT exact_spec_match_ind
1069: FROM gmd_quality_config
1070: WHERE organization_id = p_org_id;
1071:
1072: l_exact_spec_match_ind gmd_quality_config.exact_spec_match_ind%TYPE;
1073:
1074: BEGIN
1075: OPEN get_match_ind;
1076: FETCH get_match_ind INTO l_exact_spec_match_ind;
1121: -- l_inv_spec.date_effective := NVL(p_samples_rec.creation_date,SYSDATE);
1122: l_inv_spec.date_effective := NVL(p_samples_rec.date_drawn,SYSDATE);
1123:
1124: /*====================================================
1125: BUG#4691545 - get gmd_quality_config match value.
1126: ====================================================*/
1127: l_inv_spec.exact_match := get_conf_match_value(p_samples_rec.organization_id);
1128:
1129: -- Find Inventory Spec.
1155: l_cust_spec.lot_number := p_samples_rec.lot_number;
1156: l_cust_spec.parent_lot_number := p_samples_rec.parent_lot_number;
1157:
1158: /*====================================================
1159: BUG#4691545 - get gmd_quality_config match value.
1160: ====================================================*/
1161: l_cust_spec.exact_match := get_conf_match_value(p_samples_rec.organization_id);
1162: -- Bug3151607
1163: l_cust_spec.date_effective := NVL(p_samples_rec.date_drawn,SYSDATE);
1199: l_wip_spec.lot_number := p_samples_rec.lot_number;
1200: l_wip_spec.parent_lot_number := p_samples_rec.parent_lot_number;
1201:
1202: /*====================================================
1203: BUG#4691545 - get gmd_quality_config match value.
1204: ====================================================*/
1205: l_wip_spec.exact_match := get_conf_match_value(p_samples_rec.organization_id);
1206:
1207:
1240: l_supp_spec.lot_number := p_samples_rec.lot_number;
1241: l_supp_spec.parent_lot_number := p_samples_rec.parent_lot_number;
1242:
1243: /*====================================================
1244: BUG#4691545 - get gmd_quality_config match value.
1245: ====================================================*/
1246: l_supp_spec.exact_match := get_conf_match_value(p_samples_rec.organization_id);
1247:
1248: -- Bug #3401377 : added rec_whse and rec_location to form MPL
2748: -- WHERE orgn_code = p_orgn_code
2749: -- AND delete_mark = 0;
2750: SELECT 1
2751: FROM mtl_parameters m,
2752: gmd_quality_config g
2753: WHERE g.organization_id = m.organization_id
2754: AND m.organization_id = p_organization_id
2755: AND m. process_enabled_flag = 'Y' ;
2756:
2773: -- AND plant_ind <> 0
2774: -- AND delete_mark = 0;
2775: SELECT 1
2776: FROM mtl_parameters m,
2777: gmd_quality_config g
2778: WHERE g.organization_id = m.organization_id
2779: AND g.quality_lab_ind = 'Y'
2780: AND m.organization_id = p_organization_id
2781: AND m. process_enabled_flag = 'Y' ;