DBA Data[Home] [Help]

APPS.GMD_DISP_PUB SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 92

 p_update_disp_rec        IN GMD_SAMPLES_GRP.update_disp_rec
,p_to_disposition	  IN VARCHAR2
,x_return_status         OUT NOCOPY VARCHAR2
,x_msg_count             OUT NOCOPY NUMBER
,x_msg_data              OUT NOCOPY VARCHAR2
);
Line: 115

  SELECT event_spec_disp_id
  FROM   gmd_samples gs, gmd_event_spec_disp ge
  WHERE  gs.sampling_event_id    = ge.sampling_event_id
  AND    ge.spec_used_for_lot_attrib_ind = 'Y'
  AND    gs.sample_id      = p_id
  AND    ge.delete_mark    = 0
  ;
Line: 124

  SELECT DISTINCT event_spec_disp_id
  FROM   gmd_samples gs, gmd_event_spec_disp ge
  WHERE  gs.sampling_event_id    = ge.sampling_event_id
  AND    gs.sampling_event_id = p_id
  AND    ge.spec_used_for_lot_attrib_ind = 'Y'
  AND    ge.delete_mark    = 0
  ;
Line: 171

    SELECT 1
    FROM   mtl_lot_numbers
    WHERE  inventory_item_id = p_inventory_item_id
    AND    organization_id   = p_organization_id
    AND    parent_lot_number = p_parent_lot_number;
Line: 178

    SELECT 1
    FROM   mtl_lot_numbers
    WHERE  inventory_item_id = p_inventory_item_id
    AND    organization_id   = p_organization_id
    AND    parent_lot_number = p_parent_lot_number
    AND    lot_number        = p_lot_number;
Line: 247

   SELECT distinct wlpn.lpn_id, wlpn.license_plate_number
   FROM  wms_license_plate_numbers wlpn,
         wms_lpn_contents wlc
   WHERE wlpn.lpn_id = wlc.parent_lpn_id
   AND   wlpn.organization_id = p_organization_id
   AND   wlpn.parent_lpn_id is null
   AND   wlc.inventory_item_id = p_inventory_item_id
   AND  (wlc.lot_number = p_lot_number or p_lot_number is null)
   AND   wlpn.lpn_id = x_lpn_id;
Line: 258

   SELECT distinct wlpn.lpn_id, wlpn.license_plate_number
   FROM  wms_license_plate_numbers wlpn,
         wms_lpn_contents wlc
   WHERE wlpn.lpn_id = wlc.parent_lpn_id
   AND   wlpn.organization_id = p_organization_id
   AND   wlpn.parent_lpn_id is null
   AND   wlc.inventory_item_id = p_inventory_item_id
   AND  (wlc.lot_number = p_lot_number or p_lot_number is null)
   AND   wlpn.license_plate_number = x_lpn;
Line: 317

SELECT reason_id
FROM   mtl_transaction_reasons
WHERE  NVL(disable_date, SYSDATE) >= SYSDATE
AND    reason_name = p_reason_code;
Line: 364

   SELECT creation_date, hold_date
   FROM   mtl_lot_numbers
   WHERE  inventory_item_id = p_inventory_item_id
   AND    organization_id   = p_organization_id
   AND    lot_number        = p_lot_number
   AND    ((p_parent_lot_number IS NULL)
            OR (parent_lot_number = p_parent_lot_number));
Line: 379

     SELECT max(creation_date)
     INTO x_lot_created
     FROM mtl_lot_numbers
     WHERE lot_number        = p_lot_number
     AND   organization_id   = p_organization_id
     AND   inventory_item_id = p_inventory_item_id;
Line: 386

     SELECT max(hold_date)
     INTO   x_hold_date
     FROM   mtl_lot_numbers
     WHERE lot_number        = p_lot_number
     AND   organization_id   = p_organization_id
     AND   inventory_item_id = p_inventory_item_id;
Line: 412

SELECT status_id, status_code
FROM mtl_material_statuses
WHERE status_code = p_status
AND enabled_flag = 1;
Line: 418

