DBA Data[Home] [Help]

APPS.GMD_SAMPLES_GRP dependencies on GMD_SAMPLING_EVENTS

Line 128: FROM gmd_sampling_events se,

124: -- otherwise inventory sample could become part of another source
125: -- group using inventory spec vr
126: CURSOR c_inv_sampling_event IS
127: SELECT se.sampling_event_id
128: FROM gmd_sampling_events se,
129: -- gmd_specifications_b s,
130: -- gmd_inventory_spec_vrs ivr,
131: gmd_event_spec_disp esd
132: -- WHERE s.spec_id = ivr.spec_id

Line 164: FROM gmd_sampling_events se,

160: -- group using inventory spec vr
161: -- Bug 4640143: added material detail id
162: CURSOR c_wip_sampling_event IS
163: SELECT se.sampling_event_id
164: FROM gmd_sampling_events se,
165: gmd_event_spec_disp esd
166: WHERE esd.sampling_event_id = se.sampling_event_id
167: AND ( (esd.spec_vr_id = p_spec_vr_id) OR
168: (esd.spec_vr_id is null and p_spec_vr_id is null ))

Line 231: FROM gmd_sampling_events se,

227: -- otherwise inventory sample could become part of cust source
228: -- group using inventory spec vr
229: CURSOR c_cust_sampling_event IS
230: SELECT se.sampling_event_id
231: FROM gmd_sampling_events se,
232: -- gmd_specifications_b s,
233: -- gmd_customer_spec_vrs cvr,
234: gmd_event_spec_disp esd
235: -- WHERE s.spec_id = cvr.spec_id

Line 284: FROM gmd_sampling_events se,

280: -- group using inventory spec vr
281: -- Bug 3143796: added whse, location and lot_number
282: CURSOR c_supp_sampling_event IS
283: SELECT se.sampling_event_id
284: FROM gmd_sampling_events se,
285: -- gmd_specifications_b s,
286: -- gmd_supplier_spec_vrs svr,
287: gmd_event_spec_disp esd
288: -- WHERE s.spec_id = svr.spec_id

Line 339: FROM gmd_sampling_events se,

335: -- if se.resource was null then location sampling events were
336: -- attached to resource samples.
337: CURSOR c_res_sampling_event IS
338: SELECT se.sampling_event_id
339: FROM gmd_sampling_events se,
340: -- gmd_specifications_b s,
341: -- gmd_monitoring_spec_vrs svr,
342: gmd_event_spec_disp esd
343: -- WHERE s.spec_id = svr.spec_id

Line 385: FROM gmd_sampling_events se,

381: -- added extra and clause that both locations should be NULL.
382:
383: CURSOR c_loc_sampling_event IS
384: SELECT se.sampling_event_id
385: FROM gmd_sampling_events se,
386: -- gmd_specifications_b s,
387: -- gmd_monitoring_spec_vrs svr,
388: gmd_event_spec_disp esd
389: -- WHERE s.spec_id = svr.spec_id

Line 511: FROM gmd_sampling_events se,

507: ) RETURN BOOLEAN IS
508:
509: CURSOR c_inv_sampling_event IS
510: SELECT se.sampling_event_id
511: FROM gmd_sampling_events se,
512: gmd_specifications_b s,
513: gmd_inventory_spec_vrs ivr,
514: gmd_event_spec_disp esd
515: WHERE s.spec_id = ivr.spec_id

Line 552: FROM gmd_sampling_events se,

548:
549: -- Bug 4640143: added material detail id
550: CURSOR c_wip_sampling_event IS
551: SELECT se.sampling_event_id
552: FROM gmd_sampling_events se,
553: gmd_specifications_b s,
554: gmd_wip_spec_vrs wvr,
555: gmd_event_spec_disp esd
556: WHERE s.spec_id = wvr.spec_id

Line 618: FROM gmd_sampling_events se,

614:
615:
616: CURSOR c_cust_sampling_event IS
617: SELECT se.sampling_event_id
618: FROM gmd_sampling_events se,
619: gmd_specifications_b s,
620: gmd_customer_spec_vrs cvr,
621: gmd_event_spec_disp esd
622: WHERE s.spec_id = cvr.spec_id

