DBA Data[Home] [Help]

APPS.GMD_SAMPLES_GRP dependencies on GMD_SAMPLING_EVENTS

Line 76: --| Added code to change Disposition in the tables GMD_SAMPLING_EVENTS, |

72: --| RLNAGARA LPN ME 7027149 09-May-2008 Added logic for lpn_id in all |
73: --| the necessary cursors |
74: --| PLOWE LPN ME 7027149 15-May-2008 support got LPN in group api |
75: --| KISHORE Bug No.8679485 Dt.16-Jul-2009 |
76: --| Added code to change Disposition in the tables GMD_SAMPLING_EVENTS, |
77: --| GMD_EVENT_SPEC_DISP while changing disposition from final to final like Accept to Reject
78: --| Reject -> Accept, Accept -> Accept With Variance etc...
79: --| Raju Bug 10169386 is fixed by calling the INV_MATERIAL_STATUS_PUB.update_status |
80: --| instead if private api to update the material status. |

Line 161: FROM gmd_sampling_events se,

157: -- otherwise inventory sample could become part of another source
158: -- group using inventory spec vr
159: CURSOR c_inv_sampling_event IS
160: SELECT se.sampling_event_id
161: FROM gmd_sampling_events se,
162: -- gmd_specifications_b s,
163: -- gmd_inventory_spec_vrs ivr,
164: gmd_event_spec_disp esd
165: -- WHERE s.spec_id = ivr.spec_id

Line 200: FROM gmd_sampling_events se,

196: -- group using inventory spec vr
197: -- Bug 4640143: added material detail id
198: CURSOR c_wip_sampling_event IS
199: SELECT se.sampling_event_id
200: FROM gmd_sampling_events se,
201: gmd_event_spec_disp esd
202: WHERE esd.sampling_event_id = se.sampling_event_id
203: AND ( (esd.spec_vr_id = p_spec_vr_id) OR
204: (esd.spec_vr_id is null and p_spec_vr_id is null ))

Line 270: FROM gmd_sampling_events se,

266: -- otherwise inventory sample could become part of cust source
267: -- group using inventory spec vr
268: CURSOR c_cust_sampling_event IS
269: SELECT se.sampling_event_id
270: FROM gmd_sampling_events se,
271: -- gmd_specifications_b s,
272: -- gmd_customer_spec_vrs cvr,
273: gmd_event_spec_disp esd
274: -- WHERE s.spec_id = cvr.spec_id

Line 326: FROM gmd_sampling_events se,

322: -- group using inventory spec vr
323: -- Bug 3143796: added whse, location and lot_number
324: CURSOR c_supp_sampling_event IS
325: SELECT se.sampling_event_id
326: FROM gmd_sampling_events se,
327: -- gmd_specifications_b s,
328: -- gmd_supplier_spec_vrs svr,
329: gmd_event_spec_disp esd
330: -- WHERE s.spec_id = svr.spec_id

Line 384: FROM gmd_sampling_events se,

380: -- if se.resource was null then location sampling events were
381: -- attached to resource samples.
382: CURSOR c_res_sampling_event IS
383: SELECT se.sampling_event_id
384: FROM gmd_sampling_events se,
385: -- gmd_specifications_b s,
386: -- gmd_monitoring_spec_vrs svr,
387: gmd_event_spec_disp esd
388: -- WHERE s.spec_id = svr.spec_id

Line 430: FROM gmd_sampling_events se,

426: -- added extra and clause that both locations should be NULL.
427:
428: CURSOR c_loc_sampling_event IS
429: SELECT se.sampling_event_id
430: FROM gmd_sampling_events se,
431: -- gmd_specifications_b s,
432: -- gmd_monitoring_spec_vrs svr,
433: gmd_event_spec_disp esd
434: -- WHERE s.spec_id = svr.spec_id

Line 574: FROM gmd_sampling_events se,

570: ) RETURN BOOLEAN IS
571:
572: CURSOR c_inv_sampling_event IS
573: SELECT se.sampling_event_id
574: FROM gmd_sampling_events se,
575: gmd_specifications_b s,
576: gmd_inventory_spec_vrs ivr,
577: gmd_event_spec_disp esd
578: WHERE s.spec_id = ivr.spec_id

Line 618: FROM gmd_sampling_events se,

614:
615: -- Bug 4640143: added material detail id
616: CURSOR c_wip_sampling_event IS
617: SELECT se.sampling_event_id
618: FROM gmd_sampling_events se,
619: gmd_specifications_b s,
620: gmd_wip_spec_vrs wvr,
621: gmd_event_spec_disp esd
622: WHERE s.spec_id = wvr.spec_id