SELECT grade_code
FROM mtl_grades
WHERE grade_code = p_status
AND disable_flag = 'N';
Line: 472

 p_update_disp_rec        IN GMD_SAMPLES_GRP.update_disp_rec
,p_to_disposition	  IN VARCHAR2
,x_return_status         OUT NOCOPY VARCHAR2
,x_msg_count             OUT NOCOPY NUMBER
,x_msg_data              OUT NOCOPY VARCHAR2
) IS

  l_msg_count            NUMBER  :=0;
Line: 509

      SELECT count(1)
      FROM   gmd_event_spec_disp esd,
             gmd_results r,
             gmd_spec_results sr,
             gmd_spec_tests_b st
      WHERE  esd.event_spec_disp_id = p_update_disp_rec.event_spec_disp_id
      AND    esd.event_spec_disp_id = sr.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND    (sr.evaluation_ind IS NULL OR sr.evaluation_ind    NOT IN ('0A', '4C', '5O'))
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0
      AND    esd.spec_id = st.spec_id
      AND    st.test_id = r.test_id
      AND    ((l_include_optional = 'N' and st.optional_ind IS NULL) OR (l_include_optional = 'Y'));
Line: 526

      SELECT count(1)
      FROM   gmd_results r, gmd_spec_results sr
      WHERE  sr.event_spec_disp_id  = p_update_disp_rec.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND    sr.additional_test_ind = 'Y'
      AND    (sr.evaluation_ind IS NULL OR sr.evaluation_ind    NOT IN ('0A', '4C', '5O'))
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0;
Line: 537

	SELECT COUNT(1)
	FROM   gmd_composite_results
	WHERE  composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id
	AND    delete_mark = 0 ;
Line: 543

        SELECT count(1)
        FROM   gmd_event_spec_disp esd, gmd_composite_spec_disp csd,
               gmd_composite_results cr, gmd_spec_tests_b st
        WHERE  csd.composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id
        AND    csd.event_spec_disp_id = esd.event_spec_disp_id
        AND    csd.latest_ind = 'Y'
        AND    csd.composite_spec_disp_id = cr.composite_spec_disp_id
        AND    cr.in_spec_ind IS NULL
        AND    st.spec_id = esd.spec_id
        AND    st.test_id = cr.test_id
        AND    (st.optional_ind IS NULL OR (l_include_optional = 'Y' and st.optional_ind = 'Y' and (cr.mean IS NOT NULL or cr.mode_char IS NOT NULL)));
Line: 556

        SELECT count(1)
        FROM   gmd_event_spec_disp esd, gmd_composite_spec_disp csd,
               gmd_composite_results cr
        WHERE  csd.composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id
        AND    csd.event_spec_disp_id = esd.event_spec_disp_id
        AND    csd.latest_ind = 'Y'
        AND    csd.composite_spec_disp_id = cr.composite_spec_disp_id
        AND    cr.in_spec_ind IS NULL
        AND    cr.test_id NOT IN (SELECT st.test_id FROM   gmd_spec_tests_b st WHERE  st.spec_id = esd.spec_id);
Line: 567

      SELECT   count(1)
      FROM   gmd_event_spec_disp esd, gmd_results r, gmd_spec_results sr,
             gmd_spec_tests_b st
      WHERE  esd.event_spec_disp_id = p_update_disp_rec.event_spec_disp_id
      AND    esd.event_spec_disp_id = sr.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND   ((sr.evaluation_ind IS NULL OR sr.evaluation_ind NOT IN ('2R')) OR sr.in_spec_ind = 'Y' )
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0
      AND    esd.spec_id = st.spec_id
      AND    st.test_id = r.test_id ;