Line 665: FROM gmd_sampling_events se,

661:
662:
663: CURSOR c_supp_sampling_event IS
664: SELECT se.sampling_event_id
665: FROM gmd_sampling_events se,
666: gmd_specifications_b s,
667: gmd_supplier_spec_vrs svr,
668: gmd_event_spec_disp esd
669: WHERE s.spec_id = svr.spec_id

Line 708: FROM gmd_sampling_events se,

704: -- if se.resource was null then location sampling events were
705: -- attached to resource samples.
706: CURSOR c_res_sampling_event IS
707: SELECT se.sampling_event_id
708: FROM gmd_sampling_events se,
709: gmd_specifications_b s,
710: gmd_monitoring_spec_vrs svr,
711: gmd_event_spec_disp esd
712: WHERE s.spec_id = svr.spec_id

Line 751: FROM gmd_sampling_events se,

747: -- added extra and clause that both locations should be NULL.
748:
749: CURSOR c_loc_sampling_event IS
750: SELECT se.sampling_event_id
751: FROM gmd_sampling_events se,
752: gmd_specifications_b s,
753: gmd_monitoring_spec_vrs svr,
754: gmd_event_spec_disp esd
755: WHERE s.spec_id = svr.spec_id

Line 901: FROM gmd_sampling_events se