Line 687: FROM gmd_sampling_events se,

683:
684:
685: CURSOR c_cust_sampling_event IS
686: SELECT se.sampling_event_id
687: FROM gmd_sampling_events se,
688: gmd_specifications_b s,
689: gmd_customer_spec_vrs cvr,
690: gmd_event_spec_disp esd
691: WHERE s.spec_id = cvr.spec_id

Line 737: FROM gmd_sampling_events se,

733:
734:
735: CURSOR c_supp_sampling_event IS
736: SELECT se.sampling_event_id
737: FROM gmd_sampling_events se,
738: gmd_specifications_b s,
739: gmd_supplier_spec_vrs svr,
740: gmd_event_spec_disp esd
741: WHERE s.spec_id = svr.spec_id

Line 783: FROM gmd_sampling_events se,

779: -- if se.resource was null then location sampling events were
780: -- attached to resource samples.
781: CURSOR c_res_sampling_event IS
782: SELECT se.sampling_event_id
783: FROM gmd_sampling_events se,
784: gmd_specifications_b s,
785: gmd_monitoring_spec_vrs svr,
786: gmd_event_spec_disp esd
787: WHERE s.spec_id = svr.spec_id

Line 826: FROM gmd_sampling_events se,

822: -- added extra and clause that both locations should be NULL.
823:
824: CURSOR c_loc_sampling_event IS
825: SELECT se.sampling_event_id
826: FROM gmd_sampling_events se,
827: gmd_specifications_b s,
828: gmd_monitoring_spec_vrs svr,
829: gmd_event_spec_disp esd
830: WHERE s.spec_id = svr.spec_id

Line 977: FROM gmd_sampling_events se