Line: 581

      SELECT   count(1)
      FROM   gmd_results r, gmd_spec_results sr
      WHERE  sr.event_spec_disp_id  = p_update_disp_rec.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND    sr.additional_test_ind = 'Y'
      AND    (sr.evaluation_ind IS NULL OR sr.evaluation_ind NOT IN ('2R'))
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0;
Line: 592

      SELECT   count(1)
      FROM   gmd_event_spec_disp esd, gmd_results r, gmd_spec_results sr,
             gmd_spec_tests_b st
      WHERE  esd.event_spec_disp_id = p_update_disp_rec.event_spec_disp_id
      AND    esd.event_spec_disp_id = sr.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND    (sr.in_spec_ind IS NULL AND (sr.evaluation_ind IS NULL))
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0
      AND    esd.spec_id = st.spec_id
      AND    st.test_id = r.test_id
      AND    ((l_include_optional = 'N' and st.optional_ind IS NULL) OR (l_include_optional = 'Y'));
Line: 607

      SELECT   count(1)
      FROM   gmd_results r, gmd_spec_results sr
      WHERE  sr.event_spec_disp_id  = p_update_disp_rec.event_spec_disp_id
      AND    sr.result_id           = r.result_id
      AND    r.sample_id            = p_update_disp_rec.sample_id
      AND    sr.additional_test_ind = 'Y'
      AND    (sr.evaluation_ind IS NULL)
      AND    r.delete_mark          = 0
      AND    sr.delete_mark         = 0;
Line: 618

    SELECT organization_id
    FROM gmd_samples
    WHERE sample_id = p_update_disp_rec.sample_id;
Line: 623

    SELECT organization_id
    FROM gmd_sampling_events gse,
         gmd_event_spec_disp gesd,
         gmd_composite_spec_disp gcsd
    WHERE gse.sampling_event_id = gesd.sampling_event_id
    AND   gesd.event_spec_disp_id = gcsd.event_spec_disp_id
    AND   gcsd.composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id;
Line: 637

       IF p_update_disp_rec.sample_id IS NOT NULL THEN
          OPEN c_get_smpl_org_id;
Line: 658

      IF  (p_update_disp_rec.sample_id IS NOT NULL AND p_update_disp_rec.composite_spec_disp_id IS NOT NULL)
      OR  (p_update_disp_rec.sample_id IS NULL AND p_update_disp_rec.composite_spec_disp_id IS NULL)
      THEN
        RAISE INVALID_PARAMETERS; --'GMD_INVALID_PARAMETERS'
Line: 666

      IF  p_update_disp_rec.sample_id IS NOT NULL  THEN
	      	OPEN  c_non_accept_w_spec ;
Line: 691

		IF p_update_disp_rec.curr_disposition = '1P' THEN
                    IF p_to_disposition NOT IN ('7CN') THEN
  	  	       RAISE INVALID_DISPOSITION ;
Line: 695

		ELSIF p_update_disp_rec.curr_disposition = '2I' THEN
		    IF l_reject_w_spec_no_av + l_reject_wo_spec_no_av > 0 THEN
		       IF p_to_disposition NOT IN ('7CN','6RJ') THEN
  	  	          RAISE INVALID_DISPOSITION ;
Line: 705

		ELSIF p_update_disp_rec.curr_disposition = '3C' THEN
   	   	    IF l_non_accept_w_spec + l_non_accept_wo_spec = 0 THEN
		       IF p_to_disposition NOT IN ('4A','6RJ') THEN
  	  	          RAISE INVALID_DISPOSITION ;
Line: 724

		ELSIF p_update_disp_rec.curr_disposition = '4A' AND p_update_disp_rec.no_of_samples_for_event = 1 THEN
                    IF p_to_disposition NOT IN ('7CN','6RJ') THEN
                       RAISE INVALID_DISPOSITION ;
Line: 728

		ELSIF p_update_disp_rec.curr_disposition = '5AV' AND p_update_disp_rec.no_of_samples_for_event = 1 THEN
                    IF p_to_disposition NOT IN ('7CN','6RJ') THEN
                       RAISE INVALID_DISPOSITION ;
Line: 732

		ELSIF p_update_disp_rec.curr_disposition = '6RJ' AND p_update_disp_rec.no_of_samples_for_event = 1 THEN
                    IF p_to_disposition NOT IN ('5AV','7CN') THEN
                       RAISE INVALID_DISPOSITION ;
