[Home] [Help]
2273: nvl(RESERVE_CNT_REQ, 0) reserve_cnt_req,
2274: nvl(RESERVE_QTY, 0) reserve_qty,
2275: nvl(ARCHIVE_CNT_REQ, 0) archive_cnt_req,
2276: nvl(ARCHIVE_QTY, 0) archive_qty
2277: FROM gmd_sampling_plans_b sm, gmd_wip_spec_vrs sv
2278: WHERE sv.sampling_plan_id = sm.sampling_plan_id
2279: AND sv.spec_vr_id = X_SPEC_VR_ID;
2280:
2281: CURSOR wip_sample_plan_freq_per(x_frequency_per varchar2) IS
2407:
2408: /* Cursors to check if Spec VR has auto enable flag enabled */
2409: CURSOR wip_auto_sample(X_SPEC_VR_ID number) is
2410: select nvl(auto_sample_ind, 'N')
2411: from GMD_WIP_SPEC_VRS
2412: where spec_vr_id = X_SPEC_VR_ID;
2413:
2414: /* Given a sampling event and a retain as, gets the sample numbers */
2415: CURSOR get_sample_num(x_sampling_event_in number, x_retain_as varchar2) is
2704: FND_MESSAGE.SET_TOKEN('RGULAR_SAMPLES', fsample_name);
2705:
2706: --RLNAGARA Bug 5910300 start
2707: IF (l_frequency_type = 'F') THEN
2708: UPDATE GMD_WIP_SPEC_VRS
2709: SET BATCH_FREQUENCY = NVL(BATCH_FREQUENCY, 0) + 1 --RLNAGARA Bug 5910300 Rework Added NVL
2710: WHERE SPEC_VR_ID = l_spec_vr_id;
2711: select batch_frequency
2712: into b
2709: SET BATCH_FREQUENCY = NVL(BATCH_FREQUENCY, 0) + 1 --RLNAGARA Bug 5910300 Rework Added NVL
2710: WHERE SPEC_VR_ID = l_spec_vr_id;
2711: select batch_frequency
2712: into b
2713: from gmd_wip_spec_vrs
2714: where spec_vr_id = l_spec_vr_id;
2715:
2716: IF b <> l_frequency_count THEN
2717: p_resultout := 'COMPLETE:';
2716: IF b <> l_frequency_count THEN
2717: p_resultout := 'COMPLETE:';
2718: RETURN;
2719: ELSE
2720: UPDATE GMD_WIP_SPEC_VRS
2721: SET BATCH_FREQUENCY = 0
2722: WHERE SPEC_VR_ID = l_spec_vr_id;
2723: l_sampling_events.sample_req_cnt := l_sample_count;
2724: END IF;