897: ) RETURN BOOLEAN IS
898:
899: CURSOR c_inv_sampling_event IS
900: SELECT se.sampling_event_id
901: FROM gmd_sampling_events se
902: WHERE se.inventory_item_id = p_sample.inventory_item_id
903: AND se.organization_id = p_sample.organization_id
904: AND se.original_spec_vr_id IS NULL
905: AND ((se.subinventory IS NULL AND p_sample.subinventory IS NULL) OR

Line 924: FROM gmd_sampling_events se

920:
921: -- Bug 4640143: added material detail id
922: CURSOR c_wip_sampling_event IS
923: SELECT se.sampling_event_id
924: FROM gmd_sampling_events se
925: WHERE se.inventory_item_id = p_sample.inventory_item_id
926: AND se.organization_id = p_sample.organization_id
927: AND se.original_spec_vr_id IS NULL
928: AND ((se.batch_id is NULL AND p_sample.batch_id is NULL) OR

Line 972: FROM gmd_sampling_events se

968:
969:
970: CURSOR c_cust_sampling_event IS
971: SELECT se.sampling_event_id
972: FROM gmd_sampling_events se
973: WHERE se.inventory_item_id = p_sample.inventory_item_id
974: AND se.organization_id = p_sample.organization_id
975: AND se.original_spec_vr_id IS NULL
976: AND ((se.cust_id is NULL AND p_sample.cust_id is NULL) OR

Line 1001: FROM gmd_sampling_events se

997:
998: -- Bug 3143796: added whse, location and lot_id
999: CURSOR c_supp_sampling_event IS
1000: SELECT se.sampling_event_id
1001: FROM gmd_sampling_events se
1002: WHERE se.inventory_item_id = p_sample.inventory_item_id
1003: AND se.organization_id = p_sample.organization_id
1004: AND se.original_spec_vr_id IS NULL
1005: AND ((se.supplier_id is NULL AND p_sample.supplier_id is NULL) OR

Line 1037: FROM gmd_sampling_events se

1033:
1034:
1035: CURSOR c_res_sampling_event IS
1036: SELECT se.sampling_event_id
1037: FROM gmd_sampling_events se
1038: WHERE ((se.organization_id is NULL AND p_sample.organization_id IS NULL) OR
1039: (se.organization_id = p_sample.organization_id)
1040: )
1041: AND se.source = p_sample.source

Line 1067: FROM gmd_sampling_events se

1063: -- resource sampling event cursor.
1064:
1065: CURSOR c_loc_sampling_event IS
1066: SELECT se.sampling_event_id
1067: FROM gmd_sampling_events se
1068: WHERE ((se.organization_id is NULL) OR
1069: (se.organization_id = p_sample.organization_id )
1070: )
1071: AND se.source = p_sample.source

Line 1490: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs

1486: --Bug# 5440347 start
1487: --this cursor is used for single samples
1488: CURSOR cur_auto_complete_bstep IS
1489: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
1490: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
1491: WHERE gs.SAMPLE_ID = p_update_disp_rec.sample_id
1492: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
1493: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
1494:

Line 1498: FROM gmd_sampling_events

1494:
1495: --the below two cursors are used for sample groups
1496: CURSOR cur_sampling_event_details(p_sampling_event_id NUMBER) IS
1497: SELECT step_id,organization_id,sample_type,source
1498: FROM gmd_sampling_events
1499: WHERE sampling_event_id = p_sampling_event_id;
1500:
1501: CURSOR cur_comp_auto_complete_bstep(p_sampling_event_id NUMBER) IS
1502: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')

Line 1503: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse

1499: WHERE sampling_event_id = p_sampling_event_id;
1500:
1501: CURSOR cur_comp_auto_complete_bstep(p_sampling_event_id NUMBER) IS
1502: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
1503: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse
1504: WHERE gse.SAMPLING_EVENT_ID = p_sampling_event_id
1505: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
1506:
1507: l_auto_complete_bstep VARCHAR2(1) := NULL;

Line 1685: UPDATE gmd_sampling_events

1681: IF (l_sample_curr_disp NOT IN ('0RT','7CN') AND
1682: p_to_disposition IN ('0RT','7CN'))
1683: THEN
1684:
1685: UPDATE gmd_sampling_events
1686: SET sample_active_cnt = sample_active_cnt - 1,
1687: recomposite_ind = 'Y',
1688: last_updated_by = l_last_updated_by,
1689: last_update_date = l_last_update_date,

Line 1697: UPDATE gmd_sampling_events

1693: ELSIF (l_sample_curr_disp IN ('0RT','7CN') AND
1694: p_to_disposition NOT IN ('0RT','7CN'))
1695: THEN
1696:
1697: UPDATE gmd_sampling_events
1698: SET sample_active_cnt = sample_active_cnt + 1,
1699: recomposite_ind = 'Y',
1700: last_updated_by = l_last_updated_by,
1701: last_update_date = l_last_update_date,

Line 1710: FROM gmd_sampling_events

1706: l_position := '025' ;
1707:
1708: SELECT nvl(sample_active_cnt,0),nvl(sample_req_cnt,1)
1709: INTO l_active_cnt,l_req_cnt
1710: FROM gmd_sampling_events
1711: WHERE sampling_event_id = l_sampling_event_id
1712: FOR UPDATE OF disposition NOWAIT ;
1713:
1714: ELSIF p_update_disp_rec.composite_spec_disp_id IS NOT NULL THEN

Line 1746: FROM gmd_sampling_events

1742: WHERE composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id ;
1743:
1744: SELECT nvl(sample_active_cnt,0),nvl(sample_req_cnt,1)
1745: INTO l_active_cnt,l_req_cnt
1746: FROM gmd_sampling_events
1747: WHERE sampling_event_id = l_sampling_event_id
1748: FOR UPDATE OF disposition NOWAIT ;
1749:
1750: --Bug# 5440347 start

Line 1940: UPDATE gmd_sampling_events

1936: last_update_login = l_last_update_login
1937: WHERE event_spec_disp_id = l_event_spec_disp_id ;
1938:
1939: -- Set the disposition of the Sampling Event
1940: UPDATE gmd_sampling_events
1941: SET disposition = l_final_event_disp,
1942: last_updated_by = l_last_updated_by,
1943: last_update_date = l_last_update_date,
1944: last_update_login = l_last_update_login

Line 2305: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs

2301: --Bug# 5440347 start
2302: --this cursor is used for single samples
2303: CURSOR cur_auto_complete_bstep_smpl IS
2304: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
2305: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
2306: WHERE gs.SAMPLE_ID = p_sample_id
2307: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
2308: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
2309:

Line 2312: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,

2308: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
2309:
2310: CURSOR cur_auto_complete_bstep_comp IS
2311: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
2312: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,
2313: GMD_EVENT_SPEC_DISP esd, GMD_COMPOSITE_SPEC_DISP csd
2314: WHERE csd.COMPOSITE_SPEC_DISP_ID = p_composite_spec_disp_id
2315: AND esd.EVENT_SPEC_DISP_ID = csd.EVENT_SPEC_DISP_ID
2316: AND gse.SAMPLING_EVENT_ID = esd.SAMPLING_EVENT_ID

Line 2395: GMD_SAMPLING_EVENTS gse,

2391: l_batch_id,
2392: l_step_no
2393: FROM GMD_COMPOSITE_SPEC_DISP csd,
2394: GMD_EVENT_SPEC_DISP esd ,
2395: GMD_SAMPLING_EVENTS gse,
2396: MTL_SYSTEM_ITEMS_b_kfv iim
2397: WHERE csd.composite_spec_disp_id = p_composite_spec_disp_id
2398: and csd.event_spec_disp_id = esd.event_spec_disp_id
2399: and esd.sampling_event_id = gse.sampling_event_id

Line 3014: FROM gmd_sampling_events

3010: AND inventory_item_id = p_inventory_item_id;
3011:
3012: CURSOR c_sampling_event(p_sampling_event_id NUMBER) IS
3013: SELECT 1
3014: FROM gmd_sampling_events
3015: WHERE sampling_event_id = p_sampling_event_id
3016: ;
3017:
3018: -- Bug 4165704: changed for inventory convergence

Line 4683: in_sampling_event gmd_sampling_events%ROWTYPE;

4679: AND l.lookup_code = ssd.disposition ;
4680:
4681: in_sample gmd_samples%ROWTYPE;
4682: out_sample gmd_samples%ROWTYPE;
4683: in_sampling_event gmd_sampling_events%ROWTYPE;
4684: out_sampling_event gmd_sampling_events%ROWTYPE;
4685: sampling_event gmd_sampling_events%ROWTYPE;
4686:
4687: /*=================================

Line 4684: out_sampling_event gmd_sampling_events%ROWTYPE;

4680:
4681: in_sample gmd_samples%ROWTYPE;
4682: out_sample gmd_samples%ROWTYPE;
4683: in_sampling_event gmd_sampling_events%ROWTYPE;
4684: out_sampling_event gmd_sampling_events%ROWTYPE;
4685: sampling_event gmd_sampling_events%ROWTYPE;
4686:
4687: /*=================================
4688: Added for BUG#4695552.

Line 4685: sampling_event gmd_sampling_events%ROWTYPE;

4681: in_sample gmd_samples%ROWTYPE;
4682: out_sample gmd_samples%ROWTYPE;
4683: in_sampling_event gmd_sampling_events%ROWTYPE;
4684: out_sampling_event gmd_sampling_events%ROWTYPE;
4685: sampling_event gmd_sampling_events%ROWTYPE;
4686:
4687: /*=================================
4688: Added for BUG#4695552.
4689: =================================*/

Line 4769: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,

4765: -- test for whether sample event id exists because then sampling event fields are needed
4766: IF ((NVL(out_sample.sample_id, 0) <> 0)
4767: AND (NVL(out_sample.sampling_event_id, 0) <> 0)) THEN
4768: in_sampling_event.sampling_event_id := out_sample.sampling_event_id;
4769: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,
4770: x_sampling_events => out_sampling_event))
4771: THEN
4772: -- Fetch Error.
4773: RAISE e_sampling_event_fetch_error;

Line 4837: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,

4833: END IF;
4834:
4835: ELSIF p_type = 'EVENT' THEN -- sampling_event_id is passed
4836: in_sampling_event.sampling_event_id := p_id;
4837: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,
4838: x_sampling_events => out_sampling_event))
4839: THEN
4840: -- Fetch Error.
4841: RAISE e_sampling_event_fetch_error;