Line: 746

      ELSIF  p_update_disp_rec.composite_spec_disp_id IS NOT NULL THEN
		OPEN  cr_check_comp_results_in_spec ;
Line: 759

		IF NVL(l_test_count,0) = 0  AND p_update_disp_rec.curr_disposition = '3C' THEN
		   RAISE NO_TESTS_CMP;
Line: 763

		IF  p_update_disp_rec.curr_disposition = '3C' THEN
		  IF l_non_accept_w_spec + l_non_accept_wo_spec = 0 THEN
   	   	     IF p_to_disposition NOT IN ('4A','6RJ') THEN
		        RAISE INVALID_DISPOSITION;
Line: 773

		ELSIF  p_update_disp_rec.curr_disposition = '2I' THEN
		  IF p_to_disposition NOT IN ('5AV','6RJ') THEN
		      RAISE INVALID_DISPOSITION;
Line: 778

      END IF; -- p_update_disp_rec.sample_id IS NOT NULL
Line: 829

l_update_disp_rec       GMD_SAMPLES_GRP.update_disp_rec;
Line: 830

l_change_rec            GMD_SAMPLES_GRP.update_change_disp_rec;
Line: 889

 SELECT sample_req_cnt, sample_active_cnt, sample_taken_cnt
 FROM gmd_sampling_events
 WHERE sampling_event_id = p_change_disp_rec.sampling_event_id;
Line: 895

 SELECT sample_id
 FROM gmd_samples
 WHERE sampling_event_id = p_change_disp_rec.sampling_event_id;
Line: 900

 SELECT composite_spec_disp_id
 FROM gmd_composite_spec_disp
 WHERE event_spec_disp_id = l_event_spec_disp_id;
Line: 905

   SELECT control_lot_attrib_ind,
          in_spec_lot_status_id,
          out_of_spec_lot_status_id,
          null
   FROM   gmd_inventory_spec_vrs
   WHERE  spec_vr_id = l_spec_vr_id
   UNION ALL
   SELECT control_lot_attrib_ind,
          in_spec_lot_status_id,
          out_of_spec_lot_status_id,
	  control_batch_step_ind
   FROM   gmd_wip_spec_vrs
   WHERE  spec_vr_id = l_spec_vr_id
   UNION ALL
   SELECT control_lot_attrib_ind,
          in_spec_lot_status_id,
          out_of_spec_lot_status_id,
	  null
   FROM   gmd_supplier_spec_vrs
   WHERE  spec_vr_id = l_spec_vr_id ;
Line: 927

	SELECT  delayed_lot_entry
	FROM    GMD_INVENTORY_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id
	UNION ALL
	SELECT  delayed_lot_entry
	FROM    GMD_WIP_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id
	UNION ALL
	SELECT  delayed_lot_entry
	FROM    GMD_SUPPLIER_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id ;
Line: 940

	SELECT  delayed_lpn_entry
	FROM    GMD_INVENTORY_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id
	UNION ALL
	SELECT  delayed_lpn_entry
	FROM    GMD_WIP_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id
	UNION ALL
	SELECT  delayed_lpn_entry
	FROM    GMD_SUPPLIER_SPEC_VRS
	WHERE   spec_vr_id = l_spec_vr_id ;
Line: 961

    l_update_disp_rec.sample_id :=  p_change_disp_rec.sample_id;
Line: 962

    l_update_disp_rec.sampling_event_id :=  p_change_disp_rec.sampling_event_id;
Line: 981

    IF l_update_disp_rec.sample_id IS NOT NULL THEN
      	l_update_disp_rec.event_spec_disp_id  := get_current_event_spec_disp_id(l_update_disp_rec.sample_id,'Y');
Line: 984

     	 l_update_disp_rec.event_spec_disp_id  := get_current_event_spec_disp_id(l_update_disp_rec.sampling_event_id,'N');