973: ) RETURN BOOLEAN IS
974:
975: CURSOR c_inv_sampling_event IS
976: SELECT se.sampling_event_id
977: FROM gmd_sampling_events se
978: WHERE se.inventory_item_id = p_sample.inventory_item_id
979: AND se.organization_id = p_sample.organization_id
980: AND se.original_spec_vr_id IS NULL
981: AND ((se.subinventory IS NULL AND p_sample.subinventory IS NULL) OR

Line 1003: FROM gmd_sampling_events se

999:
1000: -- Bug 4640143: added material detail id
1001: CURSOR c_wip_sampling_event IS
1002: SELECT se.sampling_event_id
1003: FROM gmd_sampling_events se
1004: WHERE se.inventory_item_id = p_sample.inventory_item_id
1005: AND se.organization_id = p_sample.organization_id
1006: AND se.original_spec_vr_id IS NULL
1007: AND ((se.batch_id is NULL AND p_sample.batch_id is NULL) OR

Line 1054: FROM gmd_sampling_events se

1050:
1051:
1052: CURSOR c_cust_sampling_event IS
1053: SELECT se.sampling_event_id
1054: FROM gmd_sampling_events se
1055: WHERE se.inventory_item_id = p_sample.inventory_item_id
1056: AND se.organization_id = p_sample.organization_id
1057: AND se.original_spec_vr_id IS NULL
1058: AND ((se.cust_id is NULL AND p_sample.cust_id is NULL) OR

Line 1086: FROM gmd_sampling_events se

1082:
1083: -- Bug 3143796: added whse, location and lot_id
1084: CURSOR c_supp_sampling_event IS
1085: SELECT se.sampling_event_id
1086: FROM gmd_sampling_events se
1087: WHERE se.inventory_item_id = p_sample.inventory_item_id
1088: AND se.organization_id = p_sample.organization_id
1089: AND se.original_spec_vr_id IS NULL
1090: AND ((se.supplier_id is NULL AND p_sample.supplier_id is NULL) OR

Line 1125: FROM gmd_sampling_events se

1121:
1122:
1123: CURSOR c_res_sampling_event IS
1124: SELECT se.sampling_event_id
1125: FROM gmd_sampling_events se
1126: WHERE ((se.organization_id is NULL AND p_sample.organization_id IS NULL) OR
1127: (se.organization_id = p_sample.organization_id)
1128: )
1129: AND se.source = p_sample.source

Line 1155: FROM gmd_sampling_events se

1151: -- resource sampling event cursor.
1152:
1153: CURSOR c_loc_sampling_event IS
1154: SELECT se.sampling_event_id
1155: FROM gmd_sampling_events se
1156: WHERE ((se.organization_id is NULL) OR
1157: (se.organization_id = p_sample.organization_id )
1158: )
1159: AND se.source = p_sample.source

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

1586: --Bug# 5440347 start
1587: --this cursor is used for single samples
1588: CURSOR cur_auto_complete_bstep IS
1589: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
1590: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
1591: WHERE gs.SAMPLE_ID = p_update_disp_rec.sample_id
1592: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
1593: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
1594:

Line 1598: FROM gmd_sampling_events

1594:
1595: --the below two cursors are used for sample groups
1596: CURSOR cur_sampling_event_details(p_sampling_event_id NUMBER) IS
1597: SELECT step_id,organization_id,sample_type,source , disposition -- added disposition for bug 8252179
1598: FROM gmd_sampling_events
1599: WHERE sampling_event_id = p_sampling_event_id;
1600:
1601: CURSOR cur_comp_auto_complete_bstep(p_sampling_event_id NUMBER) IS
1602: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')

Line 1603: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse

1599: WHERE sampling_event_id = p_sampling_event_id;
1600:
1601: CURSOR cur_comp_auto_complete_bstep(p_sampling_event_id NUMBER) IS
1602: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
1603: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse
1604: WHERE gse.SAMPLING_EVENT_ID = p_sampling_event_id
1605: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
1606:
1607: -- -- 8252179 added cursor

Line 1610: FROM gmd_sampling_events

1606:
1607: -- -- 8252179 added cursor
1608: CURSOR cur_sampling_event_disp(p_sampling_event_id NUMBER) IS
1609: SELECT disposition
1610: FROM gmd_sampling_events
1611: WHERE sampling_event_id = p_sampling_event_id;
1612: -- end 8252179
1613:
1614: l_auto_complete_bstep VARCHAR2(1) := NULL;

Line 1712: FROM gmd_sampling_events

1708: IF l_step_id IS NOT NULL THEN
1709: /* Added in 8252179 - Start */
1710: SELECT nvl(sample_active_cnt, 0), nvl(sample_req_cnt, 1) -- peter lowe added this to get counts
1711: INTO l_active_cnt, l_req_cnt
1712: FROM gmd_sampling_events
1713: WHERE sampling_event_id = l_sampling_event_id;
1714: /* Added in 8252179 - End */
1715:
1716: -- only do so if the sample group disposition is in 4A or 5AV -- 8252179

Line 1835: UPDATE gmd_sampling_events

1831: IF (l_sample_curr_disp NOT IN ('0RT','7CN') AND
1832: p_to_disposition IN ('0RT','7CN'))
1833: THEN
1834:
1835: UPDATE gmd_sampling_events
1836: SET sample_active_cnt = sample_active_cnt - 1,
1837: recomposite_ind = 'Y',
1838: last_updated_by = l_last_updated_by,
1839: last_update_date = l_last_update_date,

Line 1847: UPDATE gmd_sampling_events

1843: ELSIF (l_sample_curr_disp IN ('0RT','7CN') AND
1844: p_to_disposition NOT IN ('0RT','7CN'))
1845: THEN
1846:
1847: UPDATE gmd_sampling_events
1848: SET sample_active_cnt = sample_active_cnt + 1,
1849: recomposite_ind = 'Y',
1850: last_updated_by = l_last_updated_by,
1851: last_update_date = l_last_update_date,

Line 1860: FROM gmd_sampling_events

1856: l_position := '025' ;
1857:
1858: SELECT nvl(sample_active_cnt,0),nvl(sample_req_cnt,1)
1859: INTO l_active_cnt,l_req_cnt
1860: FROM gmd_sampling_events
1861: WHERE sampling_event_id = l_sampling_event_id
1862: FOR UPDATE OF disposition NOWAIT ;
1863:
1864: ELSIF p_update_disp_rec.composite_spec_disp_id IS NOT NULL THEN

Line 1896: FROM gmd_sampling_events

1892: WHERE composite_spec_disp_id = p_update_disp_rec.composite_spec_disp_id ;
1893:
1894: SELECT nvl(sample_active_cnt,0),nvl(sample_req_cnt,1)
1895: INTO l_active_cnt,l_req_cnt
1896: FROM gmd_sampling_events
1897: WHERE sampling_event_id = l_sampling_event_id
1898: FOR UPDATE OF disposition NOWAIT ;
1899:
1900: --Bug# 5440347 start

Line 2122: UPDATE gmd_sampling_events

2118: last_update_login = l_last_update_login
2119: WHERE event_spec_disp_id = l_event_spec_disp_id ;
2120:
2121: -- Set the disposition of the Sampling Event
2122: UPDATE gmd_sampling_events
2123: SET disposition = l_final_event_disp,
2124: last_updated_by = l_last_updated_by,
2125: last_update_date = l_last_update_date,
2126: last_update_login = l_last_update_login

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

2530: --Bug# 5440347 start
2531: --this cursor is used for single samples
2532: CURSOR cur_auto_complete_bstep_smpl IS
2533: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
2534: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,GMD_SAMPLES gs
2535: WHERE gs.SAMPLE_ID = p_sample_id
2536: AND gse.SAMPLING_EVENT_ID = gs.SAMPLING_EVENT_ID
2537: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
2538:

Line 2541: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,

2537: AND wip.SPEC_VR_ID = gse.ORIGINAL_SPEC_VR_ID;
2538:
2539: CURSOR cur_auto_complete_bstep_comp IS
2540: SELECT NVL(wip.AUTO_COMPLETE_BATCH_STEP,'N')
2541: FROM GMD_WIP_SPEC_VRS wip,GMD_SAMPLING_EVENTS gse,
2542: GMD_EVENT_SPEC_DISP esd, GMD_COMPOSITE_SPEC_DISP csd
2543: WHERE csd.COMPOSITE_SPEC_DISP_ID = p_composite_spec_disp_id
2544: AND esd.EVENT_SPEC_DISP_ID = csd.EVENT_SPEC_DISP_ID
2545: AND gse.SAMPLING_EVENT_ID = esd.SAMPLING_EVENT_ID

Line 2653: GMD_SAMPLING_EVENTS gse,

2649: l_batch_id,
2650: l_step_no
2651: FROM GMD_COMPOSITE_SPEC_DISP csd,
2652: GMD_EVENT_SPEC_DISP esd ,
2653: GMD_SAMPLING_EVENTS gse,
2654: MTL_SYSTEM_ITEMS_b_kfv iim
2655: WHERE csd.composite_spec_disp_id = p_composite_spec_disp_id
2656: and csd.event_spec_disp_id = esd.event_spec_disp_id
2657: and esd.sampling_event_id = gse.sampling_event_id

Line 3609: FROM gmd_sampling_events

3605: AND inventory_item_id = p_inventory_item_id;
3606:
3607: CURSOR c_sampling_event(p_sampling_event_id NUMBER) IS
3608: SELECT 1
3609: FROM gmd_sampling_events
3610: WHERE sampling_event_id = p_sampling_event_id
3611: ;
3612:
3613: -- Bug 4165704: changed for inventory convergence

Line 5334: in_sampling_event gmd_sampling_events%ROWTYPE;

5330: WHERE lpn_id = p_lpn_id;
5331:
5332: in_sample gmd_samples%ROWTYPE;
5333: out_sample gmd_samples%ROWTYPE;
5334: in_sampling_event gmd_sampling_events%ROWTYPE;
5335: out_sampling_event gmd_sampling_events%ROWTYPE;
5336: sampling_event gmd_sampling_events%ROWTYPE;
5337:
5338: /*=================================

Line 5335: out_sampling_event gmd_sampling_events%ROWTYPE;

5331:
5332: in_sample gmd_samples%ROWTYPE;
5333: out_sample gmd_samples%ROWTYPE;
5334: in_sampling_event gmd_sampling_events%ROWTYPE;
5335: out_sampling_event gmd_sampling_events%ROWTYPE;
5336: sampling_event gmd_sampling_events%ROWTYPE;
5337:
5338: /*=================================
5339: Added for BUG#4695552.

Line 5336: sampling_event gmd_sampling_events%ROWTYPE;

5332: in_sample gmd_samples%ROWTYPE;
5333: out_sample gmd_samples%ROWTYPE;
5334: in_sampling_event gmd_sampling_events%ROWTYPE;
5335: out_sampling_event gmd_sampling_events%ROWTYPE;
5336: sampling_event gmd_sampling_events%ROWTYPE;
5337:
5338: /*=================================
5339: Added for BUG#4695552.
5340: =================================*/

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

5423: -- test for whether sample event id exists because then sampling event fields are needed
5424: IF ((NVL(out_sample.sample_id, 0) <> 0)
5425: AND (NVL(out_sample.sampling_event_id, 0) <> 0)) THEN
5426: in_sampling_event.sampling_event_id := out_sample.sampling_event_id;
5427: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,
5428: x_sampling_events => out_sampling_event))
5429: THEN
5430: -- Fetch Error.
5431: RAISE e_sampling_event_fetch_error;

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

5491: END IF;
5492:
5493: ELSIF p_type = 'EVENT' THEN -- sampling_event_id is passed
5494: in_sampling_event.sampling_event_id := p_id;
5495: IF NOT (GMD_SAMPLING_EVENTS_PVT.fetch_row(p_sampling_events => in_sampling_event,
5496: x_sampling_events => out_sampling_event))
5497: THEN
5498: -- Fetch Error.
5499: RAISE e_sampling_event_fetch_error;