Line: 985

  	 IF  l_update_disp_rec.event_spec_disp_id IS NOT NULL THEN
      	   OPEN composite_spec_disp(l_update_disp_rec.event_spec_disp_id);
Line: 987

      	   FETCH composite_spec_disp INTO l_update_disp_rec.composite_spec_disp_id;
Line: 992

    l_update_disp_rec.called_from_results :='N';
Line: 1002

       l_update_disp_rec.no_of_samples_for_event := 1;
Line: 1003

       IF l_update_disp_rec.sample_id IS NULL THEN
         OPEN get_sample_id;
Line: 1005

         FETCH get_sample_id INTO l_update_disp_rec.sample_id;
Line: 1009

       l_update_disp_rec.no_of_samples_for_event := 2;
Line: 1019

   IF l_update_disp_rec.sample_id IS NOT NULL THEN

    SELECT a.organization_id,b.lot_control_code,b.grade_control_flag,b.child_lot_flag,b.lot_status_enabled,a.sample_type,a.source,
           a.inventory_item_id,a.parent_lot_number,a.lot_number,a.lpn_id,a.subinventory,a.locator_id,c.concatenated_segments,a.lpn_id,d.license_plate_number,e.wms_enabled_flag
    INTO l_organization_id,l_lot_control_code,l_grade_control_flag,l_child_lot_flag,l_lot_status_enabled,l_sample_type,l_source,
	 l_inventory_item_id,l_parent_lot_number,l_lot_number,l_lpn_id,l_subinventory,l_locator_id,l_locator,l_lpn_id,l_lpn,l_wms_enabled_flag
    FROM  gmd_samples a,
          mtl_system_items_b b,
          mtl_item_locations_kfv c,
          wms_license_plate_numbers d,
	  mtl_parameters e
    WHERE a.sample_id = l_update_disp_rec.sample_id
    AND   a.delete_mark = 0
    AND   a.organization_id = b.organization_id(+)
    AND   a.inventory_item_id   = b.inventory_item_id(+)
    AND   a.organization_id = c.organization_id(+)
    AND   a.locator_id = c.inventory_location_id(+)
    AND   a.lpn_id = d.lpn_id(+)
    AND   a.organization_id = e.organization_id;
Line: 1042

    SELECT a.DISPOSITION,
           b.EVENT_SPEC_DISP_ID,
           b.spec_id,b.spec_vr_id,
	   c.spec_name,
           c.spec_vers
    INTO   l_update_disp_rec.curr_disposition,l_update_disp_rec.event_spec_disp_id,
	   l_spec_id,l_spec_vr_id,
           l_spec_name,l_spec_vers
    FROM   gmd_sample_spec_disp a,
               gmd_event_spec_disp b,
               gmd_specifications_b c
    WHERE a.sample_id = l_update_disp_rec.sample_id
    AND   a.event_spec_disp_id = b.event_spec_disp_id
    AND   a.delete_mark = 0
    AND   b.SPEC_USED_FOR_LOT_ATTRIB_IND = 'Y'
    AND   b.delete_mark = 0
    AND   b.spec_id = c.spec_id(+);
Line: 1062

      IF  (l_update_disp_rec.no_of_samples_for_event = 1)
	  AND (l_sample_type <> 'M') AND (l_source <> 'T')   --Not a Monitoring Sample and Stability Study Sample
          AND (l_spec_vr_id IS NOT NULL)
          AND (l_lot_control_code = 2)       -- Lot controlled item
          AND (l_lot_number IS NULL)
          AND (l_update_disp_rec.curr_disposition = '3C') THEN

              OPEN  cr_get_delayed_lot_entry;
Line: 1092

                    UPDATE GMD_SAMPLES
		    SET parent_lot_number = p_change_disp_rec.parent_lot_number,
		        lot_number        = p_change_disp_rec.lot_number
        	    WHERE sample_id = l_update_disp_rec.sample_id ;
Line: 1097

		    UPDATE GMD_SAMPLING_EVENTS
		    SET parent_lot_number = p_change_disp_rec.parent_lot_number,
		        lot_number        = p_change_disp_rec.lot_number
                    WHERE sampling_event_id = (SELECT sampling_event_id FROM gmd_samples
		                               WHERE sample_id = l_update_disp_rec.sample_id );
Line: 1110

      IF  (l_update_disp_rec.no_of_samples_for_event = 1)
	  AND (l_sample_type <> 'M') AND (l_source <> 'T')   --Not a Monitoring Sample and Stability Study Sample
          AND (l_spec_vr_id IS NOT NULL)
          AND (l_wms_enabled_flag = 'Y')       -- Org is WMS Enabled
          AND (l_lpn_id IS NULL)
          AND (l_update_disp_rec.curr_disposition = '3C') THEN

              OPEN  cr_get_delayed_lpn_entry;
Line: 1143

                    UPDATE GMD_SAMPLES
		    SET lpn_id = l_lpn_id
        	    WHERE sample_id = l_update_disp_rec.sample_id ;
Line: 1147

		    UPDATE GMD_SAMPLING_EVENTS
		    SET lpn_id = l_lpn_id
                    WHERE sampling_event_id = (SELECT sampling_event_id FROM gmd_samples
		                               WHERE sample_id = l_update_disp_rec.sample_id );
Line: 1159

  ELSIF  l_update_disp_rec.composite_spec_disp_id IS NOT NULL THEN

     SELECT gse.organization_id,gse.inventory_item_id,gse.parent_lot_number, gse.lot_number,msi.grade_control_flag,msi.lot_control_code,msi.child_lot_flag,msi.lot_status_enabled,
            gse.creation_date,gse.subinventory,gse.locator_id,mil.concatenated_segments,gse.lpn_id,wlpn.license_plate_number,mp.wms_enabled_flag,
            NVL(gse.sample_type, 'I'),nvl(gse.source,'I'),esd.spec_id,esd.spec_vr_id,csd.disposition,gsb.spec_name,gsb.spec_vers
     INTO   l_organization_id,l_inventory_item_id,l_parent_lot_number,l_lot_number,l_grade_control_flag,l_lot_control_code,l_child_lot_flag,l_lot_status_enabled,
            l_sampling_event_date,l_subinventory,l_locator_id,l_locator,l_lpn_id,l_lpn,l_wms_enabled_flag,
            l_sample_type,l_source,l_spec_id,l_spec_vr_id,l_update_disp_rec.curr_disposition,l_spec_name,l_spec_vers
     FROM   gmd_composite_spec_disp  csd,
            gmd_event_spec_disp esd ,
            gmd_sampling_events gse,
            mtl_system_items_b msi,
            gmd_specifications_b gsb,
            mtl_item_locations_kfv mil,
            wms_license_plate_numbers wlpn,
     	  mtl_parameters mp
     WHERE  csd.composite_spec_disp_id = l_update_disp_rec.composite_spec_disp_id
     AND   csd.event_spec_disp_id = esd.event_spec_disp_id
     AND   esd.sampling_event_id  = gse.sampling_event_id
     AND   gse.organization_id = msi.organization_id(+)
     AND   gse.inventory_item_id = msi.inventory_item_id(+)
     AND   esd.spec_id = gsb.spec_id(+)
     AND   gse.organization_id = mil.organization_id(+)
     AND   gse.locator_id = mil.inventory_location_id(+)
     AND   gse.lpn_id = wlpn.lpn_id(+)
     AND   gse.organization_id = mp.organization_id;
Line: 1190

        AND (l_update_disp_rec.curr_disposition = '3C') THEN

              OPEN  cr_get_delayed_lot_entry;
Line: 1215

                    UPDATE GMD_SAMPLES
		    SET parent_lot_number = p_change_disp_rec.parent_lot_number,
		        lot_number        = p_change_disp_rec.lot_number
        	    WHERE sampling_event_id = l_update_disp_rec.sampling_event_id;
Line: 1220

		    UPDATE GMD_SAMPLING_EVENTS
		    SET parent_lot_number = p_change_disp_rec.parent_lot_number,
		        lot_number        = p_change_disp_rec.lot_number
                    WHERE sampling_event_id = l_update_disp_rec.sampling_event_id;
Line: 1236

        AND (l_update_disp_rec.curr_disposition = '3C') THEN

              OPEN  cr_get_delayed_lpn_entry;
Line: 1264

                    UPDATE GMD_SAMPLES
		    SET lpn_id = l_lpn_id
        	    WHERE sampling_event_id = l_update_disp_rec.sampling_event_id;
Line: 1268

		    UPDATE GMD_SAMPLING_EVENTS
		    SET lpn_id = l_lpn_id
                    WHERE sampling_event_id = l_update_disp_rec.sampling_event_id;
Line: 1282

  IF l_update_disp_rec.curr_disposition IN ('0PL','1P','7CN','0RT') THEN
      RAISE INVALID_DISPOSITION;
Line: 1284

  ELSIF l_update_disp_rec.curr_disposition IN ('4A','5AV','6RJ')
        AND l_update_disp_rec.sample_id IS NOT NULL THEN
      RAISE INVALID_DISPOSITION;  --Already in Final Disposition. No target disp available.
Line: 1305

  IF (l_update_disp_rec.no_of_samples_for_event = 1  OR l_update_disp_rec.composite_spec_disp_id IS NOT NULL) THEN
    IF p_change_disp_rec.to_disposition IN ('4A','5AV','6RJ') THEN
       IF l_spec_vr_id IS NOT NULL THEN
	 OPEN  cr_get_lot_status;
Line: 1343

	      SELECT grade_code, status_id
	      INTO   l_from_grade_code, l_from_lot_status_id
	      FROM   mtl_lot_numbers
	      WHERE  ((lot_number        = l_lot_number) OR  (l_lot_number IS NULL))
	      AND    ((parent_lot_number = l_parent_lot_number) OR  (l_parent_lot_number IS NULL))
	      AND    organization_id   = l_organization_id
	      AND    inventory_item_id = l_inventory_item_id;
Line: 1375

               SELECT status_id INTO l_to_lot_status_id
	       FROM mtl_material_statuses
	       WHERE status_code = p_change_disp_rec.to_lot_status
	       AND   enabled_flag = 1;
Line: 1386

		SELECT grade_code INTO l_to_grade_code
		FROM  GMD_SPECIFICATIONS_B
		WHERE spec_id = l_spec_id ;
Line: 1415

	     SELECT transaction_reason_id INTO l_reason_id
	     FROM GMD_QUALITY_CONFIG
	     WHERE organization_id = l_organization_id ;
Line: 1424

  END IF;  --    l_update_disp_rec.no_of_samples_for_event = 1
Line: 1429

         p_update_disp_rec => l_update_disp_rec
	,p_to_disposition  => p_change_disp_rec.to_disposition
	,x_return_status   => l_return_status
	,x_msg_count       => l_msg_count
	,x_msg_data        => l_message_data
       );
Line: 1445

  GMD_DISP_GRP.update_sample_comp_disp
		( p_update_disp_rec => l_update_disp_rec
		, p_to_disposition  =>  p_change_disp_rec.to_disposition
		, x_return_status   => l_return_status
		, x_message_data    => l_message_data );
Line: 1459

       Gmd_Disp_Grp.update_lot_grade_batch (
    	     p_sample_id              => l_update_disp_rec.sample_id
	   , p_composite_spec_disp_id => l_update_disp_rec.composite_spec_disp_id
	   , p_to_lot_status_id       => l_to_lot_status_id
	   , p_from_lot_status_id     => l_from_lot_status_id
	   , p_to_grade_code	      => NVL(p_change_disp_rec.to_grade_code,l_to_grade_code)
	   , p_from_grade_code	      => l_from_grade_code
	   , p_to_qc_status	      => l_to_qc_status
	   , p_reason_id	      => l_reason_id
	   , p_hold_date              => l_hold_date
	   , x_return_status 	      => l_return_status
	   , x_message_data	      => l_message_data );